From 53458639086f5a3afc39c97b21ca63b25d61e64a Mon Sep 17 00:00:00 2001 From: Mikel Blanchard Date: Fri, 3 Nov 2023 15:25:16 -0700 Subject: [PATCH] [repo] Bump Microsoft.Extensions.Logging.Configuration and clean up net462 targets (#5020) --- Directory.Packages.props | 2 +- build/Common.props | 14 ++++++------- ...etry.Exporter.OpenTelemetryProtocol.csproj | 6 +++++- .../OpenTelemetry.Exporter.Zipkin.csproj | 7 +++++++ ...elemetry.Instrumentation.AspNetCore.csproj | 20 +++---------------- .../OpenTelemetry.Instrumentation.Http.csproj | 4 ++++ src/OpenTelemetry/CHANGELOG.md | 4 ++++ src/Shared/HttpSemanticConventionHelper.cs | 4 ++-- test/Benchmarks/Benchmarks.csproj | 3 ++- .../Exporter/ZipkinExporterBenchmarks.cs | 2 +- test/Directory.Packages.props | 1 + ...xporter.OpenTelemetryProtocol.Tests.csproj | 4 ++-- ...orter.Prometheus.HttpListener.Tests.csproj | 4 ++++ ...nTelemetry.Extensions.Hosting.Tests.csproj | 2 +- ...elemetry.Instrumentation.Grpc.Tests.csproj | 9 +++------ ...elemetry.Instrumentation.Http.Tests.csproj | 2 +- .../OpenTelemetry.Tests.Stress.Logs.csproj | 1 + .../OpenTelemetry.Tests.Stress.Metrics.csproj | 1 + .../OpenTelemetry.Tests.Stress.Traces.csproj | 1 + .../OpenTelemetry.Tests.Stress.csproj | 1 + ...eriodicExportingMetricReaderHelperTests.cs | 2 +- ...atchExportLogRecordProcessorOptionsTest.cs | 2 +- .../Logs/LoggerProviderSdkTests.cs | 2 +- .../OpenTelemetry.Tests.csproj | 6 +++--- 24 files changed, 58 insertions(+), 46 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 836a56c4fc..fb81a09ab0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -31,7 +31,7 @@ --> - + diff --git a/build/Common.props b/build/Common.props index 6a08c1d1e3..8feec5f986 100644 --- a/build/Common.props +++ b/build/Common.props @@ -15,9 +15,12 @@ + net462 + net481;net48;net472;net471;net47;net462 + - net8.0;net6.0;netstandard2.0;net462 - net8.0;net6.0;netstandard2.1;netstandard2.0;net462 + net8.0;net6.0;netstandard2.0;$(NetFrameworkMinimumSupportedVersion) + net8.0;net6.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion) net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0 net8.0;net6.0;netstandard2.1;netstandard2.0 net8.0;net6.0 @@ -27,11 +30,11 @@ net8.0 net8.0;net7.0;net6.0 - $(TargetFrameworksForDocs);net481;net48;net472;net471;net47;net462 + $(TargetFrameworksForDocs);$(NetFrameworkSupportedVersions) net8.0;net7.0;net6.0 - $(TargetFrameworksForTests);net462 + $(TargetFrameworksForTests);$(NetFrameworkMinimumSupportedVersion) @@ -52,9 +55,6 @@ - diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj index a37fd0c0cd..92329c814d 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj @@ -16,11 +16,15 @@ - + + + + + diff --git a/src/OpenTelemetry.Exporter.Zipkin/OpenTelemetry.Exporter.Zipkin.csproj b/src/OpenTelemetry.Exporter.Zipkin/OpenTelemetry.Exporter.Zipkin.csproj index 82019e0979..b75959d8bd 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/OpenTelemetry.Exporter.Zipkin.csproj +++ b/src/OpenTelemetry.Exporter.Zipkin/OpenTelemetry.Exporter.Zipkin.csproj @@ -27,8 +27,15 @@ + + + + + + + diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj index 19c3a53f73..0bcb88af02 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj @@ -15,7 +15,7 @@ - + @@ -30,27 +30,13 @@ - + - - - - - - - - - - - - - - - + diff --git a/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj b/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj index 1e18cd0185..b9295759ed 100644 --- a/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj +++ b/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj @@ -28,4 +28,8 @@ + + + + diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 740395d5be..16658fb128 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -33,6 +33,10 @@ ASP.NET Core and HttpClient. ([#5021](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5021)) +* Updated `Microsoft.Extensions.Logging.Configuration` package version to + `8.0.0-rc.2.23479.6`. + ([#5020](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5020)) + ## 1.7.0-alpha.1 Released 2023-Oct-16 diff --git a/src/Shared/HttpSemanticConventionHelper.cs b/src/Shared/HttpSemanticConventionHelper.cs index 055aabd617..5a1c3051b7 100644 --- a/src/Shared/HttpSemanticConventionHelper.cs +++ b/src/Shared/HttpSemanticConventionHelper.cs @@ -77,7 +77,7 @@ private static bool TryGetConfiguredValues(IConfiguration configuration, [NotNul { try { - var stringValue = configuration![SemanticConventionOptInKeyName]; + var stringValue = configuration[SemanticConventionOptInKeyName]; if (string.IsNullOrWhiteSpace(stringValue)) { @@ -85,7 +85,7 @@ private static bool TryGetConfiguredValues(IConfiguration configuration, [NotNul return false; } - var stringValues = stringValue.Split(separator: new[] { ',', ' ' }, options: StringSplitOptions.RemoveEmptyEntries); + var stringValues = stringValue!.Split(separator: new[] { ',', ' ' }, options: StringSplitOptions.RemoveEmptyEntries); values = new HashSet(stringValues, StringComparer.OrdinalIgnoreCase); return true; } diff --git a/test/Benchmarks/Benchmarks.csproj b/test/Benchmarks/Benchmarks.csproj index bb1c7a8c29..0376befb94 100644 --- a/test/Benchmarks/Benchmarks.csproj +++ b/test/Benchmarks/Benchmarks.csproj @@ -18,7 +18,7 @@ - + @@ -38,4 +38,5 @@ + diff --git a/test/Benchmarks/Exporter/ZipkinExporterBenchmarks.cs b/test/Benchmarks/Exporter/ZipkinExporterBenchmarks.cs index 045bfe1d8c..24db77ce3f 100644 --- a/test/Benchmarks/Exporter/ZipkinExporterBenchmarks.cs +++ b/test/Benchmarks/Exporter/ZipkinExporterBenchmarks.cs @@ -26,7 +26,7 @@ namespace Benchmarks.Exporter; -#if !NET462 +#if !NETFRAMEWORK [ThreadingDiagnoser] #endif public class ZipkinExporterBenchmarks diff --git a/test/Directory.Packages.props b/test/Directory.Packages.props index 902efc8cc0..91bbe459e0 100644 --- a/test/Directory.Packages.props +++ b/test/Directory.Packages.props @@ -2,5 +2,6 @@ + diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj index 70b701da25..2e9775519d 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj b/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj index 6be8b0fefd..148f6c843c 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj @@ -22,6 +22,10 @@ + + + + diff --git a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj index 752fb95709..c7b5e9c2ea 100644 --- a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj +++ b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj b/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj index 308c647899..9c393cac71 100644 --- a/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.Grpc.Tests/OpenTelemetry.Instrumentation.Grpc.Tests.csproj @@ -13,7 +13,7 @@ - + @@ -25,14 +25,11 @@ - - - - - + + diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj b/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj index 83396dfecb..75e4f2f295 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/OpenTelemetry.Tests.Stress.Logs/OpenTelemetry.Tests.Stress.Logs.csproj b/test/OpenTelemetry.Tests.Stress.Logs/OpenTelemetry.Tests.Stress.Logs.csproj index 04b2abe0a6..1f1225d551 100644 --- a/test/OpenTelemetry.Tests.Stress.Logs/OpenTelemetry.Tests.Stress.Logs.csproj +++ b/test/OpenTelemetry.Tests.Stress.Logs/OpenTelemetry.Tests.Stress.Logs.csproj @@ -13,6 +13,7 @@ + diff --git a/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj b/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj index b9292ed2db..a783ed18d7 100644 --- a/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj +++ b/test/OpenTelemetry.Tests.Stress.Metrics/OpenTelemetry.Tests.Stress.Metrics.csproj @@ -9,6 +9,7 @@ + diff --git a/test/OpenTelemetry.Tests.Stress.Traces/OpenTelemetry.Tests.Stress.Traces.csproj b/test/OpenTelemetry.Tests.Stress.Traces/OpenTelemetry.Tests.Stress.Traces.csproj index e04707d9ad..41f6d28bc5 100644 --- a/test/OpenTelemetry.Tests.Stress.Traces/OpenTelemetry.Tests.Stress.Traces.csproj +++ b/test/OpenTelemetry.Tests.Stress.Traces/OpenTelemetry.Tests.Stress.Traces.csproj @@ -7,6 +7,7 @@ + diff --git a/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj b/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj index 47e5290be9..60e3c91791 100644 --- a/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj +++ b/test/OpenTelemetry.Tests.Stress/OpenTelemetry.Tests.Stress.csproj @@ -6,6 +6,7 @@ + diff --git a/test/OpenTelemetry.Tests/Internal/PeriodicExportingMetricReaderHelperTests.cs b/test/OpenTelemetry.Tests/Internal/PeriodicExportingMetricReaderHelperTests.cs index 59a3c6deac..285e41aca3 100644 --- a/test/OpenTelemetry.Tests/Internal/PeriodicExportingMetricReaderHelperTests.cs +++ b/test/OpenTelemetry.Tests/Internal/PeriodicExportingMetricReaderHelperTests.cs @@ -112,7 +112,7 @@ public void CreatePeriodicExportingMetricReader_ExportTimeoutMilliseconds_FromEn [Fact] public void CreatePeriodicExportingMetricReader_FromIConfiguration() { - var values = new Dictionary() + var values = new Dictionary() { [PeriodicExportingMetricReaderOptions.OTelMetricExportIntervalEnvVarKey] = "18", [PeriodicExportingMetricReaderOptions.OTelMetricExportTimeoutEnvVarKey] = "19", diff --git a/test/OpenTelemetry.Tests/Logs/BatchExportLogRecordProcessorOptionsTest.cs b/test/OpenTelemetry.Tests/Logs/BatchExportLogRecordProcessorOptionsTest.cs index 35e89e97b5..0ea48aa209 100644 --- a/test/OpenTelemetry.Tests/Logs/BatchExportLogRecordProcessorOptionsTest.cs +++ b/test/OpenTelemetry.Tests/Logs/BatchExportLogRecordProcessorOptionsTest.cs @@ -64,7 +64,7 @@ public void BatchExportLogRecordProcessorOptions_EnvironmentVariableOverride() [Fact] public void ExportLogRecordProcessorOptions_UsingIConfiguration() { - var values = new Dictionary() + var values = new Dictionary() { [BatchExportLogRecordProcessorOptions.MaxQueueSizeEnvVarKey] = "1", [BatchExportLogRecordProcessorOptions.MaxExportBatchSizeEnvVarKey] = "2", diff --git a/test/OpenTelemetry.Tests/Logs/LoggerProviderSdkTests.cs b/test/OpenTelemetry.Tests/Logs/LoggerProviderSdkTests.cs index dc8ace5879..3f4bd5c8e9 100644 --- a/test/OpenTelemetry.Tests/Logs/LoggerProviderSdkTests.cs +++ b/test/OpenTelemetry.Tests/Logs/LoggerProviderSdkTests.cs @@ -32,7 +32,7 @@ public void ResourceDetectionUsingIConfigurationTest() .ConfigureServices(services => { services.AddSingleton( - new ConfigurationBuilder().AddInMemoryCollection(new Dictionary { ["OTEL_SERVICE_NAME"] = "TestServiceName" }).Build()); + new ConfigurationBuilder().AddInMemoryCollection(new Dictionary { ["OTEL_SERVICE_NAME"] = "TestServiceName" }).Build()); }) .Build() as LoggerProviderSdk; diff --git a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj index 9b1fdad3eb..d8ad801f56 100644 --- a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj +++ b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj @@ -13,9 +13,9 @@ - - - + + +