From d4bf7c515f560d4e0be83432317503b36300b505 Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Thu, 4 Apr 2024 16:17:48 +0200 Subject: [PATCH] refactor: remove datadog BREAKING CHANGE: remove datadog from the project --- paket.dependencies | 2 -- paket.lock | 21 ------------------- .../LastChangedListModule.cs | 15 +++---------- .../paket.references | 1 - .../paket.template | 1 - 5 files changed, 3 insertions(+), 37 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 44b0931..be3c2fe 100755 --- a/paket.dependencies +++ b/paket.dependencies @@ -40,8 +40,6 @@ nuget Be.Vlaanderen.Basisregisters.AggregateSource.SqlStreamStore.Autofac 9.0.1 nuget Be.Vlaanderen.Basisregisters.EventHandling 5.0.0 nuget Be.Vlaanderen.Basisregisters.EventHandling.Autofac 5.0.0 -nuget Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql 6.0.0 - // TEST STUFF nuget Microsoft.NET.Test.Sdk 17.9.0 nuget Microsoft.TestPlatform.ObjectModel 17.9.0 diff --git a/paket.lock b/paket.lock index 73c3d09..f621877 100644 --- a/paket.lock +++ b/paket.lock @@ -42,15 +42,6 @@ NUGET Be.Vlaanderen.Basisregisters.Build.Pipeline (7.0.4) Be.Vlaanderen.Basisregisters.Converters.TrimString (4.0) Newtonsoft.Json (>= 13.0.3) - Be.Vlaanderen.Basisregisters.DataDog.Tracing (6.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - Newtonsoft.Json (>= 13.0.3) - System.Reactive (>= 6.0) - System.Reflection (>= 4.3) - System.Threading.Tasks.Dataflow (>= 8.0) - Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql (6.0) - Be.Vlaanderen.Basisregisters.DataDog.Tracing (6.0) - System.Data.Common (>= 4.3) Be.Vlaanderen.Basisregisters.EventHandling (5.0) Be.Vlaanderen.Basisregisters.Converters.TrimString (>= 4.0) Newtonsoft.Json (>= 13.0.3) @@ -316,15 +307,6 @@ NUGET System.Configuration.ConfigurationManager (8.0) - restriction: || (== net8.0) (&& (== netstandard2.1) (>= net8.0)) System.Diagnostics.EventLog (>= 8.0) - restriction: || (== net8.0) (&& (== netstandard2.1) (>= net7.0)) System.Security.Cryptography.ProtectedData (>= 8.0) - System.Data.Common (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Text.RegularExpressions (>= 4.3) - System.Threading.Tasks (>= 4.3) System.Diagnostics.Debug (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -376,8 +358,6 @@ NUGET System.Memory.Data (8.0) - restriction: || (== net8.0) (&& (== netstandard2.1) (>= net8.0)) System.Text.Json (>= 8.0) System.Numerics.Vectors (4.5) - System.Reactive (6.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (== net8.0) (>= net472)) (&& (== net8.0) (< net6.0)) (&& (== net8.0) (>= uap10.1)) (== netstandard2.1) System.Reflection (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -453,7 +433,6 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (8.0) System.Threading.Tasks.Extensions (4.5.4) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== net8.0) (>= net461)) (&& (== net8.0) (< netcoreapp2.1)) (&& (== net8.0) (< netstandard1.0)) (&& (== net8.0) (< netstandard2.0)) (&& (== net8.0) (>= wp8)) (== netstandard2.1) System.Xml.ReaderWriter (4.3.1) diff --git a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/LastChangedListModule.cs b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/LastChangedListModule.cs index d6335f6..f9c4aaa 100755 --- a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/LastChangedListModule.cs +++ b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/LastChangedListModule.cs @@ -1,20 +1,16 @@ namespace Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList { using System; - using Microsoft.Data.SqlClient; using Autofac; - using DataDog.Tracing.Sql.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; - using Runner.MigrationExtensions; using Runner.SqlServer.MigrationExtensions; public class LastChangedListModule : Module { public LastChangedListModule( string connectionString, - string datadogServiceName, IServiceCollection services, ILoggerFactory loggerFactory) { @@ -22,7 +18,7 @@ public LastChangedListModule( var hasConnectionString = !string.IsNullOrWhiteSpace(connectionString); if (hasConnectionString) - RunOnSqlServer(datadogServiceName, services, loggerFactory, connectionString); + RunOnSqlServer(services, loggerFactory, connectionString); else RunInMemoryDb(services, loggerFactory, logger); @@ -36,20 +32,15 @@ public LastChangedListModule( } private static void RunOnSqlServer( - string datadogServiceName, IServiceCollection services, ILoggerFactory loggerFactory, string backofficeProjectionsConnectionString) { services - .AddScoped(s => - new TraceDbConnection( - new SqlConnection(backofficeProjectionsConnectionString), - datadogServiceName)) - .AddDbContext((provider, options) => options + .AddDbContext((_, options) => options .UseLoggerFactory(loggerFactory) .UseSqlServer( - provider.GetRequiredService>(), + backofficeProjectionsConnectionString, sqlServerOptions => { sqlServerOptions.EnableRetryOnFailure(); diff --git a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.references b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.references index f39eb09..cc13a7e 100755 --- a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.references +++ b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.references @@ -11,4 +11,3 @@ Polly Be.Vlaanderen.Basisregisters.EventHandling Be.Vlaanderen.Basisregisters.AggregateSource.SqlStreamStore -Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql diff --git a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.template b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.template index 699f7ae..d7c7397 100755 --- a/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.template +++ b/src/Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList/paket.template @@ -20,7 +20,6 @@ dependencies Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore CURRENTVERSION Be.Vlaanderen.Basisregisters.AggregateSource.SqlStreamStore >= LOCKEDVERSION - Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql >= LOCKEDVERSION Microsoft.EntityFrameworkCore.SqlServer >= LOCKEDVERSION Microsoft.Extensions.DependencyInjection >= LOCKEDVERSION