From 44689deb3a9df3d667482f4a1439192ee02005c2 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:10:35 -0500 Subject: [PATCH 01/14] Use netframework definition rather than NET45 --- sdk/src/Core/AWSXRayRecorderImpl.cs | 10 ++++---- sdk/src/Core/AwsXrayRecorderBuilder.cs | 4 ++-- .../Internal/Context/DefaultTraceContext.cs | 2 +- .../Internal/Emitters/UdpSegmentEmitter.cs | 2 +- .../DynamicSegmentNamingStrategy.cs | 4 ++-- .../Strategies/FixedSegmentNamingStrategy.cs | 4 ++-- .../Core/Strategies/SegmentNamingStrategy.cs | 4 ++-- sdk/src/Handlers/EntityFramework/EFUtil.cs | 4 ++-- .../SqlServer/DbCommandInterceptor.cs | 2 +- sdk/test/IntegrationTests/TestBase.cs | 2 +- .../IntegrationTests/ValidateSegmentTests.cs | 10 ++++---- .../AWSXRayRecorder.SmokeTests.csproj | 4 ---- sdk/test/UnitTests/AWSSDKHandlerTests.cs | 22 ++++++++--------- .../AWSXRayRecorder.UnitTests.csproj | 4 ---- .../UnitTests/AWSXRayRecorderBuilderTests.cs | 18 +++++++------- sdk/test/UnitTests/AWSXRayRecorderTests.cs | 24 +++++++++---------- sdk/test/UnitTests/CauseTest.cs | 2 +- .../UnitTests/DbCommandInterceptorTests.cs | 20 ++++++++-------- .../HttpClientXRayTracingHandlerTests.cs | 6 ++--- .../HttpWebRequestTracingExtensionTests.cs | 10 ++++---- .../LocalizedSamplingStrategyTests.cs | 14 +++++------ .../UnitTests/SegmentNamingStrategyTests.cs | 6 ++--- sdk/test/UnitTests/SegmentTests.cs | 2 +- sdk/test/UnitTests/Tools/CustomResponses.cs | 2 +- sdk/test/UnitTests/Tools/MockWebResponse.cs | 2 +- 25 files changed, 88 insertions(+), 96 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorderImpl.cs b/sdk/src/Core/AWSXRayRecorderImpl.cs index 6ad0d6a1..0a69a416 100644 --- a/sdk/src/Core/AWSXRayRecorderImpl.cs +++ b/sdk/src/Core/AWSXRayRecorderImpl.cs @@ -37,7 +37,7 @@ namespace Amazon.XRay.Recorder.Core public abstract class AWSXRayRecorderImpl : IAWSXRayRecorder { private static readonly Logger _logger = Logger.GetLogger(typeof(AWSXRayRecorderImpl)); -#if NET45 +#if NETFRAMEWORK private static Lazy _lazyDefaultRecorder = new Lazy(() => AWSXRayRecorderBuilder.GetDefaultBuilder().Build()); protected static Lazy LazyDefaultRecorder { @@ -151,7 +151,7 @@ public ContextMissingStrategy ContextMissingStrategy /// The argument has a null value. public void BeginSegment(string name, string traceId = null, string parentId = null, SamplingResponse samplingResponse = null, DateTime? timestamp = null) { -#if !NET45 +#if !NETFRAMEWORK if (AWSXRayRecorder.IsLambda()) { throw new UnsupportedOperationException("Cannot override Facade Segment. New segment not created."); @@ -193,7 +193,7 @@ public void BeginSegment(string name, string traceId = null, string parentId = n /// Entity is not available in trace context. public void EndSegment(DateTime? timestamp = null) { -#if !NET45 +#if !NETFRAMEWORK if (AWSXRayRecorder.IsLambda()) { throw new UnsupportedOperationException("Cannot override Facade Segment. New segment not created."); @@ -727,7 +727,7 @@ protected void PopulateContexts() // Prepare XRay section for runtime context var xrayContext = new ConcurrentDictionary(); -#if NET45 +#if NETFRAMEWORK xrayContext["sdk"] = "X-Ray for .NET"; #else xrayContext["sdk"] = "X-Ray for .NET Core"; @@ -743,7 +743,7 @@ protected void PopulateContexts() } RuntimeContext["xray"] = xrayContext; -#if NET45 +#if NETFRAMEWORK ServiceContext["runtime"] = ".NET Framework"; #else ServiceContext["runtime"] = ".NET Core Framework"; diff --git a/sdk/src/Core/AwsXrayRecorderBuilder.cs b/sdk/src/Core/AwsXrayRecorderBuilder.cs index 9557e125..e59c61cd 100644 --- a/sdk/src/Core/AwsXrayRecorderBuilder.cs +++ b/sdk/src/Core/AwsXrayRecorderBuilder.cs @@ -56,7 +56,7 @@ public IReadOnlyList Plugins } } -#if NET45 +#if NETFRAMEWORK /// /// Initializes instance with default settings. /// @@ -67,7 +67,7 @@ public static AWSXRayRecorderBuilder GetDefaultBuilder() } #endif -#if NET45 +#if NETFRAMEWORK /// /// Reads plugin settings from app settings, and adds new instance of each plugin into the builder. /// If the plugin settings doesn't exist or the value of the settings is invalid, nothing will be added. diff --git a/sdk/src/Core/Internal/Context/DefaultTraceContext.cs b/sdk/src/Core/Internal/Context/DefaultTraceContext.cs index f0dc2fe5..ad4a85d5 100644 --- a/sdk/src/Core/Internal/Context/DefaultTraceContext.cs +++ b/sdk/src/Core/Internal/Context/DefaultTraceContext.cs @@ -25,7 +25,7 @@ public static class DefaultTraceContext /// default instance of public static ITraceContext GetTraceContext() { -#if NET45 +#if NETFRAMEWORK return new CallContextContainer(); #else if (AWSXRayRecorder.IsLambda()) diff --git a/sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs b/sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs index f312f046..2b55cff0 100644 --- a/sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs +++ b/sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs @@ -136,7 +136,7 @@ protected virtual void Dispose(bool disposing) { if (_udpClient != null) { -#if NET45 +#if NETFRAMEWORK _udpClient.Close(); #else _udpClient.Dispose(); diff --git a/sdk/src/Core/Strategies/DynamicSegmentNamingStrategy.cs b/sdk/src/Core/Strategies/DynamicSegmentNamingStrategy.cs index 3fec0aa7..6d9e5f60 100644 --- a/sdk/src/Core/Strategies/DynamicSegmentNamingStrategy.cs +++ b/sdk/src/Core/Strategies/DynamicSegmentNamingStrategy.cs @@ -20,7 +20,7 @@ using System.Text.RegularExpressions; using Amazon.Runtime.Internal.Util; using Amazon.XRay.Recorder.Core.Internal.Utils; -#if NET45 +#if NETFRAMEWORK using System.Net.Http; #else using Microsoft.AspNetCore.Http; @@ -80,7 +80,7 @@ public DynamicSegmentNamingStrategy(string fallbackSegmentName, string hostNameP /// public string FallbackSegmentName { get; set; } -#if NET45 +#if NETFRAMEWORK /// /// Gets the name of the segment. /// diff --git a/sdk/src/Core/Strategies/FixedSegmentNamingStrategy.cs b/sdk/src/Core/Strategies/FixedSegmentNamingStrategy.cs index d7f5f3b8..06f857b5 100644 --- a/sdk/src/Core/Strategies/FixedSegmentNamingStrategy.cs +++ b/sdk/src/Core/Strategies/FixedSegmentNamingStrategy.cs @@ -18,7 +18,7 @@ using System; using Amazon.Runtime.Internal.Util; -#if NET45 +#if NETFRAMEWORK using System.Net.Http; #else using Microsoft.AspNetCore.Http; @@ -60,7 +60,7 @@ public FixedSegmentNamingStrategy(string fixedName) /// public string FixedName { get; set; } -#if NET45 +#if NETFRAMEWORK /// /// Gets the name of the segment. /// diff --git a/sdk/src/Core/Strategies/SegmentNamingStrategy.cs b/sdk/src/Core/Strategies/SegmentNamingStrategy.cs index 57f44090..aa63d227 100644 --- a/sdk/src/Core/Strategies/SegmentNamingStrategy.cs +++ b/sdk/src/Core/Strategies/SegmentNamingStrategy.cs @@ -18,7 +18,7 @@ using System; -#if NET45 +#if NETFRAMEWORK using System.Net.Http; #else using Microsoft.AspNetCore.Http; @@ -45,7 +45,7 @@ public static string GetSegmentNameFromEnvironmentVariable() return Environment.GetEnvironmentVariable(SegmentNamingStrategy.EnvironmentVariableSegmentName); } -#if NET45 +#if NETFRAMEWORK /// /// Gets the name of the segment. /// diff --git a/sdk/src/Handlers/EntityFramework/EFUtil.cs b/sdk/src/Handlers/EntityFramework/EFUtil.cs index 74d49182..1aef6705 100644 --- a/sdk/src/Handlers/EntityFramework/EFUtil.cs +++ b/sdk/src/Handlers/EntityFramework/EFUtil.cs @@ -20,7 +20,7 @@ using System.Text.RegularExpressions; using Amazon.Runtime.Internal.Util; using Amazon.XRay.Recorder.Core; -#if NET45 +#if NETFRAMEWORK using Amazon.XRay.Recorder.Core.Internal.Utils; #endif @@ -191,7 +191,7 @@ private static string RemovePortNumberFromDataSource(string dataSource) return _portNumberRegex.Replace(dataSource, string.Empty); } -#if !NET45 +#if !NETFRAMEWORK private static bool ShouldCollectSqlText(bool? collectSqlQueriesOverride) => collectSqlQueriesOverride ?? _recorder.XRayOptions.CollectSqlQueries; #else diff --git a/sdk/src/Handlers/SqlServer/DbCommandInterceptor.cs b/sdk/src/Handlers/SqlServer/DbCommandInterceptor.cs index 451eea75..7bc82631 100644 --- a/sdk/src/Handlers/SqlServer/DbCommandInterceptor.cs +++ b/sdk/src/Handlers/SqlServer/DbCommandInterceptor.cs @@ -150,7 +150,7 @@ protected virtual void CollectSqlInformation(DbCommand command) private string BuildSubsegmentName(DbCommand command) => command.Connection.Database + "@" + SqlUtil.RemovePortNumberFromDataSource(command.Connection.DataSource); -#if !NET45 +#if !NETFRAMEWORK private bool ShouldCollectSqlText() => _collectSqlQueriesOverride ?? _recorder.XRayOptions.CollectSqlQueries; #else diff --git a/sdk/test/IntegrationTests/TestBase.cs b/sdk/test/IntegrationTests/TestBase.cs index 4ae46606..9de2b73d 100644 --- a/sdk/test/IntegrationTests/TestBase.cs +++ b/sdk/test/IntegrationTests/TestBase.cs @@ -44,7 +44,7 @@ protected static void ClassCleanup() Recorder.Dispose(); } -#if NET45 +#if NETFRAMEWORK protected BatchGetTracesResponse BatchGetTraces(string traceId) { var request = new BatchGetTracesRequest(); diff --git a/sdk/test/IntegrationTests/ValidateSegmentTests.cs b/sdk/test/IntegrationTests/ValidateSegmentTests.cs index b63afae6..85becc1a 100644 --- a/sdk/test/IntegrationTests/ValidateSegmentTests.cs +++ b/sdk/test/IntegrationTests/ValidateSegmentTests.cs @@ -50,7 +50,7 @@ public void TestMinimalSegment() var segment = AWSXRayRecorder.Instance.TraceContext.GetEntity(); Thread.Sleep(100); Recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK var response = BatchGetTraces(traceId); #else var response = BatchGetTracesAsync(traceId).Result; @@ -80,7 +80,7 @@ public void TestMultipleSubsegments() AWSXRayRecorder.Instance.TraceContext.GetEntity().Subsegments.ForEach(x => subsegmentNames[x.Id] = x.Name); Recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK var response = BatchGetTraces(traceId); #else var response = BatchGetTracesAsync(traceId).Result; @@ -120,7 +120,7 @@ public void TestEC2Plugin() Thread.Sleep(100); recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK var response = BatchGetTraces(traceId); #else var response = BatchGetTracesAsync(traceId).Result; @@ -151,7 +151,7 @@ public void TestECSPlugin() recorder.BeginSegment(GetType().Name, traceId); Thread.Sleep(100); recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK var response = BatchGetTraces(traceId); #else var response = BatchGetTracesAsync(traceId).Result; @@ -182,7 +182,7 @@ public void TestElasticBeanstalkPlugin() recorder.BeginSegment(GetType().Name, traceId); Thread.Sleep(100); recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK var response = BatchGetTraces(traceId); #else var response = BatchGetTracesAsync(traceId).Result; diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index 15b0da58..782252f6 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -11,10 +11,6 @@ true - - NET45 - - diff --git a/sdk/test/UnitTests/AWSSDKHandlerTests.cs b/sdk/test/UnitTests/AWSSDKHandlerTests.cs index 684a8267..f204fb89 100644 --- a/sdk/test/UnitTests/AWSSDKHandlerTests.cs +++ b/sdk/test/UnitTests/AWSSDKHandlerTests.cs @@ -44,7 +44,7 @@ public class AWSSDKHandlerTests : TestBase private AWSXRayRecorder _recorder; private static String _path = $"JSONs{Path.DirectorySeparatorChar}AWSRequestInfo.json"; -#if !NET45 +#if !NETFRAMEWORK private XRayOptions _xRayOptions = new XRayOptions(); #endif @@ -52,7 +52,7 @@ public class AWSSDKHandlerTests : TestBase public void TestInitialize() { _recorder = new AWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(recorder:_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -63,7 +63,7 @@ public void TestInitialize() public new void TestCleanup() { base.TestCleanup(); -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = null; AppSettings.Reset(); #else @@ -89,7 +89,7 @@ public void TestContextMissingStrategyForAWSSDKHandler() AWSXRayRecorder.Instance.EndSegment(); // The test should not break. No segment is available in the context, however, since the context missing strategy is log error, // no exception should be thrown by below code. -#if NET45 +#if NETFRAMEWORK dynamo.ListTables(); #else dynamo.ListTablesAsync().Wait(); @@ -105,7 +105,7 @@ public void TestS3SubsegmentNameIsCorrectForAWSSDKHandler() CustomResponses.SetResponse(s3, null, "TestAmazonId"); _recorder.BeginSegment("test s3", TraceId); -#if NET45 +#if NETFRAMEWORK s3.GetObject("testBucket", "testKey"); #else s3.GetObjectAsync("testBucket", "testKey").Wait(); @@ -131,7 +131,7 @@ public void TestDynamoDbClient() CustomResponses.SetResponse(client, requestId); _recorder.BeginSegment("test", TraceId); -#if NET45 +#if NETFRAMEWORK client.ListTables(); #else client.ListTablesAsync().Wait(); @@ -194,7 +194,7 @@ public void TestRequestResponseParameterAndDescriptorForAWSSDKHandler() var key2 = new Dictionary() { { "id", new AttributeValue("2") } }; var keys = new KeysAndAttributes() { Keys = new List>() { key1, key2 } }; -#if NET45 +#if NETFRAMEWORK client.BatchGetItem(new Dictionary() { { "test", keys } }); #else client.BatchGetItemAsync(new Dictionary() { { "test", keys } }).Wait(); @@ -259,7 +259,7 @@ public void TestDynamoSubsegmentNameIsCorrectForAWSSDKHandler() var dynamo = new AmazonDynamoDBClient(new AnonymousAWSCredentials(), RegionEndpoint.USEast1); CustomResponses.SetResponse(dynamo); _recorder.BeginSegment("test dynamo", TraceId); -#if NET45 +#if NETFRAMEWORK dynamo.ListTables(); #else dynamo.ListTablesAsync().Wait(); @@ -276,7 +276,7 @@ public void TestManifestFileNoLambda() //At this point, current manifest file do var lambda = new AmazonLambdaClient(new AnonymousAWSCredentials(), RegionEndpoint.USEast1); CustomResponses.SetResponse(lambda); _recorder.BeginSegment("lambda", TraceId); -#if NET45 +#if NETFRAMEWORK lambda.Invoke(new InvokeRequest { FunctionName = "testFunction" @@ -300,7 +300,7 @@ public void TestLambdaInvokeSubsegmentContainsFunctionNameForAWSSDKHandler() var lambda = new AmazonLambdaClient(new AnonymousAWSCredentials(), RegionEndpoint.USEast1); CustomResponses.SetResponse(lambda); _recorder.BeginSegment("lambda", TraceId); -#if NET45 +#if NETFRAMEWORK lambda.Invoke(new InvokeRequest { FunctionName = "testFunction" @@ -329,7 +329,7 @@ public void TestRegisterXRayManifestWithStreamLambdaForAWSSDKHandler() var lambda = new AmazonLambdaClient(new AnonymousAWSCredentials(), RegionEndpoint.USEast1); CustomResponses.SetResponse(lambda); _recorder.BeginSegment("lambda", TraceId); -#if NET45 +#if NETFRAMEWORK lambda.Invoke(new InvokeRequest { FunctionName = "testFunction" diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 42c7300f..dade9476 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -22,10 +22,6 @@ 0618;1701;1702;1705 - - NET45 - - TRACE;DEBUG 0618;1701;1702;1705 diff --git a/sdk/test/UnitTests/AWSXRayRecorderBuilderTests.cs b/sdk/test/UnitTests/AWSXRayRecorderBuilderTests.cs index 02c05d4c..4c98aaad 100644 --- a/sdk/test/UnitTests/AWSXRayRecorderBuilderTests.cs +++ b/sdk/test/UnitTests/AWSXRayRecorderBuilderTests.cs @@ -32,7 +32,7 @@ using Amazon.Runtime; -#if !NET45 +#if !NETFRAMEWORK using Microsoft.Extensions.Configuration; #endif @@ -44,7 +44,7 @@ public class AwsXrayRecorderBuilderTests : TestBase private const string PluginKey = "AWSXRayPlugins"; private const string UseRuntimeErrors = "UseRuntimeErrors"; private AWSXRayRecorder _recorder; -#if !NET45 +#if !NETFRAMEWORK private XRayOptions _xRayOptions = new XRayOptions(); #endif [TestInitialize] @@ -57,7 +57,7 @@ public void Initialize() public new void TestCleanup() { base.TestCleanup(); -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[PluginKey] = null; ConfigurationManager.AppSettings[UseRuntimeErrors] = null; AppSettings.Reset(); @@ -91,7 +91,7 @@ public void TestBuildWithDummyPlugin() public void TestWithDefaultPlugins() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[PluginKey] = "EC2Plugin"; AppSettings.Reset(); AWSXRayRecorderBuilder builder = new AWSXRayRecorderBuilder().WithPluginsFromAppSettings(); @@ -109,7 +109,7 @@ public void TestWithDefaultPlugins() [TestMethod] public void TestPluginSettingMissing() { -#if NET45 +#if NETFRAMEWORK var builder = new AWSXRayRecorderBuilder().WithPluginsFromAppSettings(); #else var builder = new AWSXRayRecorderBuilder().WithPluginsFromConfig(_xRayOptions); @@ -120,7 +120,7 @@ public void TestPluginSettingMissing() [TestMethod] public void TestInvalidPluginSetting() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[PluginKey] = "UnknownPlugin, IPlugin"; AppSettings.Reset(); AWSXRayRecorderBuilder builder = new AWSXRayRecorderBuilder().WithPluginsFromAppSettings(); @@ -162,7 +162,7 @@ public void TestSetContextMissingStrategy() [TestMethod] public void TestSetContextMissingUsingConfiguration1() // Contextmissing startegy set to log error from configuration { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[UseRuntimeErrors] = "false"; AppSettings.Reset(); AWSXRayRecorderBuilder builder = new AWSXRayRecorderBuilder().WithContextMissingStrategyFromAppSettings(); @@ -177,7 +177,7 @@ public void TestSetContextMissingUsingConfiguration1() // Contextmissing starteg [TestMethod] public void TestSetContextMissingUsingConfiguration2() // Contextmissing startegy not set { -#if NET45 +#if NETFRAMEWORK AppSettings.Reset(); AWSXRayRecorderBuilder builder = new AWSXRayRecorderBuilder().WithContextMissingStrategyFromAppSettings(); #else @@ -191,7 +191,7 @@ public void TestSetContextMissingUsingConfiguration2() // Contextmissing starteg public void TestSetContextMissingUsingConfiguration3() // Contextmissing startegy is set through environment and configurations { Environment.SetEnvironmentVariable(AWSXRayRecorder.EnvironmentVariableContextMissingStrategy, "LOG_ERROR"); -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[UseRuntimeErrors] = "true"; AppSettings.Reset(); AWSXRayRecorderBuilder builder = new AWSXRayRecorderBuilder().WithContextMissingStrategyFromAppSettings(); diff --git a/sdk/test/UnitTests/AWSXRayRecorderTests.cs b/sdk/test/UnitTests/AWSXRayRecorderTests.cs index 54871163..fa989927 100644 --- a/sdk/test/UnitTests/AWSXRayRecorderTests.cs +++ b/sdk/test/UnitTests/AWSXRayRecorderTests.cs @@ -43,7 +43,7 @@ public class AwsXrayRecorderTests : TestBase { private const string DisableXRayTracingKey = "DisableXRayTracing"; private AWSXRayRecorder _recorder; -#if !NET45 +#if !NETFRAMEWORK private XRayOptions _xRayOptions = new XRayOptions(); #endif @@ -57,7 +57,7 @@ public void Initialize() public new void TestCleanup() { base.TestCleanup(); -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[DisableXRayTracingKey] = string.Empty; AppSettings.Reset(); @@ -722,7 +722,7 @@ public void TestOverwriteSqlInformationKey() [TestMethod] public void TestDisableXRayTracingAndNoSegmentSent() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[DisableXRayTracingKey] = "true"; AppSettings.Reset(); #else @@ -730,12 +730,12 @@ public void TestDisableXRayTracingAndNoSegmentSent() #endif Mock mockSegmentEmitter = new Mock(); -#if NET45 +#if NETFRAMEWORK AppSettings.Reset(); #endif using (var recorder = AWSXRayRecorderFactory.CreateAWSXRayRecorder(mockSegmentEmitter.Object)) { -#if !NET45 +#if !NETFRAMEWORK recorder.XRayOptions = _xRayOptions; #endif recorder.BeginSegment("test", TraceId); @@ -775,7 +775,7 @@ public void TestXrayContext() .ProductVersion; Assert.AreEqual(versionText, xray["sdk_version"]); -#if NET45 +#if NETFRAMEWORK Assert.AreEqual("X-Ray for .NET", xray["sdk"]); #else Assert.AreEqual("X-Ray for .NET Core", xray["sdk"]); @@ -788,7 +788,7 @@ public void TestServiceContext() _recorder.BeginSegment("test", TraceId); var segment = (Segment)AWSXRayRecorder.Instance.TraceContext.GetEntity(); _recorder.EndSegment(); -#if NET45 +#if NETFRAMEWORK Assert.AreEqual(".NET Framework", segment.Service["runtime"]); #else Assert.AreEqual(".NET Core Framework", segment.Service["runtime"]); @@ -941,7 +941,7 @@ public void TestOverrideContextMissingStrategyToLogError() public void TestDefaultTraceContext() { var recorder = AWSXRayRecorder.Instance; -#if NET45 +#if NETFRAMEWORK Assert.AreEqual(typeof(CallContextContainer).FullName, recorder.TraceContext.GetType().FullName); #else Assert.AreEqual(typeof(AsyncLocalContextContainer).FullName, recorder.TraceContext.GetType().FullName); @@ -952,7 +952,7 @@ public void TestDefaultTraceContext() public void TestInitializeInstanceWithRecorder1() { AWSXRayRecorder recorder = BuildAWSXRayRecorder(new TestSamplingStrategy()); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(recorder); #else AWSXRayRecorder.InitializeInstance(recorder: recorder); @@ -970,7 +970,7 @@ public void TestInitializeInstanceWithRecorder2() // setting custom daemon addre IPEndPoint expectedUDPEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.2"), 2001); IPEndPoint expectedTCPEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 2000); AWSXRayRecorder recorder = BuildAWSXRayRecorder(new TestSamplingStrategy(), daemonAddress: daemonAddress); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(recorder); #else AWSXRayRecorder.InitializeInstance(recorder: recorder); @@ -991,7 +991,7 @@ public void TestInitializeInstanceWithRecorder3() // setting custom daemon addre IPEndPoint expectedUDPEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.2"), 2001); IPEndPoint expectedTCPEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 2000); AWSXRayRecorder recorder = BuildAWSXRayRecorder(daemonAddress: daemonAddress); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(recorder); #else AWSXRayRecorder.InitializeInstance(recorder: recorder); @@ -1014,7 +1014,7 @@ public void TestInitializeInstanceWithRecorder3() // setting custom daemon addre public void TestInitializeInstanceWithRecorde4() // Set custom trace context { AWSXRayRecorder recorder = BuildAWSXRayRecorder(traceContext:new DummyTraceContext()); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(recorder); #else AWSXRayRecorder.InitializeInstance(recorder: recorder); diff --git a/sdk/test/UnitTests/CauseTest.cs b/sdk/test/UnitTests/CauseTest.cs index 82ba3db3..200cb1e3 100644 --- a/sdk/test/UnitTests/CauseTest.cs +++ b/sdk/test/UnitTests/CauseTest.cs @@ -31,7 +31,7 @@ public class CauseTest : TestBase public void TestInitialize() { _recorder = new AWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); diff --git a/sdk/test/UnitTests/DbCommandInterceptorTests.cs b/sdk/test/UnitTests/DbCommandInterceptorTests.cs index c70f3331..10d6949c 100644 --- a/sdk/test/UnitTests/DbCommandInterceptorTests.cs +++ b/sdk/test/UnitTests/DbCommandInterceptorTests.cs @@ -59,7 +59,7 @@ public void TestInitialize() public new void TestCleanup() { base.TestCleanup(); -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[_collectSqlQueriesKey] = string.Empty; AppSettings.Reset(); #endif @@ -70,7 +70,7 @@ public void TestInitialize() public void Intercept_DoesNot_CollectQueries_When_NotEnabled() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions() }; @@ -94,7 +94,7 @@ public void Intercept_DoesNot_CollectQueries_When_NotEnabled() public async Task InterceptAsync_DoesNot_CollectQueries_When_NotEnabled() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions() }; @@ -118,7 +118,7 @@ public async Task InterceptAsync_DoesNot_CollectQueries_When_NotEnabled() public void Intercept_CollectsQueries_When_DisabledGlobally_And_EnabledLocally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = false } }; @@ -142,7 +142,7 @@ public void Intercept_CollectsQueries_When_DisabledGlobally_And_EnabledLocally() public async Task InterceptAsync_CollectsQueries_When_DisabledGlobally_And_EnabledLocally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = false } }; @@ -166,7 +166,7 @@ public async Task InterceptAsync_CollectsQueries_When_DisabledGlobally_And_Enabl public void Intercept_CollectsQueries_When_EnabledGlobally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = true } }; @@ -190,7 +190,7 @@ public void Intercept_CollectsQueries_When_EnabledGlobally() public async Task InterceptAsync_CollectsQueries_When_EnabledGlobally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = true } }; @@ -214,7 +214,7 @@ public async Task InterceptAsync_CollectsQueries_When_EnabledGlobally() public void Intercept_DoesNot_CollectQueries_When_EnabledGlobally_And_DisabledLocally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = true } }; @@ -238,7 +238,7 @@ public void Intercept_DoesNot_CollectQueries_When_EnabledGlobally_And_DisabledLo public async Task InterceptAsync_DoesNot_CollectQueries_When_EnabledGlobally_And_DisabledLocally() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions { CollectSqlQueries = true } }; @@ -262,7 +262,7 @@ public async Task InterceptAsync_DoesNot_CollectQueries_When_EnabledGlobally_And public void TestTrustedConnection_DoesNotCollectUserID() { // arrange -#if !NET45 +#if !NETFRAMEWORK var recorder = new AWSXRayRecorder { XRayOptions = new XRayOptions() }; diff --git a/sdk/test/UnitTests/HttpClientXRayTracingHandlerTests.cs b/sdk/test/UnitTests/HttpClientXRayTracingHandlerTests.cs index 77cc773f..964668c6 100644 --- a/sdk/test/UnitTests/HttpClientXRayTracingHandlerTests.cs +++ b/sdk/test/UnitTests/HttpClientXRayTracingHandlerTests.cs @@ -32,7 +32,7 @@ public HttpClientXRayTracingHandlerTests() public void TestInitialize() { _recorder = new AWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -77,7 +77,7 @@ public async Task TestSendAsync() public async Task TestXrayDisabledSendAsync() { _recorder = new MockAWSXRayRecorder() { IsTracingDisabledValue = true }; -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -117,7 +117,7 @@ public async Task Test404SendAsync() public async Task TestXrayContextMissingStrategySendAsync() // Test that respects ContextMissingStrategy { _recorder = new MockAWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); diff --git a/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs b/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs index 76b92a9d..e6f4684a 100644 --- a/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs +++ b/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs @@ -41,7 +41,7 @@ public class HttpWebRequestTracingExtensionTests : TestBase public void TestInitialize() { _recorder = new AWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -87,7 +87,7 @@ public void TestGetResponseTraced() public void TestXrayDisabledGetResponseTraced() { _recorder = new MockAWSXRayRecorder() { IsTracingDisabledValue = true }; -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -134,7 +134,7 @@ public async Task TestGetAsyncResponseTraced() public async Task TestXrayDisabledGetAsyncResponseTraced() { _recorder = new MockAWSXRayRecorder() { IsTracingDisabledValue = true }; -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); @@ -150,7 +150,7 @@ public async Task TestXrayDisabledGetAsyncResponseTraced() } } -#if !NET45 +#if !NETFRAMEWORK [TestMethod] public void TestExceptionGetResponseTraced() { @@ -222,7 +222,7 @@ public async Task TestExceptionGetAsyncResponseTraced() public async Task TestContextMissingStrategyGetAsyncResponseTraced() { _recorder = new AWSXRayRecorder(); -#if NET45 +#if NETFRAMEWORK AWSXRayRecorder.InitializeInstance(_recorder); #else AWSXRayRecorder.InitializeInstance(recorder: _recorder); diff --git a/sdk/test/UnitTests/LocalizedSamplingStrategyTests.cs b/sdk/test/UnitTests/LocalizedSamplingStrategyTests.cs index 85b1ee9f..709d1aa5 100644 --- a/sdk/test/UnitTests/LocalizedSamplingStrategyTests.cs +++ b/sdk/test/UnitTests/LocalizedSamplingStrategyTests.cs @@ -34,14 +34,14 @@ namespace Amazon.XRay.Recorder.UnitTests public class LocalizedSamplingStrategyTests { private const string ManifestKey = "SamplingRuleManifest"; -#if !NET45 +#if !NETFRAMEWORK private XRayOptions _xRayOtions = new XRayOptions(); #endif [TestCleanup] public void TestCleanup() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = null; AppSettings.Reset(); #else @@ -115,7 +115,7 @@ public void TestDefaultRuleWithRequest() [TestMethod] public void TestLoadJsonConfiguration() // version 1 { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = @"JSONs\DefaultSamplingRules.json"; AppSettings.Reset(); var strategy = new LocalizedSamplingStrategy(AppSettings.SamplingRuleManifest); @@ -143,7 +143,7 @@ public void TestLoadJsonConfiguration() // version 1 [TestMethod] public void TestLoadJsonConfiguration1() // Version 2 { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = @"JSONs\DefaultSamplingRules1.json"; AppSettings.Reset(); var strategy = new LocalizedSamplingStrategy(AppSettings.SamplingRuleManifest); @@ -173,7 +173,7 @@ public void TestLoadJsonConfiguration1() // Version 2 [ExpectedException(typeof(InvalidSamplingConfigurationException))] public void TestLoadSamplingRulesWithoutDefaultRule() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = @"JSONs\SamplingRulesWithoutDefault.json"; AppSettings.Reset(); var strategy = new LocalizedSamplingStrategy(AppSettings.SamplingRuleManifest); @@ -187,7 +187,7 @@ public void TestLoadSamplingRulesWithoutDefaultRule() [ExpectedException(typeof(InvalidSamplingConfigurationException))] public void TestLoadSamplingRulesWithInvalidVersion1() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = @"JSONs\SamplingRulesInvalidV1.json"; AppSettings.Reset(); var strategy = new LocalizedSamplingStrategy(AppSettings.SamplingRuleManifest); @@ -201,7 +201,7 @@ public void TestLoadSamplingRulesWithInvalidVersion1() [ExpectedException(typeof(InvalidSamplingConfigurationException))] public void TestLoadSamplingRulesWithInvalidVersion2() { -#if NET45 +#if NETFRAMEWORK ConfigurationManager.AppSettings[ManifestKey] = @"JSONs\SamplingRulesInvalidV2.json"; AppSettings.Reset(); var strategy = new LocalizedSamplingStrategy(AppSettings.SamplingRuleManifest); diff --git a/sdk/test/UnitTests/SegmentNamingStrategyTests.cs b/sdk/test/UnitTests/SegmentNamingStrategyTests.cs index 74db2aa2..8da89293 100644 --- a/sdk/test/UnitTests/SegmentNamingStrategyTests.cs +++ b/sdk/test/UnitTests/SegmentNamingStrategyTests.cs @@ -19,7 +19,7 @@ using System.Net.Http; using Amazon.XRay.Recorder.Core.Strategies; using Microsoft.VisualStudio.TestTools.UnitTesting; -#if !NET45 +#if !NETFRAMEWORK using Microsoft.AspNetCore.Http; #endif @@ -28,7 +28,7 @@ namespace Amazon.XRay.Recorder.UnitTests [TestClass] public class SegmentNamingStrategyTests { -#if NET45 +#if NETFRAMEWORK private HttpRequestMessage _request; #else private HttpRequest _request; @@ -36,7 +36,7 @@ public class SegmentNamingStrategyTests [TestInitialize] public void TestInitialize() { -#if NET45 +#if NETFRAMEWORK _request = new HttpRequestMessage(); #else _request = new DefaultHttpContext().Request; diff --git a/sdk/test/UnitTests/SegmentTests.cs b/sdk/test/UnitTests/SegmentTests.cs index 5b32ab01..b9109bf9 100644 --- a/sdk/test/UnitTests/SegmentTests.cs +++ b/sdk/test/UnitTests/SegmentTests.cs @@ -312,7 +312,7 @@ public void TestHttpOverwriteValue() } -#if NET45 +#if NETFRAMEWORK [TestMethod] public void TestSegmentIsSerializable() { diff --git a/sdk/test/UnitTests/Tools/CustomResponses.cs b/sdk/test/UnitTests/Tools/CustomResponses.cs index e81f47af..5196305a 100644 --- a/sdk/test/UnitTests/Tools/CustomResponses.cs +++ b/sdk/test/UnitTests/Tools/CustomResponses.cs @@ -29,7 +29,7 @@ namespace Amazon.XRay.Recorder.UnitTests.Tools { public static class CustomResponses { -#if NET45 +#if NETFRAMEWORK public static void SetResponse( AmazonServiceClient client, string requestId = null, string s3ExtendedRequestId = null, string content = null, bool isOK = true) { diff --git a/sdk/test/UnitTests/Tools/MockWebResponse.cs b/sdk/test/UnitTests/Tools/MockWebResponse.cs index 1af0eb42..8ee5a201 100644 --- a/sdk/test/UnitTests/Tools/MockWebResponse.cs +++ b/sdk/test/UnitTests/Tools/MockWebResponse.cs @@ -27,7 +27,7 @@ namespace Amazon.XRay.Recorder.UnitTests.Tools { public class MockWebResponse { -#if NET45 +#if NETFRAMEWORK public static HttpWebResponse CreateFromResource(string resourceName) { var rawResponse = Utils.GetResourceText(resourceName); From 0438761ea9bc61fe80b470ad035255226d3fc9e2 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:13:29 -0500 Subject: [PATCH 02/14] Use netframework file name rather than net45 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 6 +++--- ...tainer.net45.cs => CallContextContainer.netframework.cs} | 2 +- ...iner.net45.cs => HybridContextContainer.netframework.cs} | 2 +- .../{AppSettings.net45.cs => AppSettings.netframework.cs} | 0 .../AWSXRayRecorder.Handlers.EntityFramework.csproj | 2 +- ...EFInterceptor.net45.cs => EFInterceptor.netframework.cs} | 2 +- .../SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj | 2 +- ...Command.net45.cs => TraceableSqlCommand.netframework.cs} | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename sdk/src/Core/Internal/Context/{CallContextContainer.net45.cs => CallContextContainer.netframework.cs} (97%) rename sdk/src/Core/Internal/Context/{HybridContextContainer.net45.cs => HybridContextContainer.netframework.cs} (98%) rename sdk/src/Core/Internal/Utils/{AppSettings.net45.cs => AppSettings.netframework.cs} (100%) rename sdk/src/Handlers/EntityFramework/{EFInterceptor.net45.cs => EFInterceptor.netframework.cs} (98%) rename sdk/src/Handlers/SqlServer/{TraceableSqlCommand.net45.cs => TraceableSqlCommand.netframework.cs} (99%) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 49a169f8..c729e15b 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -52,9 +52,9 @@ - - - + + + diff --git a/sdk/src/Core/Internal/Context/CallContextContainer.net45.cs b/sdk/src/Core/Internal/Context/CallContextContainer.netframework.cs similarity index 97% rename from sdk/src/Core/Internal/Context/CallContextContainer.net45.cs rename to sdk/src/Core/Internal/Context/CallContextContainer.netframework.cs index d92cc770..3f4151a1 100644 --- a/sdk/src/Core/Internal/Context/CallContextContainer.net45.cs +++ b/sdk/src/Core/Internal/Context/CallContextContainer.netframework.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// +// // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/sdk/src/Core/Internal/Context/HybridContextContainer.net45.cs b/sdk/src/Core/Internal/Context/HybridContextContainer.netframework.cs similarity index 98% rename from sdk/src/Core/Internal/Context/HybridContextContainer.net45.cs rename to sdk/src/Core/Internal/Context/HybridContextContainer.netframework.cs index 6012b1ab..629786bb 100644 --- a/sdk/src/Core/Internal/Context/HybridContextContainer.net45.cs +++ b/sdk/src/Core/Internal/Context/HybridContextContainer.netframework.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// +// // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/sdk/src/Core/Internal/Utils/AppSettings.net45.cs b/sdk/src/Core/Internal/Utils/AppSettings.netframework.cs similarity index 100% rename from sdk/src/Core/Internal/Utils/AppSettings.net45.cs rename to sdk/src/Core/Internal/Utils/AppSettings.netframework.cs diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index ca9b4cba..3087e630 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -33,7 +33,7 @@ - + diff --git a/sdk/src/Handlers/EntityFramework/EFInterceptor.net45.cs b/sdk/src/Handlers/EntityFramework/EFInterceptor.netframework.cs similarity index 98% rename from sdk/src/Handlers/EntityFramework/EFInterceptor.net45.cs rename to sdk/src/Handlers/EntityFramework/EFInterceptor.netframework.cs index 70825467..4d9937e4 100644 --- a/sdk/src/Handlers/EntityFramework/EFInterceptor.net45.cs +++ b/sdk/src/Handlers/EntityFramework/EFInterceptor.netframework.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// +// // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index b21bd430..7cf5174c 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -34,7 +34,7 @@ - + diff --git a/sdk/src/Handlers/SqlServer/TraceableSqlCommand.net45.cs b/sdk/src/Handlers/SqlServer/TraceableSqlCommand.netframework.cs similarity index 99% rename from sdk/src/Handlers/SqlServer/TraceableSqlCommand.net45.cs rename to sdk/src/Handlers/SqlServer/TraceableSqlCommand.netframework.cs index e86705ff..b7923df6 100644 --- a/sdk/src/Handlers/SqlServer/TraceableSqlCommand.net45.cs +++ b/sdk/src/Handlers/SqlServer/TraceableSqlCommand.netframework.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// +// // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). From 8a32afca5a1834dc09105cfbf00b31f3e710176a Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:20:16 -0500 Subject: [PATCH 03/14] Target net462 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 8 ++--- .../AWSXRayRecorder.Handlers.AspNet.csproj | 4 +-- .../AWSXRayRecorder.Handlers.AwsSdk.csproj | 4 +-- ...ayRecorder.Handlers.EntityFramework.csproj | 6 ++-- .../AWSXRayRecorder.Handlers.SqlServer.csproj | 4 +-- ...AWSXRayRecorder.Handlers.System.Net.csproj | 2 +- .../AWSXRayRecorder.IntegrationTests.csproj | 2 +- .../AWSXRayRecorder.SmokeTests.csproj | 2 +- .../AWSXRayRecorder.UnitTests.csproj | 29 ++++--------------- 9 files changed, 21 insertions(+), 40 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index c729e15b..243d9736 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0;netcoreapp3.1 + net462;netstandard2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -51,14 +51,14 @@ - + - + @@ -67,7 +67,7 @@ - + diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 5644af64..9f8f6b87 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -1,7 +1,7 @@  - net45 + net462 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -33,7 +33,7 @@ - + diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index 95d32ab4..12bc3585 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0 + net462;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -37,7 +37,7 @@ - + diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index 3087e630..5d43a286 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -1,7 +1,7 @@ - + - net45;netstandard2.0 + net462;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -36,7 +36,7 @@ - + diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index 7cf5174c..477ef3ca 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0 + net462;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -33,7 +33,7 @@ - + diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index 6801c864..ba95ec55 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0 + net462;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index 62e5fdd0..5896d33d 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net45;netcoreapp2.0;netcoreapp3.1 + net462;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index 782252f6..0deac308 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -1,7 +1,7 @@  - net452;netcoreapp2.0;netcoreapp3.1 + net462;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index dade9476..3ac29f94 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -2,7 +2,7 @@ - net452;netcoreapp2.0;netcoreapp3.1 + net462;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -12,31 +12,12 @@ ../../../buildtools/local-development.snk - - - TRACE;DEBUG - 0618;1701;1702;1705 - - - - 0618;1701;1702;1705 - - - - TRACE;DEBUG - 0618;1701;1702;1705 - - - - 0618;1701;1702;1705 - - - + TRACE;DEBUG 0618;1701;1702;1705 - + 0618;1701;1702;1705 @@ -79,7 +60,7 @@ - + @@ -87,7 +68,7 @@ - + From 877e128c20b3dbc6c90adafba4ed9246f135ed35 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:28:29 -0500 Subject: [PATCH 04/14] Add targets for net472 and net48 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 8 ++++---- .../AspNet/AWSXRayRecorder.Handlers.AspNet.csproj | 7 ++----- .../AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj | 4 ++-- ...WSXRayRecorder.Handlers.EntityFramework.csproj | 4 ++-- .../AWSXRayRecorder.Handlers.SqlServer.csproj | 4 ++-- .../AWSXRayRecorder.Handlers.System.Net.csproj | 2 +- .../AWSXRayRecorder.IntegrationTests.csproj | 2 +- .../SmokeTests/AWSXRayRecorder.SmokeTests.csproj | 2 +- .../UnitTests/AWSXRayRecorder.UnitTests.csproj | 15 ++++++++------- 9 files changed, 23 insertions(+), 25 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 243d9736..c842cc82 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.0;netcoreapp3.1 + net462;net472;net48;netstandard2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -51,14 +51,14 @@ - + - + @@ -67,7 +67,7 @@ - + diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 9f8f6b87..2a49df55 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -1,7 +1,7 @@  - net462 + net462;net472;net48 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -33,11 +33,8 @@ - - - - + diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index 12bc3585..2f114893 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.0 + net462;net472;net48;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -37,7 +37,7 @@ - + diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index 5d43a286..de73896b 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.0 + net462;net472;net48;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -36,7 +36,7 @@ - + diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index 477ef3ca..30dc0e15 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.0 + net462;net472;net48;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -33,7 +33,7 @@ - + diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index ba95ec55..58e5882f 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.0 + net462;net472;net48;netstandard2.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index 5896d33d..eb078782 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net462;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index 0deac308..f86c1780 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -1,7 +1,7 @@  - net462;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 3ac29f94..63537baf 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -2,7 +2,7 @@ - net462;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -60,7 +60,7 @@ - + @@ -68,9 +68,14 @@ - + + + + + + @@ -81,10 +86,6 @@ - - - - From 4ddb206a263d403aa8b2ed91541036b844d4e472 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:29:50 -0500 Subject: [PATCH 05/14] Remove netcoreapp2.0 target from tests, out of support --- .../AWSXRayRecorder.IntegrationTests.csproj | 2 +- .../SmokeTests/AWSXRayRecorder.SmokeTests.csproj | 2 +- .../UnitTests/AWSXRayRecorder.UnitTests.csproj | 15 +++------------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index eb078782..c18799fd 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net462;net472;net48;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index f86c1780..92935185 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 63537baf..4cf20a2e 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -2,7 +2,7 @@ - net462;net472;net48;netcoreapp2.0;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -29,29 +29,20 @@ - - - - - - - - - - - + + From 3120dd0b36121d162683641fd3bf54918c0334cd Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:44:18 -0500 Subject: [PATCH 06/14] Update to latest AWSSDK v3.5 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 2 +- .../AWSXRayRecorder.IntegrationTests.csproj | 9 ++++----- sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj | 5 ++++- sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj | 9 ++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index c842cc82..2aaa8a26 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -38,7 +38,7 @@ - + diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index c18799fd..ec8b15fd 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -13,11 +13,10 @@ - - - - - + + + + diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index 92935185..24bf2c33 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -12,7 +12,10 @@ - + + + + diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 4cf20a2e..f220d708 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -22,11 +22,10 @@ - - - - - + + + + From e7880e77b8b591502e89d40da9fd9a23061b30b7 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 15:45:12 -0500 Subject: [PATCH 07/14] Update to aws sdk v3.7 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 2 +- .../AWSXRayRecorder.IntegrationTests.csproj | 8 ++++---- sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 2aaa8a26..c28fb5bc 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -38,7 +38,7 @@ - + diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index ec8b15fd..98daecd2 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index f220d708..65b63c42 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -22,10 +22,10 @@ - - - - + + + + From bda7fc03c3acb0d264e08db45fe4b734719747d4 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 16:48:10 -0500 Subject: [PATCH 08/14] Add support for net6.0 --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 12 ++- ...AWSXRayRecorder.Handlers.AspNetCore.csproj | 7 +- .../AWSXRayRecorder.Handlers.AwsSdk.csproj | 2 +- ...ayRecorder.Handlers.EntityFramework.csproj | 15 ++- .../Handlers/EntityFramework/EFInterceptor.cs | 96 +++++++++++++++++++ .../AWSXRayRecorder.Handlers.SqlServer.csproj | 12 +-- ...AWSXRayRecorder.Handlers.System.Net.csproj | 4 +- .../AWSXRayRecorder.IntegrationTests.csproj | 2 +- .../AWSXRayRecorder.SmokeTests.csproj | 2 +- .../AWSXRayRecorder.UnitTests.csproj | 12 ++- sdk/test/UnitTests/EfCoreTests.cs | 4 + .../HttpWebRequestTracingExtensionTests.cs | 50 +++++++++- sdk/test/UnitTests/SegmentTests.cs | 2 +- 13 files changed, 192 insertions(+), 28 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index c28fb5bc..f3856472 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netstandard2.0;netcoreapp3.1 + net462;net472;net48;netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -42,15 +42,19 @@ - - - + + + + + + + diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index 5c1bb088..242222f2 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -1,6 +1,6 @@  - netstandard2.0;netcoreapp3.1 + netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -29,7 +29,6 @@ - @@ -37,6 +36,10 @@ + + + + diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index 2f114893..94d9292f 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netstandard2.0 + net462;net472;net48;netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index de73896b..82091004 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netstandard2.0 + net462;net472;net48;netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -32,6 +32,19 @@ + + + + + + + + + + + + + diff --git a/sdk/src/Handlers/EntityFramework/EFInterceptor.cs b/sdk/src/Handlers/EntityFramework/EFInterceptor.cs index 071d7e8d..8d613833 100644 --- a/sdk/src/Handlers/EntityFramework/EFInterceptor.cs +++ b/sdk/src/Handlers/EntityFramework/EFInterceptor.cs @@ -57,6 +57,21 @@ public override DbDataReader ReaderExecuted(DbCommand command, CommandExecutedEv return base.ReaderExecuted(command, eventData, result); } +#if NET6_0 + /// + /// Trace after executing reader asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result from . + /// Instance of . + /// Task representing the async operation. + public override ValueTask> ReaderExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); + return base.ReaderExecutingAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace before executing reader asynchronously. /// @@ -70,7 +85,23 @@ public override Task> ReaderExecutingAsync(DbCo EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); return base.ReaderExecutingAsync(command, eventData, result, cancellationToken); } +#endif +#if NET6_0 + /// + /// Trace after executing reader asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result from . + /// Instance of . + /// Task representing the async operation. + public override ValueTask ReaderExecutedAsync(DbCommand command, CommandExecutedEventData eventData, DbDataReader result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessEndCommand(); + return base.ReaderExecutedAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace after executing reader asynchronously. /// @@ -84,6 +115,7 @@ public override Task ReaderExecutedAsync(DbCommand command, Comman EFUtil.ProcessEndCommand(); return base.ReaderExecutedAsync(command, eventData, result, cancellationToken); } +#endif /// /// Trace after command fails. @@ -122,6 +154,21 @@ public override InterceptionResult NonQueryExecuting(DbCommand command, Com return base.NonQueryExecuting(command, eventData, result); } +#if NET6_0 + /// + /// Trace before executing asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result from . + /// Instance of . + /// Task representing the async operation. + public override ValueTask> NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); + return base.NonQueryExecutingAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace before executing asynchronously. /// @@ -135,6 +182,7 @@ public override Task> NonQueryExecutingAsync(DbCommand c EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); return base.NonQueryExecutingAsync(command, eventData, result, cancellationToken); } +#endif /// /// Trace after executing. @@ -149,6 +197,21 @@ public override int NonQueryExecuted(DbCommand command, CommandExecutedEventData return base.NonQueryExecuted(command, eventData, result); } +#if NET6_0 + /// + /// Trace after executing asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result as integer. + /// Instance of . + /// Task representing the async operation. + public override ValueTask NonQueryExecutedAsync(DbCommand command, CommandExecutedEventData eventData, int result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessEndCommand(); + return base.NonQueryExecutedAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace after executing asynchronously. /// @@ -162,6 +225,7 @@ public override Task NonQueryExecutedAsync(DbCommand command, CommandExecut EFUtil.ProcessEndCommand(); return base.NonQueryExecutedAsync(command, eventData, result, cancellationToken); } +#endif /// /// Trace before executing scalar. @@ -176,6 +240,21 @@ public override InterceptionResult ScalarExecuting(DbCommand command, Co return base.ScalarExecuting(command, eventData, result); } +#if NET6_0 + /// + /// Trace before executing scalar asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result from . + /// Instance of . + /// Task representing the async operation. + public override ValueTask> ScalarExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); + return base.ScalarExecutingAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace before executing scalar asynchronously. /// @@ -189,6 +268,7 @@ public override Task> ScalarExecutingAsync(DbCommand EFUtil.ProcessBeginCommand(command, _collectSqlQueriesOverride); return base.ScalarExecutingAsync(command, eventData, result, cancellationToken); } +#endif /// /// Trace after executing scalar. @@ -203,6 +283,21 @@ public override object ScalarExecuted(DbCommand command, CommandExecutedEventDat return base.ScalarExecuted(command, eventData, result); } +#if NET6_0 + /// + /// Trace after executing scalar asynchronously. + /// + /// Instance of . + /// Instance of . + /// Result object. + /// Instance of . + /// Task representing the async operation. + public override ValueTask ScalarExecutedAsync(DbCommand command, CommandExecutedEventData eventData, object result, CancellationToken cancellationToken = default) + { + EFUtil.ProcessEndCommand(); + return base.ScalarExecutedAsync(command, eventData, result, cancellationToken); + } +#else /// /// Trace after executing scalar asynchronously. /// @@ -216,5 +311,6 @@ public override Task ScalarExecutedAsync(DbCommand command, CommandExecu EFUtil.ProcessEndCommand(); return base.ScalarExecutedAsync(command, eventData, result, cancellationToken); } +#endif } } \ No newline at end of file diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index 30dc0e15..e2d9a944 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netstandard2.0 + net462;net472;net48;netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -36,15 +36,11 @@ - + - - - 4.4.0 - + + - - \ No newline at end of file diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index 58e5882f..85ac624b 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netstandard2.0 + net462;net472;net48;netstandard2.0;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -33,7 +33,7 @@ - + diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index 98daecd2..ca577598 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net462;net472;net48;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index 24bf2c33..6782d24c 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -1,7 +1,7 @@  - net462;net472;net48;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 65b63c42..da943739 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -2,7 +2,7 @@ - net462;net472;net48;netcoreapp3.1 + net462;net472;net48;netcoreapp3.1;net6.0 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -35,6 +35,14 @@ + + + + + + + + @@ -51,8 +59,6 @@ - - diff --git a/sdk/test/UnitTests/EfCoreTests.cs b/sdk/test/UnitTests/EfCoreTests.cs index ce4c5139..106b1a15 100644 --- a/sdk/test/UnitTests/EfCoreTests.cs +++ b/sdk/test/UnitTests/EfCoreTests.cs @@ -95,7 +95,11 @@ public void Test_EFCore_query_with_exception() try { +#if NET6_0 + context.Database.ExecuteSqlInterpolated($"Select * From FakeTable"); // A false sql command which results in 'no such table: FakeTable' exception +#else context.Database.ExecuteSqlCommand("Select * From FakeTable"); // A false sql command which results in 'no such table: FakeTable' exception +#endif } catch { diff --git a/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs b/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs index e6f4684a..09fe7859 100644 --- a/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs +++ b/sdk/test/UnitTests/HttpWebRequestTracingExtensionTests.cs @@ -59,7 +59,13 @@ public void TestInitialize() [TestMethod] public void TestGetResponseTraced() { +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = (HttpWebRequest)WebRequest.Create(URL); +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif AWSXRayRecorder.Instance.BeginSegment("parent", TraceId); using (request.GetResponseTraced()) @@ -94,8 +100,14 @@ public void TestXrayDisabledGetResponseTraced() # endif Assert.IsTrue(AWSXRayRecorder.Instance.IsTracingDisabled()); +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = (HttpWebRequest)WebRequest.Create(URL); - +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif + using (var response = request.GetResponseTraced() as HttpWebResponse) { Assert.IsNotNull(response); @@ -106,7 +118,13 @@ public void TestXrayDisabledGetResponseTraced() [TestMethod] public async Task TestGetAsyncResponseTraced() { +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = (HttpWebRequest)WebRequest.Create(URL); +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif AWSXRayRecorder.Instance.BeginSegment("parent", TraceId); using (await request.GetAsyncResponseTraced()) @@ -141,8 +159,14 @@ public async Task TestXrayDisabledGetAsyncResponseTraced() # endif Assert.IsTrue(AWSXRayRecorder.Instance.IsTracingDisabled()); +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = (HttpWebRequest)WebRequest.Create(URL); - +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif + using (var response = await request.GetAsyncResponseTraced() as HttpWebResponse) { Assert.IsNotNull(response); @@ -154,7 +178,13 @@ public async Task TestXrayDisabledGetAsyncResponseTraced() [TestMethod] public void TestExceptionGetResponseTraced() { - var request = (HttpWebRequest)WebRequest.Create(URL404); +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete + var request = (HttpWebRequest)WebRequest.Create(URL); +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif AWSXRayRecorder.Instance.BeginSegment("parent", TraceId); try @@ -187,7 +217,13 @@ public void TestExceptionGetResponseTraced() [TestMethod] public async Task TestExceptionGetAsyncResponseTraced() { - var request = (HttpWebRequest)WebRequest.Create(URL404); +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete + var request = (HttpWebRequest)WebRequest.Create(URL); +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif AWSXRayRecorder.Instance.BeginSegment("parent", TraceId); try @@ -236,7 +272,13 @@ public async Task TestContextMissingStrategyGetAsyncResponseTraced() // The test should not break. No segment is available in the context, however, since the context missing strategy is log error, // no exception should be thrown by below code. +#if NET6_0 +#pragma warning disable SYSLIB0014 // Type or member is obsolete var request = (HttpWebRequest)WebRequest.Create(URL); +#pragma warning restore SYSLIB0014 // Type or member is obsolete +#else + var request = (HttpWebRequest)WebRequest.Create(URL); +#endif using (var response = await request.GetAsyncResponseTraced() as HttpWebResponse) { diff --git a/sdk/test/UnitTests/SegmentTests.cs b/sdk/test/UnitTests/SegmentTests.cs index b9109bf9..21ba0af6 100644 --- a/sdk/test/UnitTests/SegmentTests.cs +++ b/sdk/test/UnitTests/SegmentTests.cs @@ -367,7 +367,6 @@ public void TestSubsegmentIsSerializable() Assert.AreEqual(type, subsegmentAfterSerialize.Type); Assert.AreEqual(precursorId, subsegmentAfterSerialize.PrecursorIds.First()); } -#endif private object SerializeAndDeserialize(Object source) { @@ -379,6 +378,7 @@ private object SerializeAndDeserialize(Object source) stream.Close(); return obj; } +#endif [TestMethod] public void TestSetUser() From 49c9f8136ffbf05d1a179b48282d72ff39c10586 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 16:55:27 -0500 Subject: [PATCH 09/14] Resolve 3001 warnings; these assemblies are not cls compliant --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 4 ++-- sdk/src/Core/Properties/AssemblyInfo.cs | 2 +- sdk/src/Handlers/AspNet/Properties/AssemblyInfo.cs | 2 +- sdk/src/Handlers/AwsSdk/Properties/AssemblyInfo.cs | 2 +- sdk/src/Handlers/SqlServer/Properties/AssemblyInfo.cs | 2 +- sdk/src/Handlers/System.Net/Properties/AssemblyInfo.cs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index f3856472..579fc701 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591;1587;1572;1573;3001 + 1701;1702;1705;1591;1587;1572;1573 - 1701;1702;1705;1591;1587;1572;1573;3001 + 1701;1702;1705;1591;1587;1572;1573 diff --git a/sdk/src/Core/Properties/AssemblyInfo.cs b/sdk/src/Core/Properties/AssemblyInfo.cs index 92fef342..e76fc83f 100644 --- a/sdk/src/Core/Properties/AssemblyInfo.cs +++ b/sdk/src/Core/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; [assembly: ComVisible(false)] -[assembly: CLSCompliant(true)] +[assembly: CLSCompliant(false)] [assembly: InternalsVisibleTo("AWSXRayRecorder.UnitTests,PublicKey="+ "0024000004800000940000000602000000240000525341310004000001000100712913451f6deb" + "158da1d2129b21119cca7d4eebeef5b310e8acd7f2d9506346071207652f1210a3bfa1545d6897" diff --git a/sdk/src/Handlers/AspNet/Properties/AssemblyInfo.cs b/sdk/src/Handlers/AspNet/Properties/AssemblyInfo.cs index 27f435a1..789f20a1 100644 --- a/sdk/src/Handlers/AspNet/Properties/AssemblyInfo.cs +++ b/sdk/src/Handlers/AspNet/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System; using System.Runtime.InteropServices; -[assembly: CLSCompliant(true)] +[assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/sdk/src/Handlers/AwsSdk/Properties/AssemblyInfo.cs b/sdk/src/Handlers/AwsSdk/Properties/AssemblyInfo.cs index 27f435a1..789f20a1 100644 --- a/sdk/src/Handlers/AwsSdk/Properties/AssemblyInfo.cs +++ b/sdk/src/Handlers/AwsSdk/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System; using System.Runtime.InteropServices; -[assembly: CLSCompliant(true)] +[assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/sdk/src/Handlers/SqlServer/Properties/AssemblyInfo.cs b/sdk/src/Handlers/SqlServer/Properties/AssemblyInfo.cs index 27f435a1..789f20a1 100644 --- a/sdk/src/Handlers/SqlServer/Properties/AssemblyInfo.cs +++ b/sdk/src/Handlers/SqlServer/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System; using System.Runtime.InteropServices; -[assembly: CLSCompliant(true)] +[assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/sdk/src/Handlers/System.Net/Properties/AssemblyInfo.cs b/sdk/src/Handlers/System.Net/Properties/AssemblyInfo.cs index b4e1d9f9..e65800a6 100644 --- a/sdk/src/Handlers/System.Net/Properties/AssemblyInfo.cs +++ b/sdk/src/Handlers/System.Net/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System; using System.Runtime.InteropServices; -[assembly: CLSCompliant(true)] +[assembly: CLSCompliant(false)] [assembly: ComVisible(false)] \ No newline at end of file From 409fa22f4d82973a675da66a64738650c93c9aab Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 17:05:38 -0500 Subject: [PATCH 10/14] Remove NoWarn for 1701 - not producing any warnings --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 4 ++-- .../Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj | 4 ++-- .../AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj | 4 ++-- .../Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj | 4 ++-- .../AWSXRayRecorder.Handlers.EntityFramework.csproj | 4 ++-- .../SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj | 4 ++-- .../System.Net/AWSXRayRecorder.Handlers.System.Net.csproj | 4 ++-- sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 579fc701..045c05a2 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 2a49df55..3cb480a9 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index 242222f2..27e6f3d2 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -21,11 +21,11 @@ - 1701;1702;1705;1591;1573;1587 + 1702;1705;1591;1573;1587 - 1701;1702;1705;1591;1587;1573;1572 + 1702;1705;1591;1587;1573;1572 diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index 94d9292f..6eadbeb7 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591 + 1702;1705;1591 - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index 82091004..009a1993 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -23,11 +23,11 @@ - 1701;1702;1591; + 1702;1591; - 1701;1702;1591; + 1702;1591; diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index e2d9a944..745e6cd1 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index 85ac624b..be86e686 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -22,11 +22,11 @@ - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 - 1701;1702;1705;1591;1587;1572;1573 + 1702;1705;1591;1587;1572;1573 diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index da943739..ed8ad704 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -14,11 +14,11 @@ TRACE;DEBUG - 0618;1701;1702;1705 + 0618;1702;1705 - 0618;1701;1702;1705 + 0618;1702;1705 From 9c40bfe32d0318f749c5f25ec71efa9409c41ae1 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 17:06:41 -0500 Subject: [PATCH 11/14] Remove NoWarn for 1702 - no warnings --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 4 ++-- .../Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj | 4 ++-- .../AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj | 4 ++-- .../Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj | 4 ++-- .../AWSXRayRecorder.Handlers.EntityFramework.csproj | 4 ++-- .../SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj | 4 ++-- .../System.Net/AWSXRayRecorder.Handlers.System.Net.csproj | 4 ++-- sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 045c05a2..62a66c4e 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -22,11 +22,11 @@ - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 3cb480a9..4c632b12 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -22,11 +22,11 @@ - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index 27e6f3d2..f010e135 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -21,11 +21,11 @@ - 1702;1705;1591;1573;1587 + 1705;1591;1573;1587 - 1702;1705;1591;1587;1573;1572 + 1705;1591;1587;1573;1572 diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index 6eadbeb7..c51d76e3 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -22,11 +22,11 @@ - 1702;1705;1591 + 1705;1591 - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index 009a1993..2c6618ba 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -23,11 +23,11 @@ - 1702;1591; + 1591; - 1702;1591; + 1591; diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index 745e6cd1..b339ff50 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -22,11 +22,11 @@ - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index be86e686..80e6af2f 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -22,11 +22,11 @@ - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 - 1702;1705;1591;1587;1572;1573 + 1705;1591;1587;1572;1573 diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index ed8ad704..665bdab3 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -14,11 +14,11 @@ TRACE;DEBUG - 0618;1702;1705 + 0618;1705 - 0618;1702;1705 + 0618;1705 From a27c840c01ecd4fc7d6664cad42cb343ab127026 Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 17:07:47 -0500 Subject: [PATCH 12/14] Remove NoWarn for 1705; no warnings --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 4 ++-- .../Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj | 4 ++-- .../AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj | 4 ++-- .../Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj | 4 ++-- .../SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj | 4 ++-- .../System.Net/AWSXRayRecorder.Handlers.System.Net.csproj | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 62a66c4e..249c0782 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -22,11 +22,11 @@ - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 4c632b12..5ad416b3 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -22,11 +22,11 @@ - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index f010e135..cd715736 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -21,11 +21,11 @@ - 1705;1591;1573;1587 + 1591;1573;1587 - 1705;1591;1587;1573;1572 + 1591;1587;1573;1572 diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index c51d76e3..fc47e48b 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -22,11 +22,11 @@ - 1705;1591 + 1591 - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index b339ff50..c35f89b0 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -22,11 +22,11 @@ - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index 80e6af2f..0b8cbe02 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -22,11 +22,11 @@ - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 - 1705;1591;1587;1572;1573 + 1591;1587;1572;1573 From 0285671f4c18ff24ee8ef0197dae3b97b00ad75b Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Sun, 2 Jan 2022 17:11:11 -0500 Subject: [PATCH 13/14] Clean up NoWarn duplications --- sdk/src/Core/AWSXRayRecorder.Core.csproj | 6 +----- .../Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj | 6 +----- .../AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj | 6 +----- .../Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj | 6 +----- .../AWSXRayRecorder.Handlers.EntityFramework.csproj | 6 +----- .../SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj | 6 +----- .../System.Net/AWSXRayRecorder.Handlers.System.Net.csproj | 6 +----- sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj | 7 +------ 8 files changed, 8 insertions(+), 41 deletions(-) diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 249c0782..6314c8a9 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -21,11 +21,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591;1587;1572;1573 - - - + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj index 5ad416b3..f360aeba 100644 --- a/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj +++ b/sdk/src/Handlers/AspNet/AWSXRayRecorder.Handlers.AspNet.csproj @@ -21,11 +21,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591;1587;1572;1573 - - - + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index cd715736..09a960d1 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -20,11 +20,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591;1573;1587 - - - + 1591;1587;1573;1572 diff --git a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj index fc47e48b..9ff83fdc 100644 --- a/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj +++ b/sdk/src/Handlers/AwsSdk/AWSXRayRecorder.Handlers.AwsSdk.csproj @@ -21,11 +21,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591 - - - + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj index 2c6618ba..92457b28 100644 --- a/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj +++ b/sdk/src/Handlers/EntityFramework/AWSXRayRecorder.Handlers.EntityFramework.csproj @@ -22,11 +22,7 @@ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml - - 1591; - - - + 1591; diff --git a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj index c35f89b0..52b92ac2 100644 --- a/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj +++ b/sdk/src/Handlers/SqlServer/AWSXRayRecorder.Handlers.SqlServer.csproj @@ -21,11 +21,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591;1587;1572;1573 - - - + 1591;1587;1572;1573 diff --git a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj index 0b8cbe02..caa4d1dc 100644 --- a/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj +++ b/sdk/src/Handlers/System.Net/AWSXRayRecorder.Handlers.System.Net.csproj @@ -21,11 +21,7 @@ https://github.com/aws/aws-xray-sdk-dotnet - - 1591;1587;1572;1573 - - - + 1591;1587;1572;1573 diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 665bdab3..a8c0c433 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -12,12 +12,7 @@ ../../../buildtools/local-development.snk - - TRACE;DEBUG - 0618;1705 - - - + 0618;1705 From ce26dc784fe8377c8b2d0812cc446ea14e571a0f Mon Sep 17 00:00:00 2001 From: Jon Armen Date: Mon, 7 Mar 2022 17:41:09 -0500 Subject: [PATCH 14/14] Update CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88dc0afc..5b9de429 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - version: [net452, netcoreapp2.0, netcoreapp3.1] + version: [net462, net472, net48, netcoreapp3.1, net6.0] steps: - name: Checkout repository @@ -26,11 +26,11 @@ jobs: - uses: actions/setup-dotnet@v1 with: - dotnet-version: '2.0.x' + dotnet-version: '3.1.x' - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.x' + dotnet-version: '6.0.x' - name: Install dependencies run: dotnet restore sdk/AWSXRayRecorder.sln