From 875f5c9ec2b5b86878ae56472762e878f733949d Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 09:38:11 -0800 Subject: [PATCH 1/9] remove ImplicitUsings disable from projects. ZPages --- .../Implementation/ZPagesActivityAggregate.cs | 1 - .../Implementation/ZPagesActivityTracker.cs | 2 -- .../Implementation/ZPagesExporterEventSource.cs | 1 - .../OpenTelemetry.Exporter.ZPages.csproj | 1 - .../ZPagesExporterHelperExtensions.cs | 2 -- .../ZPagesExporterStatsHttpServer.cs | 4 ---- src/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs | 1 - 7 files changed, 12 deletions(-) diff --git a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityAggregate.cs b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityAggregate.cs index 2887989bbc0..b15fa015a2c 100644 --- a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityAggregate.cs +++ b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityAggregate.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; namespace OpenTelemetry.Exporter.ZPages.Implementation diff --git a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityTracker.cs b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityTracker.cs index b09279f8834..e9200db6939 100644 --- a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityTracker.cs +++ b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesActivityTracker.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Timers; namespace OpenTelemetry.Exporter.ZPages.Implementation diff --git a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesExporterEventSource.cs b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesExporterEventSource.cs index cba2dbffa2d..acdddea8b18 100644 --- a/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesExporterEventSource.cs +++ b/src/OpenTelemetry.Exporter.ZPages/Implementation/ZPagesExporterEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Exporter.ZPages/OpenTelemetry.Exporter.ZPages.csproj b/src/OpenTelemetry.Exporter.ZPages/OpenTelemetry.Exporter.ZPages.csproj index ec323b75c57..e5b6fbc3f20 100644 --- a/src/OpenTelemetry.Exporter.ZPages/OpenTelemetry.Exporter.ZPages.csproj +++ b/src/OpenTelemetry.Exporter.ZPages/OpenTelemetry.Exporter.ZPages.csproj @@ -8,7 +8,6 @@ disable - disable diff --git a/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterHelperExtensions.cs index 26eba5968ee..3520b3a5d14 100644 --- a/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterHelperExtensions.cs +++ b/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterHelperExtensions.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - using OpenTelemetry.Exporter.ZPages; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterStatsHttpServer.cs b/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterStatsHttpServer.cs index af40141fee8..360a12e2a6b 100644 --- a/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterStatsHttpServer.cs +++ b/src/OpenTelemetry.Exporter.ZPages/ZPagesExporterStatsHttpServer.cs @@ -14,12 +14,8 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; -using System.IO; using System.Net; -using System.Threading; -using System.Threading.Tasks; using OpenTelemetry.Exporter.ZPages.Implementation; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs b/src/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs index 87d892b364d..bb380245c4c 100644 --- a/src/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs +++ b/src/OpenTelemetry.Exporter.ZPages/ZPagesProcessor.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using OpenTelemetry.Exporter.ZPages.Implementation; using OpenTelemetry.Trace; From 67d62923090230eddf96c55740b7fedb6e59b211 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 09:43:29 -0800 Subject: [PATCH 2/9] Hosting --- .../Implementation/HostingExtensionsEventSource.cs | 1 - .../Implementation/TelemetryHostedService.cs | 3 --- .../Metrics/MeterProviderBuilderExtensions.cs | 1 - .../OpenTelemetry.Extensions.Hosting.csproj | 1 - .../OpenTelemetryServicesExtensions.cs | 1 - .../Trace/TracerProviderBuilderExtensions.cs | 1 - 6 files changed, 8 deletions(-) diff --git a/src/OpenTelemetry.Extensions.Hosting/Implementation/HostingExtensionsEventSource.cs b/src/OpenTelemetry.Extensions.Hosting/Implementation/HostingExtensionsEventSource.cs index 164695c6144..f23f3a86226 100644 --- a/src/OpenTelemetry.Extensions.Hosting/Implementation/HostingExtensionsEventSource.cs +++ b/src/OpenTelemetry.Extensions.Hosting/Implementation/HostingExtensionsEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryHostedService.cs b/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryHostedService.cs index 7b3c0d66757..612175c1a58 100644 --- a/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryHostedService.cs +++ b/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryHostedService.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using OpenTelemetry.Metrics; diff --git a/src/OpenTelemetry.Extensions.Hosting/Metrics/MeterProviderBuilderExtensions.cs b/src/OpenTelemetry.Extensions.Hosting/Metrics/MeterProviderBuilderExtensions.cs index d0056b28467..520c40bf2fe 100644 --- a/src/OpenTelemetry.Extensions.Hosting/Metrics/MeterProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Extensions.Hosting/Metrics/MeterProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj index cbef7b08db4..abefb22d1f1 100644 --- a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj +++ b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetry.Extensions.Hosting.csproj @@ -7,7 +7,6 @@ disable - disable diff --git a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryServicesExtensions.cs b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryServicesExtensions.cs index 3fcbc7b2e08..84f8560fd47 100644 --- a/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryServicesExtensions.cs +++ b/src/OpenTelemetry.Extensions.Hosting/OpenTelemetryServicesExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; using OpenTelemetry.Extensions.Hosting.Implementation; diff --git a/src/OpenTelemetry.Extensions.Hosting/Trace/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Extensions.Hosting/Trace/TracerProviderBuilderExtensions.cs index 95b3a57d2a1..f22cabab2cd 100644 --- a/src/OpenTelemetry.Extensions.Hosting/Trace/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Extensions.Hosting/Trace/TracerProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection; namespace OpenTelemetry.Trace From c8cf32f98d97ca730f66593029050bb705de5714 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 09:44:40 -0800 Subject: [PATCH 3/9] Propagators --- src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs | 3 --- src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs | 3 --- .../OpenTelemetry.Extensions.Propagators.csproj | 1 - .../OpenTelemetryPropagatorsEventSource.cs | 1 - 4 files changed, 8 deletions(-) diff --git a/src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs b/src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs index 8e84315fc24..13559bd1157 100644 --- a/src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs +++ b/src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Text; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs b/src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs index a3fa2e98da5..c51bc62d2e4 100644 --- a/src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs +++ b/src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Extensions.Propagators/OpenTelemetry.Extensions.Propagators.csproj b/src/OpenTelemetry.Extensions.Propagators/OpenTelemetry.Extensions.Propagators.csproj index 7247ecd8fd0..c61603b6b75 100644 --- a/src/OpenTelemetry.Extensions.Propagators/OpenTelemetry.Extensions.Propagators.csproj +++ b/src/OpenTelemetry.Extensions.Propagators/OpenTelemetry.Extensions.Propagators.csproj @@ -9,7 +9,6 @@ disable - disable diff --git a/src/OpenTelemetry.Extensions.Propagators/OpenTelemetryPropagatorsEventSource.cs b/src/OpenTelemetry.Extensions.Propagators/OpenTelemetryPropagatorsEventSource.cs index 1e3163a0b12..da15e0ee9f0 100644 --- a/src/OpenTelemetry.Extensions.Propagators/OpenTelemetryPropagatorsEventSource.cs +++ b/src/OpenTelemetry.Extensions.Propagators/OpenTelemetryPropagatorsEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; namespace OpenTelemetry.Internal From 5dea1a74c68650892ee65296f26cd36ca309c300 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 09:54:03 -0800 Subject: [PATCH 4/9] remove implicitusings disable from projectsn AspNetCore --- .../AspNetCoreInstrumentation.cs | 2 -- .../AspNetCoreInstrumentationOptions.cs | 1 - .../AspNetCoreMetrics.cs | 2 -- .../AspNetCoreMetricsInstrumentationOptions.cs | 1 - .../Implementation/AspNetCoreInstrumentationEventSource.cs | 1 - .../Implementation/HttpInListener.cs | 3 --- .../Implementation/HttpInMetricsListener.cs | 2 -- .../MeterProviderBuilderExtensions.cs | 1 - .../OpenTelemetry.Instrumentation.AspNetCore.csproj | 1 - .../TracerProviderBuilderExtensions.cs | 1 - .../DiagnosticSourceListener.cs | 2 ++ .../DiagnosticSourceSubscriber.cs | 3 +++ .../InstrumentationEventSource.cs | 2 ++ .../DiagnosticSourceInstrumentation/PropertyFetcher.cs | 2 ++ src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs | 2 ++ 15 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs index cc89229ecd2..913f1408fa3 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs @@ -13,8 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; -using System.Collections.Generic; using OpenTelemetry.Instrumentation.AspNetCore.Implementation; namespace OpenTelemetry.Instrumentation.AspNetCore diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs index 9c51fb5eb25..f134acb0d88 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using Microsoft.AspNetCore.Http; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetrics.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetrics.cs index eb947b9f7db..d1a91d589ac 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetrics.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics.Metrics; using System.Reflection; using OpenTelemetry.Instrumentation.AspNetCore.Implementation; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetricsInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetricsInstrumentationOptions.cs index e43b7db331b..a7819d55f32 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetricsInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetricsInstrumentationOptions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using Microsoft.AspNetCore.Http; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/AspNetCoreInstrumentationEventSource.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/AspNetCoreInstrumentationEventSource.cs index b78ab6953d0..d830208923d 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/AspNetCoreInstrumentationEventSource.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/AspNetCoreInstrumentationEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs index 836a24deb19..9300b651642 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Reflection; #if !NETSTANDARD2_0 using System.Runtime.CompilerServices; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs index 988c4a73eca..8300a536242 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; using Microsoft.AspNetCore.Http; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/MeterProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/MeterProviderBuilderExtensions.cs index 376bf86097d..c02f9975073 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/MeterProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/MeterProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using OpenTelemetry.Instrumentation.AspNetCore; diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj index 2c6190af39f..81cde3fb4c2 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj @@ -8,7 +8,6 @@ disable - disable diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/TracerProviderBuilderExtensions.cs index 47b20857d78..0814cd4b0d6 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/TracerProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; #if NET7_0_OR_GREATER using System.Diagnostics; #endif diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs index 9e8f68c2498..d1344d6b04e 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs @@ -14,10 +14,12 @@ // limitations under the License. // +#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System; using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Internal; +#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs index a1bc100585f..4a980123a1c 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs @@ -13,11 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. // + +#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using OpenTelemetry.Internal; +#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs index 6e1760bfccd..2b7f8905e5a 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs @@ -14,9 +14,11 @@ // limitations under the License. // +#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; +#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs index 6c1657fe657..834ce740dbd 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs @@ -14,10 +14,12 @@ // limitations under the License. // +#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System; using System.Linq; using System.Reflection; using OpenTelemetry.Internal; +#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs index 4e527812f31..2176574e479 100644 --- a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs +++ b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs @@ -14,9 +14,11 @@ // limitations under the License. // +#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System; using System.Diagnostics; using System.Linq.Expressions; +#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { From ae3dedabdc6f5729bb185f51251707045f320610 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 09:59:22 -0800 Subject: [PATCH 5/9] Http and GrpcNetClient --- .../GrpcClientInstrumentation.cs | 1 - .../GrpcClientInstrumentationOptions.cs | 2 -- .../Implementation/GrpcClientDiagnosticListener.cs | 2 -- .../Implementation/GrpcInstrumentationEventSource.cs | 1 - .../OpenTelemetry.Instrumentation.GrpcNetClient.csproj | 1 - .../TracerProviderBuilderExtensions.cs | 1 - .../HttpClientInstrumentation.cs | 1 - .../HttpClientInstrumentationOptions.cs | 3 ++- src/OpenTelemetry.Instrumentation.Http/HttpClientMetrics.cs | 1 - .../HttpRequestMessageContextPropagation.cs | 4 ++-- .../Implementation/HttpHandlerDiagnosticListener.cs | 4 ++-- .../Implementation/HttpHandlerMetricsDiagnosticListener.cs | 3 ++- .../Implementation/HttpInstrumentationEventSource.cs | 1 - .../Implementation/HttpTagHelper.cs | 3 ++- .../Implementation/HttpWebRequestActivitySource.netfx.cs | 2 -- .../OpenTelemetry.Instrumentation.Http.csproj | 1 - .../TracerProviderBuilderExtensions.cs | 1 - 17 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentation.cs b/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentation.cs index df827346111..1e970678603 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentation.cs +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentation.cs @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; using OpenTelemetry.Instrumentation.GrpcNetClient.Implementation; namespace OpenTelemetry.Instrumentation.GrpcNetClient diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentationOptions.cs index 8a055128b03..d03c882aa6f 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/GrpcClientInstrumentationOptions.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics; -using System.Net.Http; namespace OpenTelemetry.Instrumentation.GrpcNetClient { diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcClientDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcClientDiagnosticListener.cs index 179831d2a67..73b7cd98f6f 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcClientDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcClientDiagnosticListener.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics; -using System.Net.Http; using System.Reflection; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Instrumentation.Http; diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcInstrumentationEventSource.cs b/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcInstrumentationEventSource.cs index c171c21c59b..e16c76b8f3c 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcInstrumentationEventSource.cs +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/Implementation/GrpcInstrumentationEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/OpenTelemetry.Instrumentation.GrpcNetClient.csproj b/src/OpenTelemetry.Instrumentation.GrpcNetClient/OpenTelemetry.Instrumentation.GrpcNetClient.csproj index 5475e389fbc..08a03911108 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/OpenTelemetry.Instrumentation.GrpcNetClient.csproj +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/OpenTelemetry.Instrumentation.GrpcNetClient.csproj @@ -8,7 +8,6 @@ disable - disable diff --git a/src/OpenTelemetry.Instrumentation.GrpcNetClient/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.GrpcNetClient/TracerProviderBuilderExtensions.cs index d53c1421910..d2223e63fe9 100644 --- a/src/OpenTelemetry.Instrumentation.GrpcNetClient/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.GrpcNetClient/TracerProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using OpenTelemetry.Instrumentation.GrpcNetClient; diff --git a/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentation.cs b/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentation.cs index 4c7a42a0cb4..c7ffe545f21 100644 --- a/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentation.cs +++ b/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentation.cs @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; using OpenTelemetry.Instrumentation.Http.Implementation; namespace OpenTelemetry.Instrumentation.Http diff --git a/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentationOptions.cs index a4ef77bdb53..193b2141b13 100644 --- a/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentationOptions.cs @@ -14,10 +14,11 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Net; +#if NETFRAMEWORK using System.Net.Http; +#endif using System.Runtime.CompilerServices; using OpenTelemetry.Instrumentation.Http.Implementation; diff --git a/src/OpenTelemetry.Instrumentation.Http/HttpClientMetrics.cs b/src/OpenTelemetry.Instrumentation.Http/HttpClientMetrics.cs index 27b39f5da17..e48af04a625 100644 --- a/src/OpenTelemetry.Instrumentation.Http/HttpClientMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.Http/HttpClientMetrics.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Metrics; using System.Reflection; using OpenTelemetry.Instrumentation.Http.Implementation; diff --git a/src/OpenTelemetry.Instrumentation.Http/HttpRequestMessageContextPropagation.cs b/src/OpenTelemetry.Instrumentation.Http/HttpRequestMessageContextPropagation.cs index 14b26850e97..3f8d3ece0e3 100644 --- a/src/OpenTelemetry.Instrumentation.Http/HttpRequestMessageContextPropagation.cs +++ b/src/OpenTelemetry.Instrumentation.Http/HttpRequestMessageContextPropagation.cs @@ -14,9 +14,9 @@ // limitations under the License. // -using System; -using System.Collections.Generic; +#if NETFRAMEWORK using System.Net.Http; +#endif namespace OpenTelemetry.Instrumentation.Http { diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs index f2ac51c6432..a60049eb939 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs @@ -14,11 +14,11 @@ // limitations under the License. // -using System; using System.Diagnostics; +#if NETFRAMEWORK using System.Net.Http; +#endif using System.Reflection; -using System.Threading.Tasks; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Trace; diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs index c1924529108..79cb2c86153 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs @@ -14,10 +14,11 @@ // limitations under the License. // -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; +#if NETFRAMEWORK using System.Net.Http; +#endif using OpenTelemetry.Trace; namespace OpenTelemetry.Instrumentation.Http.Implementation diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpInstrumentationEventSource.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpInstrumentationEventSource.cs index a0a5e6fa967..862348a94b1 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpInstrumentationEventSource.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpInstrumentationEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpTagHelper.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpTagHelper.cs index 6616029ef4e..83d7ea0aedc 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpTagHelper.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpTagHelper.cs @@ -13,9 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; using System.Collections.Concurrent; +#if NETFRAMEWORK using System.Net.Http; +#endif namespace OpenTelemetry.Instrumentation.Http.Implementation { diff --git a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs index b011719cb6f..c1c20ac9218 100644 --- a/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs +++ b/src/OpenTelemetry.Instrumentation.Http/Implementation/HttpWebRequestActivitySource.netfx.cs @@ -15,9 +15,7 @@ // #if NETFRAMEWORK -using System; using System.Collections; -using System.Collections.Generic; using System.Diagnostics; using System.Net; using System.Reflection; diff --git a/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj b/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj index 724b901f9ff..ff3eece862e 100644 --- a/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj +++ b/src/OpenTelemetry.Instrumentation.Http/OpenTelemetry.Instrumentation.Http.csproj @@ -9,7 +9,6 @@ disable - disable diff --git a/src/OpenTelemetry.Instrumentation.Http/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.Http/TracerProviderBuilderExtensions.cs index c900da51f61..02415dfe160 100644 --- a/src/OpenTelemetry.Instrumentation.Http/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.Http/TracerProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using OpenTelemetry.Instrumentation.Http; From 283de042d8a1e4368f9c49260849bbc5553bc155 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 10:01:08 -0800 Subject: [PATCH 6/9] remove implicitusings disable from projects SqlClient --- .../Implementation/SqlActivitySourceHelper.cs | 2 -- .../Implementation/SqlClientDiagnosticListener.cs | 1 - .../Implementation/SqlClientInstrumentationEventSource.cs | 1 - .../Implementation/SqlEventSourceListener.netfx.cs | 1 - .../OpenTelemetry.Instrumentation.SqlClient.csproj | 1 - .../SqlClientInstrumentation.cs | 5 +---- .../SqlClientInstrumentationOptions.cs | 1 - .../TracerProviderBuilderExtensions.cs | 1 - 8 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlActivitySourceHelper.cs b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlActivitySourceHelper.cs index fbf4fb7d83a..271a9417f7f 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlActivitySourceHelper.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlActivitySourceHelper.cs @@ -13,8 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using OpenTelemetry.Trace; diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientDiagnosticListener.cs index b383ab03896..8849f218b72 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientDiagnosticListener.cs @@ -14,7 +14,6 @@ // limitations under the License. // #if !NETFRAMEWORK -using System; using System.Data; using System.Diagnostics; using OpenTelemetry.Trace; diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientInstrumentationEventSource.cs b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientInstrumentationEventSource.cs index 31a7a9737bf..4afdbac2da1 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientInstrumentationEventSource.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlClientInstrumentationEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs index c2065174776..a06c77c428c 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs @@ -15,7 +15,6 @@ // #if NETFRAMEWORK -using System; using System.Diagnostics; using System.Diagnostics.Tracing; using OpenTelemetry.Trace; diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/OpenTelemetry.Instrumentation.SqlClient.csproj b/src/OpenTelemetry.Instrumentation.SqlClient/OpenTelemetry.Instrumentation.SqlClient.csproj index a986f0ebfcf..d800a38d9c9 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/OpenTelemetry.Instrumentation.SqlClient.csproj +++ b/src/OpenTelemetry.Instrumentation.SqlClient/OpenTelemetry.Instrumentation.SqlClient.csproj @@ -9,7 +9,6 @@ disable - disable diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentation.cs b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentation.cs index bd6ecbe1238..380d70b20fb 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentation.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentation.cs @@ -13,10 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; -#if !NETFRAMEWORK -using System.Collections.Generic; -#endif + using OpenTelemetry.Instrumentation.SqlClient.Implementation; namespace OpenTelemetry.Instrumentation.SqlClient diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs index 121fed50b81..fdb0e29eff4 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/SqlClientInstrumentationOptions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; using System.Data; using System.Diagnostics; diff --git a/src/OpenTelemetry.Instrumentation.SqlClient/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.SqlClient/TracerProviderBuilderExtensions.cs index a12ae44c884..2279e97f5fc 100644 --- a/src/OpenTelemetry.Instrumentation.SqlClient/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.SqlClient/TracerProviderBuilderExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using OpenTelemetry.Instrumentation.SqlClient; using OpenTelemetry.Instrumentation.SqlClient.Implementation; using OpenTelemetry.Internal; From 6cfba0c01c2e8e03f67cd52af4841ce06848ceb2 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 10:04:35 -0800 Subject: [PATCH 7/9] Shims --- .../OpenTelemetry.Shims.OpenTracing.csproj | 1 - src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs | 4 ---- src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs | 2 -- src/OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs | 2 -- src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs | 3 --- src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs | 1 - 6 files changed, 13 deletions(-) diff --git a/src/OpenTelemetry.Shims.OpenTracing/OpenTelemetry.Shims.OpenTracing.csproj b/src/OpenTelemetry.Shims.OpenTracing/OpenTelemetry.Shims.OpenTracing.csproj index 5b7e1a27a48..d8070e7f7a6 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/OpenTelemetry.Shims.OpenTracing.csproj +++ b/src/OpenTelemetry.Shims.OpenTracing/OpenTelemetry.Shims.OpenTracing.csproj @@ -12,7 +12,6 @@ disable - disable diff --git a/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs b/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs index 0617a16cbe7..2984d3e7e38 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs @@ -14,11 +14,7 @@ // limitations under the License. // -using System; using System.Runtime.CompilerServices; -#if DEBUG -using System.Threading; -#endif using OpenTelemetry.Internal; using OpenTelemetry.Trace; using OpenTracing; diff --git a/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs b/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs index 5cdbe55e85d..0c42afc6186 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using OpenTelemetry.Internal; using OpenTelemetry.Trace; using OpenTracing; diff --git a/src/OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs b/src/OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs index 48e7c3dc28b..4b3d979cddd 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/SpanContextShim.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using OpenTracing; namespace OpenTelemetry.Shims.OpenTracing diff --git a/src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs b/src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs index 0ce964a3302..a50d5ff0892 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/SpanShim.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; -using System.Linq; using OpenTelemetry.Internal; using OpenTelemetry.Trace; using OpenTracing; diff --git a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs index 906d78315f8..f2a3c476cc4 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System.Collections.Generic; using OpenTelemetry.Context.Propagation; using OpenTelemetry.Internal; using OpenTracing.Propagation; From dd100974aac7f259ae12b7bc468c515b1aa7e18d Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 10:17:11 -0800 Subject: [PATCH 8/9] remove ImplicitUsings from projects OpenTelemetry and OpenTelemetry.Api --- src/OpenTelemetry.Api/Baggage.cs | 3 --- src/OpenTelemetry.Api/BaseProvider.cs | 2 -- src/OpenTelemetry.Api/Context/AsyncLocalRuntimeContextSlot.cs | 1 - src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs | 3 --- .../Context/Propagation/BaggagePropagator.cs | 3 --- .../Context/Propagation/CompositeTextMapPropagator.cs | 2 -- .../Context/Propagation/NoopTextMapPropagator.cs | 3 --- .../Context/Propagation/PropagationContext.cs | 1 - .../Context/Propagation/TextMapPropagator.cs | 3 --- .../Context/Propagation/TraceContextPropagator.cs | 3 --- .../Context/Propagation/TraceStateUtilsNew.cs | 3 --- src/OpenTelemetry.Api/Context/RuntimeContext.cs | 1 - src/OpenTelemetry.Api/Context/RuntimeContextSlot.cs | 2 -- .../Context/ThreadLocalRuntimeContextSlot.cs | 1 - src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs | 2 -- src/OpenTelemetry.Api/Internal/Guard.cs | 2 -- src/OpenTelemetry.Api/Internal/OpenTelemetryApiEventSource.cs | 1 - src/OpenTelemetry.Api/Internal/StatusHelper.cs | 1 - .../Metrics/IDeferredMeterProviderBuilder.cs | 2 -- src/OpenTelemetry.Api/Metrics/MeterProviderBuilder.cs | 1 - src/OpenTelemetry.Api/OpenTelemetry.Api.csproj | 1 - src/OpenTelemetry.Api/Trace/ActivityExtensions.cs | 1 - src/OpenTelemetry.Api/Trace/IDeferredTracerProviderBuilder.cs | 2 -- src/OpenTelemetry.Api/Trace/Link.cs | 1 - src/OpenTelemetry.Api/Trace/SpanAttributes.cs | 1 - src/OpenTelemetry.Api/Trace/SpanContext.cs | 2 -- src/OpenTelemetry.Api/Trace/TelemetrySpan.cs | 1 - src/OpenTelemetry.Api/Trace/Tracer.cs | 3 --- src/OpenTelemetry.Api/Trace/TracerProviderBuilder.cs | 1 - src/OpenTelemetry/BaseExportProcessor.cs | 1 - src/OpenTelemetry/BaseExporter.cs | 2 -- src/OpenTelemetry/BaseProcessor.cs | 2 -- src/OpenTelemetry/Batch.cs | 2 -- src/OpenTelemetry/BatchExportProcessor.cs | 2 -- src/OpenTelemetry/CompositeProcessor.cs | 3 --- .../DiagnosticSourceListener.cs | 2 -- .../DiagnosticSourceSubscriber.cs | 3 --- .../InstrumentationEventSource.cs | 1 - .../DiagnosticSourceInstrumentation/PropertyFetcher.cs | 2 -- src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs | 1 - .../Builder/ProviderBuilderServiceCollectionCallbackHelper.cs | 1 - src/OpenTelemetry/Internal/Builder/ProviderBuilderState.cs | 2 -- src/OpenTelemetry/Internal/CircularBuffer.cs | 1 - src/OpenTelemetry/Internal/ConfigurationExtensions.cs | 2 -- src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs | 3 --- src/OpenTelemetry/Internal/PeerServiceResolver.cs | 2 -- src/OpenTelemetry/Internal/PooledList.cs | 2 -- src/OpenTelemetry/Internal/SelfDiagnostics.cs | 2 -- src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs | 2 -- src/OpenTelemetry/Internal/SelfDiagnosticsConfigRefresher.cs | 4 ---- src/OpenTelemetry/Internal/SelfDiagnosticsEventListener.cs | 4 ---- src/OpenTelemetry/Internal/TagAndValueTransformer.cs | 1 - src/OpenTelemetry/Internal/TagTransformer.cs | 3 --- src/OpenTelemetry/Internal/WildcardHelper.cs | 2 -- src/OpenTelemetry/Logs/LogRecord.cs | 3 --- src/OpenTelemetry/Logs/LogRecordAttributeList.cs | 2 -- src/OpenTelemetry/Logs/LogRecordData.cs | 1 - src/OpenTelemetry/Logs/LogRecordScope.cs | 2 -- src/OpenTelemetry/Logs/OpenTelemetryLogger.cs | 2 -- src/OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs | 2 -- src/OpenTelemetry/Logs/OpenTelemetryLoggingExtensions.cs | 1 - src/OpenTelemetry/Logs/Options/OpenTelemetryLoggerOptions.cs | 2 -- src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs | 1 - src/OpenTelemetry/Logs/Pool/LogRecordThreadStaticPool.cs | 2 -- src/OpenTelemetry/Metrics/AggregatorStore.cs | 3 --- src/OpenTelemetry/Metrics/BaseExportingMetricReader.cs | 2 -- src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderBase.cs | 1 - .../Metrics/Builder/MeterProviderBuilderExtensions.cs | 1 - .../MeterProviderBuilderServiceCollectionExtensions.cs | 1 - .../Metrics/Builder/MeterProviderBuilderState.cs | 2 -- src/OpenTelemetry/Metrics/CompositeMetricReader.cs | 3 --- src/OpenTelemetry/Metrics/CompositeMetricReaderExt.cs | 2 -- .../Metrics/ExplicitBucketHistogramConfiguration.cs | 2 -- src/OpenTelemetry/Metrics/ExponentialBucketHistogram.cs | 1 - src/OpenTelemetry/Metrics/ExportModes.cs | 2 -- src/OpenTelemetry/Metrics/ExportModesAttribute.cs | 2 -- src/OpenTelemetry/Metrics/HistogramBuckets.cs | 1 - src/OpenTelemetry/Metrics/IPullMetricExporter.cs | 2 -- src/OpenTelemetry/Metrics/MeterProviderExtensions.cs | 2 -- src/OpenTelemetry/Metrics/MeterProviderSdk.cs | 3 --- src/OpenTelemetry/Metrics/Metric.cs | 2 -- src/OpenTelemetry/Metrics/MetricPoint.cs | 2 -- src/OpenTelemetry/Metrics/MetricReader.cs | 3 --- src/OpenTelemetry/Metrics/MetricReaderExt.cs | 2 -- src/OpenTelemetry/Metrics/MetricStreamConfiguration.cs | 2 -- src/OpenTelemetry/Metrics/MetricStreamIdentity.cs | 1 - src/OpenTelemetry/Metrics/MetricType.cs | 2 -- src/OpenTelemetry/Metrics/PeriodicExportingMetricReader.cs | 2 -- src/OpenTelemetry/Metrics/PullMetricScope.cs | 1 - src/OpenTelemetry/Metrics/StringArrayEqualityComparer.cs | 3 --- src/OpenTelemetry/Metrics/Tags.cs | 2 -- src/OpenTelemetry/Metrics/ThreadStaticStorage.cs | 2 -- src/OpenTelemetry/OpenTelemetry.csproj | 1 - src/OpenTelemetry/ProviderExtensions.cs | 1 - src/OpenTelemetry/ReadOnlyTagCollection.cs | 2 -- src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs | 1 - src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs | 1 - src/OpenTelemetry/Resources/Resource.cs | 3 --- src/OpenTelemetry/Resources/ResourceBuilder.cs | 2 -- src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs | 2 -- src/OpenTelemetry/SimpleExportProcessor.cs | 1 - src/OpenTelemetry/SuppressInstrumentationScope.cs | 1 - .../Trace/BatchExportActivityProcessorOptions.cs | 1 - src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs | 1 - .../Trace/Builder/TracerProviderBuilderExtensions.cs | 1 - .../TracerProviderBuilderServiceCollectionExtensions.cs | 1 - src/OpenTelemetry/Trace/Builder/TracerProviderBuilderState.cs | 2 -- src/OpenTelemetry/Trace/ExceptionProcessor.cs | 1 - src/OpenTelemetry/Trace/SamplingParameters.cs | 1 - src/OpenTelemetry/Trace/SamplingResult.cs | 4 ---- src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs | 1 - src/OpenTelemetry/Trace/TracerProviderExtensions.cs | 2 -- src/OpenTelemetry/Trace/TracerProviderSdk.cs | 3 --- 113 files changed, 210 deletions(-) diff --git a/src/OpenTelemetry.Api/Baggage.cs b/src/OpenTelemetry.Api/Baggage.cs index 3dddf60ef89..9a3d083fa19 100644 --- a/src/OpenTelemetry.Api/Baggage.cs +++ b/src/OpenTelemetry.Api/Baggage.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; -using System.Linq; using OpenTelemetry.Context; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/BaseProvider.cs b/src/OpenTelemetry.Api/BaseProvider.cs index 4aabc8cd119..93aa680a331 100644 --- a/src/OpenTelemetry.Api/BaseProvider.cs +++ b/src/OpenTelemetry.Api/BaseProvider.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry { /// diff --git a/src/OpenTelemetry.Api/Context/AsyncLocalRuntimeContextSlot.cs b/src/OpenTelemetry.Api/Context/AsyncLocalRuntimeContextSlot.cs index f38af6d6cf5..90c1e221e1d 100644 --- a/src/OpenTelemetry.Api/Context/AsyncLocalRuntimeContextSlot.cs +++ b/src/OpenTelemetry.Api/Context/AsyncLocalRuntimeContextSlot.cs @@ -15,7 +15,6 @@ // using System.Runtime.CompilerServices; -using System.Threading; namespace OpenTelemetry.Context { diff --git a/src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs b/src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs index 5d1b61089f7..dd749eb856f 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Text; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs index 3587a2fdad6..30e4388a056 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; -using System.Linq; using System.Net; using System.Text; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Context/Propagation/CompositeTextMapPropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/CompositeTextMapPropagator.cs index d6b1923eac0..18c1633ca82 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/CompositeTextMapPropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/CompositeTextMapPropagator.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using OpenTelemetry.Internal; namespace OpenTelemetry.Context.Propagation diff --git a/src/OpenTelemetry.Api/Context/Propagation/NoopTextMapPropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/NoopTextMapPropagator.cs index e21dd369e08..a63d896e983 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/NoopTextMapPropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/NoopTextMapPropagator.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; - namespace OpenTelemetry.Context.Propagation { internal sealed class NoopTextMapPropagator : TextMapPropagator diff --git a/src/OpenTelemetry.Api/Context/Propagation/PropagationContext.cs b/src/OpenTelemetry.Api/Context/Propagation/PropagationContext.cs index b9114e92fb5..c7846bc6e4b 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/PropagationContext.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/PropagationContext.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; namespace OpenTelemetry.Context.Propagation diff --git a/src/OpenTelemetry.Api/Context/Propagation/TextMapPropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/TextMapPropagator.cs index 2ac95bc71d5..0516e9c1ab6 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/TextMapPropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/TextMapPropagator.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; - namespace OpenTelemetry.Context.Propagation { /// diff --git a/src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs index fc18d3a7851..4e65a6436c7 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Runtime.CompilerServices; using System.Text; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Context/Propagation/TraceStateUtilsNew.cs b/src/OpenTelemetry.Api/Context/Propagation/TraceStateUtilsNew.cs index ab2215faf69..19bd96f8196 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/TraceStateUtilsNew.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/TraceStateUtilsNew.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Text; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Context/RuntimeContext.cs b/src/OpenTelemetry.Api/Context/RuntimeContext.cs index 9c84694f857..6ff9699f9f6 100644 --- a/src/OpenTelemetry.Api/Context/RuntimeContext.cs +++ b/src/OpenTelemetry.Api/Context/RuntimeContext.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; using System.Runtime.CompilerServices; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Context/RuntimeContextSlot.cs b/src/OpenTelemetry.Api/Context/RuntimeContextSlot.cs index 773bb000c6b..9864634f7c2 100644 --- a/src/OpenTelemetry.Api/Context/RuntimeContextSlot.cs +++ b/src/OpenTelemetry.Api/Context/RuntimeContextSlot.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Context { /// diff --git a/src/OpenTelemetry.Api/Context/ThreadLocalRuntimeContextSlot.cs b/src/OpenTelemetry.Api/Context/ThreadLocalRuntimeContextSlot.cs index 7da2c606ca9..cc312e99469 100644 --- a/src/OpenTelemetry.Api/Context/ThreadLocalRuntimeContextSlot.cs +++ b/src/OpenTelemetry.Api/Context/ThreadLocalRuntimeContextSlot.cs @@ -15,7 +15,6 @@ // using System.Runtime.CompilerServices; -using System.Threading; namespace OpenTelemetry.Context { diff --git a/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs b/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs index 733b32295b4..d5a3d9eb695 100644 --- a/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs +++ b/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs @@ -15,9 +15,7 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Globalization; -using System.Threading; #pragma warning restore IDE0005 namespace OpenTelemetry.Internal diff --git a/src/OpenTelemetry.Api/Internal/Guard.cs b/src/OpenTelemetry.Api/Internal/Guard.cs index cafb516a61f..1dd7c12ee62 100644 --- a/src/OpenTelemetry.Api/Internal/Guard.cs +++ b/src/OpenTelemetry.Api/Internal/Guard.cs @@ -15,11 +15,9 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; -using System.Threading; #pragma warning restore IDE0005 #if !NET6_0_OR_GREATER diff --git a/src/OpenTelemetry.Api/Internal/OpenTelemetryApiEventSource.cs b/src/OpenTelemetry.Api/Internal/OpenTelemetryApiEventSource.cs index 55f1bd54c09..a522cb5f223 100644 --- a/src/OpenTelemetry.Api/Internal/OpenTelemetryApiEventSource.cs +++ b/src/OpenTelemetry.Api/Internal/OpenTelemetryApiEventSource.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; namespace OpenTelemetry.Internal diff --git a/src/OpenTelemetry.Api/Internal/StatusHelper.cs b/src/OpenTelemetry.Api/Internal/StatusHelper.cs index 9104bc9471c..426e1396543 100644 --- a/src/OpenTelemetry.Api/Internal/StatusHelper.cs +++ b/src/OpenTelemetry.Api/Internal/StatusHelper.cs @@ -15,7 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Runtime.CompilerServices; using OpenTelemetry.Trace; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry.Api/Metrics/IDeferredMeterProviderBuilder.cs b/src/OpenTelemetry.Api/Metrics/IDeferredMeterProviderBuilder.cs index d0a98a05db8..b33ee69575b 100644 --- a/src/OpenTelemetry.Api/Metrics/IDeferredMeterProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Metrics/IDeferredMeterProviderBuilder.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { /// diff --git a/src/OpenTelemetry.Api/Metrics/MeterProviderBuilder.cs b/src/OpenTelemetry.Api/Metrics/MeterProviderBuilder.cs index 4fa833ff3c9..af79f1cc237 100644 --- a/src/OpenTelemetry.Api/Metrics/MeterProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Metrics/MeterProviderBuilder.cs @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; namespace OpenTelemetry.Metrics { diff --git a/src/OpenTelemetry.Api/OpenTelemetry.Api.csproj b/src/OpenTelemetry.Api/OpenTelemetry.Api.csproj index 04c193dd90c..68245bbf385 100644 --- a/src/OpenTelemetry.Api/OpenTelemetry.Api.csproj +++ b/src/OpenTelemetry.Api/OpenTelemetry.Api.csproj @@ -10,7 +10,6 @@ disable - disable diff --git a/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs b/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs index fc3738311e9..82694da4398 100644 --- a/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs +++ b/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Runtime.CompilerServices; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Trace/IDeferredTracerProviderBuilder.cs b/src/OpenTelemetry.Api/Trace/IDeferredTracerProviderBuilder.cs index 882f57ce802..9ca1f3b51cf 100644 --- a/src/OpenTelemetry.Api/Trace/IDeferredTracerProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Trace/IDeferredTracerProviderBuilder.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Trace { /// diff --git a/src/OpenTelemetry.Api/Trace/Link.cs b/src/OpenTelemetry.Api/Trace/Link.cs index cc91c9ae99a..46feae2adc4 100644 --- a/src/OpenTelemetry.Api/Trace/Link.cs +++ b/src/OpenTelemetry.Api/Trace/Link.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System.Collections.Generic; using System.Diagnostics; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry.Api/Trace/SpanAttributes.cs b/src/OpenTelemetry.Api/Trace/SpanAttributes.cs index f5672c71978..02d74c9ff2c 100644 --- a/src/OpenTelemetry.Api/Trace/SpanAttributes.cs +++ b/src/OpenTelemetry.Api/Trace/SpanAttributes.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Trace/SpanContext.cs b/src/OpenTelemetry.Api/Trace/SpanContext.cs index d22742ac950..a2915454236 100644 --- a/src/OpenTelemetry.Api/Trace/SpanContext.cs +++ b/src/OpenTelemetry.Api/Trace/SpanContext.cs @@ -13,9 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using OpenTelemetry.Context.Propagation; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry.Api/Trace/TelemetrySpan.cs b/src/OpenTelemetry.Api/Trace/TelemetrySpan.cs index 3129cde8d16..1b4a69ba009 100644 --- a/src/OpenTelemetry.Api/Trace/TelemetrySpan.cs +++ b/src/OpenTelemetry.Api/Trace/TelemetrySpan.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Runtime.CompilerServices; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry.Api/Trace/Tracer.cs b/src/OpenTelemetry.Api/Trace/Tracer.cs index 0050c294655..f9ea3a39f0d 100644 --- a/src/OpenTelemetry.Api/Trace/Tracer.cs +++ b/src/OpenTelemetry.Api/Trace/Tracer.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Runtime.CompilerServices; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry.Api/Trace/TracerProviderBuilder.cs b/src/OpenTelemetry.Api/Trace/TracerProviderBuilder.cs index f63564ec9bd..3c773895630 100644 --- a/src/OpenTelemetry.Api/Trace/TracerProviderBuilder.cs +++ b/src/OpenTelemetry.Api/Trace/TracerProviderBuilder.cs @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -using System; using System.Diagnostics; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry/BaseExportProcessor.cs b/src/OpenTelemetry/BaseExportProcessor.cs index b989f2381e0..9684a764ae2 100644 --- a/src/OpenTelemetry/BaseExportProcessor.cs +++ b/src/OpenTelemetry/BaseExportProcessor.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/BaseExporter.cs b/src/OpenTelemetry/BaseExporter.cs index cb1d70d84d0..40c3b8b210b 100644 --- a/src/OpenTelemetry/BaseExporter.cs +++ b/src/OpenTelemetry/BaseExporter.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/BaseProcessor.cs b/src/OpenTelemetry/BaseProcessor.cs index 02df50e39bf..78e6c2daf88 100644 --- a/src/OpenTelemetry/BaseProcessor.cs +++ b/src/OpenTelemetry/BaseProcessor.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/Batch.cs b/src/OpenTelemetry/Batch.cs index 8ec2b9dc288..540fe80c590 100644 --- a/src/OpenTelemetry/Batch.cs +++ b/src/OpenTelemetry/Batch.cs @@ -16,9 +16,7 @@ #nullable enable -using System; using System.Collections; -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/BatchExportProcessor.cs b/src/OpenTelemetry/BatchExportProcessor.cs index f0231cc15f5..5f51ed6c143 100644 --- a/src/OpenTelemetry/BatchExportProcessor.cs +++ b/src/OpenTelemetry/BatchExportProcessor.cs @@ -16,10 +16,8 @@ #nullable enable -using System; using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/CompositeProcessor.cs b/src/OpenTelemetry/CompositeProcessor.cs index 38a2babf9c9..055e4eec5cd 100644 --- a/src/OpenTelemetry/CompositeProcessor.cs +++ b/src/OpenTelemetry/CompositeProcessor.cs @@ -16,10 +16,7 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs index d1344d6b04e..9c6d9a3d261 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs @@ -15,8 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Internal; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs index 4a980123a1c..05d8567ba25 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs @@ -15,10 +15,7 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs index 2b7f8905e5a..6be0db5ec6e 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs @@ -15,7 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Diagnostics.Tracing; using OpenTelemetry.Internal; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs index 834ce740dbd..b344d9b8109 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs @@ -15,8 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Linq; using System.Reflection; using OpenTelemetry.Internal; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs index 2176574e479..268969d0339 100644 --- a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs +++ b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs @@ -15,7 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Diagnostics; using System.Linq.Expressions; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/Internal/Builder/ProviderBuilderServiceCollectionCallbackHelper.cs b/src/OpenTelemetry/Internal/Builder/ProviderBuilderServiceCollectionCallbackHelper.cs index 0e5d995a98e..0c6c088c50a 100644 --- a/src/OpenTelemetry/Internal/Builder/ProviderBuilderServiceCollectionCallbackHelper.cs +++ b/src/OpenTelemetry/Internal/Builder/ProviderBuilderServiceCollectionCallbackHelper.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using Microsoft.Extensions.DependencyInjection; diff --git a/src/OpenTelemetry/Internal/Builder/ProviderBuilderState.cs b/src/OpenTelemetry/Internal/Builder/ProviderBuilderState.cs index 3862f7a2120..3ff92761e95 100644 --- a/src/OpenTelemetry/Internal/Builder/ProviderBuilderState.cs +++ b/src/OpenTelemetry/Internal/Builder/ProviderBuilderState.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Resources; diff --git a/src/OpenTelemetry/Internal/CircularBuffer.cs b/src/OpenTelemetry/Internal/CircularBuffer.cs index 069ff70cfa4..2625289abcc 100644 --- a/src/OpenTelemetry/Internal/CircularBuffer.cs +++ b/src/OpenTelemetry/Internal/CircularBuffer.cs @@ -17,7 +17,6 @@ #nullable enable using System.Runtime.CompilerServices; -using System.Threading; namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/Internal/ConfigurationExtensions.cs b/src/OpenTelemetry/Internal/ConfigurationExtensions.cs index 29cc740ce16..658412f79d1 100644 --- a/src/OpenTelemetry/Internal/ConfigurationExtensions.cs +++ b/src/OpenTelemetry/Internal/ConfigurationExtensions.cs @@ -17,8 +17,6 @@ #nullable enable #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Collections.Generic; using System.Diagnostics; #if !NETFRAMEWORK && !NETSTANDARD2_0 using System.Diagnostics.CodeAnalysis; diff --git a/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs b/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs index efaa4d990a0..aecb7b3fc9f 100644 --- a/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs +++ b/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs @@ -15,10 +15,7 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; #if DEBUG -using System.Collections.Generic; -using System.Linq; #endif using System.Diagnostics; using System.Diagnostics.Tracing; diff --git a/src/OpenTelemetry/Internal/PeerServiceResolver.cs b/src/OpenTelemetry/Internal/PeerServiceResolver.cs index f1f812b1ee5..f1f1ad90e47 100644 --- a/src/OpenTelemetry/Internal/PeerServiceResolver.cs +++ b/src/OpenTelemetry/Internal/PeerServiceResolver.cs @@ -15,8 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; using OpenTelemetry.Trace; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/Internal/PooledList.cs b/src/OpenTelemetry/Internal/PooledList.cs index 77aa51fbb0f..3caf34bc30e 100644 --- a/src/OpenTelemetry/Internal/PooledList.cs +++ b/src/OpenTelemetry/Internal/PooledList.cs @@ -15,10 +15,8 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Buffers; using System.Collections; -using System.Collections.Generic; #pragma warning restore IDE0005 namespace OpenTelemetry.Internal diff --git a/src/OpenTelemetry/Internal/SelfDiagnostics.cs b/src/OpenTelemetry/Internal/SelfDiagnostics.cs index 6209984fb1e..9f7a6cf755a 100644 --- a/src/OpenTelemetry/Internal/SelfDiagnostics.cs +++ b/src/OpenTelemetry/Internal/SelfDiagnostics.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Internal { /// diff --git a/src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs b/src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs index d517f8667f0..d562ae5f403 100644 --- a/src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs +++ b/src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics.Tracing; -using System.IO; using System.Text; using System.Text.RegularExpressions; diff --git a/src/OpenTelemetry/Internal/SelfDiagnosticsConfigRefresher.cs b/src/OpenTelemetry/Internal/SelfDiagnosticsConfigRefresher.cs index 354e513dd10..924b044d7a4 100644 --- a/src/OpenTelemetry/Internal/SelfDiagnosticsConfigRefresher.cs +++ b/src/OpenTelemetry/Internal/SelfDiagnosticsConfigRefresher.cs @@ -14,14 +14,10 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Diagnostics.Tracing; -using System.IO; using System.IO.MemoryMappedFiles; using System.Text; -using System.Threading; -using System.Threading.Tasks; namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/Internal/SelfDiagnosticsEventListener.cs b/src/OpenTelemetry/Internal/SelfDiagnosticsEventListener.cs index d855aef122c..437ffa7796f 100644 --- a/src/OpenTelemetry/Internal/SelfDiagnosticsEventListener.cs +++ b/src/OpenTelemetry/Internal/SelfDiagnosticsEventListener.cs @@ -14,13 +14,9 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics.Tracing; -using System.IO; using System.Text; -using System.Threading; namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/Internal/TagAndValueTransformer.cs b/src/OpenTelemetry/Internal/TagAndValueTransformer.cs index ea021d17f49..b96e96be154 100644 --- a/src/OpenTelemetry/Internal/TagAndValueTransformer.cs +++ b/src/OpenTelemetry/Internal/TagAndValueTransformer.cs @@ -15,7 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; using System.Diagnostics; #pragma warning restore IDE0005 diff --git a/src/OpenTelemetry/Internal/TagTransformer.cs b/src/OpenTelemetry/Internal/TagTransformer.cs index 1766ed1a848..1bed5ed1270 100644 --- a/src/OpenTelemetry/Internal/TagTransformer.cs +++ b/src/OpenTelemetry/Internal/TagTransformer.cs @@ -15,9 +15,6 @@ // #pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -using System; -using System.Collections.Generic; -using System.Linq; #pragma warning restore IDE0005 namespace OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Internal/WildcardHelper.cs b/src/OpenTelemetry/Internal/WildcardHelper.cs index 8432286f409..a5161fdfde8 100644 --- a/src/OpenTelemetry/Internal/WildcardHelper.cs +++ b/src/OpenTelemetry/Internal/WildcardHelper.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; namespace OpenTelemetry; diff --git a/src/OpenTelemetry/Logs/LogRecord.cs b/src/OpenTelemetry/Logs/LogRecord.cs index 1991b94fe0f..19687743a59 100644 --- a/src/OpenTelemetry/Logs/LogRecord.cs +++ b/src/OpenTelemetry/Logs/LogRecord.cs @@ -16,11 +16,8 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Threading; using Microsoft.Extensions.Logging; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Logs/LogRecordAttributeList.cs b/src/OpenTelemetry/Logs/LogRecordAttributeList.cs index 385ba8f108e..3b19a84b5f0 100644 --- a/src/OpenTelemetry/Logs/LogRecordAttributeList.cs +++ b/src/OpenTelemetry/Logs/LogRecordAttributeList.cs @@ -16,9 +16,7 @@ #nullable enable -using System; using System.Collections; -using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Logs/LogRecordData.cs b/src/OpenTelemetry/Logs/LogRecordData.cs index 538bf0a3666..0da6848af61 100644 --- a/src/OpenTelemetry/Logs/LogRecordData.cs +++ b/src/OpenTelemetry/Logs/LogRecordData.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using Microsoft.Extensions.Logging; diff --git a/src/OpenTelemetry/Logs/LogRecordScope.cs b/src/OpenTelemetry/Logs/LogRecordScope.cs index 2e6bc6c0296..03ea85873fc 100644 --- a/src/OpenTelemetry/Logs/LogRecordScope.cs +++ b/src/OpenTelemetry/Logs/LogRecordScope.cs @@ -16,9 +16,7 @@ #nullable enable -using System; using System.Collections; -using System.Collections.Generic; namespace OpenTelemetry.Logs { diff --git a/src/OpenTelemetry/Logs/OpenTelemetryLogger.cs b/src/OpenTelemetry/Logs/OpenTelemetryLogger.cs index 4c5cfc6bcf5..817bd8e8ab7 100644 --- a/src/OpenTelemetry/Logs/OpenTelemetryLogger.cs +++ b/src/OpenTelemetry/Logs/OpenTelemetryLogger.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; using Microsoft.Extensions.Logging; diff --git a/src/OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs b/src/OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs index af48d1ab528..b2e6e2311e7 100644 --- a/src/OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs +++ b/src/OpenTelemetry/Logs/OpenTelemetryLoggerProvider.cs @@ -16,10 +16,8 @@ #nullable enable -using System; using System.Collections; using System.Text; -using System.Threading; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/OpenTelemetry/Logs/OpenTelemetryLoggingExtensions.cs b/src/OpenTelemetry/Logs/OpenTelemetryLoggingExtensions.cs index 844a744dd2d..a6f2b61ddc1 100644 --- a/src/OpenTelemetry/Logs/OpenTelemetryLoggingExtensions.cs +++ b/src/OpenTelemetry/Logs/OpenTelemetryLoggingExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging; diff --git a/src/OpenTelemetry/Logs/Options/OpenTelemetryLoggerOptions.cs b/src/OpenTelemetry/Logs/Options/OpenTelemetryLoggerOptions.cs index 022df5c1175..d6b5034e0e4 100644 --- a/src/OpenTelemetry/Logs/Options/OpenTelemetryLoggerOptions.cs +++ b/src/OpenTelemetry/Logs/Options/OpenTelemetryLoggerOptions.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using OpenTelemetry.Internal; using OpenTelemetry.Resources; diff --git a/src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs b/src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs index 57234057ae8..725d5cc1a2d 100644 --- a/src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs +++ b/src/OpenTelemetry/Logs/Pool/LogRecordSharedPool.cs @@ -17,7 +17,6 @@ #nullable enable using System.Diagnostics.CodeAnalysis; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Logs diff --git a/src/OpenTelemetry/Logs/Pool/LogRecordThreadStaticPool.cs b/src/OpenTelemetry/Logs/Pool/LogRecordThreadStaticPool.cs index 28b417f130d..d72f0754017 100644 --- a/src/OpenTelemetry/Logs/Pool/LogRecordThreadStaticPool.cs +++ b/src/OpenTelemetry/Logs/Pool/LogRecordThreadStaticPool.cs @@ -16,8 +16,6 @@ #nullable enable -using System; - namespace OpenTelemetry.Logs { internal sealed class LogRecordThreadStaticPool : ILogRecordPool diff --git a/src/OpenTelemetry/Metrics/AggregatorStore.cs b/src/OpenTelemetry/Metrics/AggregatorStore.cs index d31b7477d30..a53780470c5 100644 --- a/src/OpenTelemetry/Metrics/AggregatorStore.cs +++ b/src/OpenTelemetry/Metrics/AggregatorStore.cs @@ -14,11 +14,8 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Runtime.CompilerServices; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/BaseExportingMetricReader.cs b/src/OpenTelemetry/Metrics/BaseExportingMetricReader.cs index c9b6346d517..72582295ef8 100644 --- a/src/OpenTelemetry/Metrics/BaseExportingMetricReader.cs +++ b/src/OpenTelemetry/Metrics/BaseExportingMetricReader.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderBase.cs b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderBase.cs index 3fb13d9a72c..f63284a74e4 100644 --- a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderBase.cs +++ b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderBase.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using System.Diagnostics.Metrics; using System.Text.RegularExpressions; diff --git a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs index 7342a734a07..a1f2e4408e2 100644 --- a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs +++ b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics.Metrics; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Resources; diff --git a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderServiceCollectionExtensions.cs b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderServiceCollectionExtensions.cs index 8e34bd4b5a3..631c7bb1c0b 100644 --- a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderServiceCollectionExtensions.cs +++ b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderServiceCollectionExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using OpenTelemetry; using OpenTelemetry.Internal; using OpenTelemetry.Metrics; diff --git a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderState.cs b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderState.cs index ebd9b81e53b..a71d046cdd0 100644 --- a/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderState.cs +++ b/src/OpenTelemetry/Metrics/Builder/MeterProviderBuilderState.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Metrics/CompositeMetricReader.cs b/src/OpenTelemetry/Metrics/CompositeMetricReader.cs index 5f778b3a836..fa3ddbc2968 100644 --- a/src/OpenTelemetry/Metrics/CompositeMetricReader.cs +++ b/src/OpenTelemetry/Metrics/CompositeMetricReader.cs @@ -14,10 +14,7 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/CompositeMetricReaderExt.cs b/src/OpenTelemetry/Metrics/CompositeMetricReaderExt.cs index 20b0b681664..51666658091 100644 --- a/src/OpenTelemetry/Metrics/CompositeMetricReaderExt.cs +++ b/src/OpenTelemetry/Metrics/CompositeMetricReaderExt.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; diff --git a/src/OpenTelemetry/Metrics/ExplicitBucketHistogramConfiguration.cs b/src/OpenTelemetry/Metrics/ExplicitBucketHistogramConfiguration.cs index 8be618748fc..4ae3654210c 100644 --- a/src/OpenTelemetry/Metrics/ExplicitBucketHistogramConfiguration.cs +++ b/src/OpenTelemetry/Metrics/ExplicitBucketHistogramConfiguration.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { /// diff --git a/src/OpenTelemetry/Metrics/ExponentialBucketHistogram.cs b/src/OpenTelemetry/Metrics/ExponentialBucketHistogram.cs index 0f83121bea1..275baf5a78b 100644 --- a/src/OpenTelemetry/Metrics/ExponentialBucketHistogram.cs +++ b/src/OpenTelemetry/Metrics/ExponentialBucketHistogram.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Metrics/ExportModes.cs b/src/OpenTelemetry/Metrics/ExportModes.cs index ee832bd9047..91f237cd410 100644 --- a/src/OpenTelemetry/Metrics/ExportModes.cs +++ b/src/OpenTelemetry/Metrics/ExportModes.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { [Flags] diff --git a/src/OpenTelemetry/Metrics/ExportModesAttribute.cs b/src/OpenTelemetry/Metrics/ExportModesAttribute.cs index 77fdbecec21..6859b70724f 100644 --- a/src/OpenTelemetry/Metrics/ExportModesAttribute.cs +++ b/src/OpenTelemetry/Metrics/ExportModesAttribute.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] diff --git a/src/OpenTelemetry/Metrics/HistogramBuckets.cs b/src/OpenTelemetry/Metrics/HistogramBuckets.cs index c0160e534ee..f0cf3938299 100644 --- a/src/OpenTelemetry/Metrics/HistogramBuckets.cs +++ b/src/OpenTelemetry/Metrics/HistogramBuckets.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/OpenTelemetry/Metrics/IPullMetricExporter.cs b/src/OpenTelemetry/Metrics/IPullMetricExporter.cs index aac55247fdf..29fc3c8ce33 100644 --- a/src/OpenTelemetry/Metrics/IPullMetricExporter.cs +++ b/src/OpenTelemetry/Metrics/IPullMetricExporter.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { /// diff --git a/src/OpenTelemetry/Metrics/MeterProviderExtensions.cs b/src/OpenTelemetry/Metrics/MeterProviderExtensions.cs index 794833b44cc..59ce3ad9d9a 100644 --- a/src/OpenTelemetry/Metrics/MeterProviderExtensions.cs +++ b/src/OpenTelemetry/Metrics/MeterProviderExtensions.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/MeterProviderSdk.cs b/src/OpenTelemetry/Metrics/MeterProviderSdk.cs index 8a8ab77f9c8..906d582279c 100644 --- a/src/OpenTelemetry/Metrics/MeterProviderSdk.cs +++ b/src/OpenTelemetry/Metrics/MeterProviderSdk.cs @@ -16,11 +16,8 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; -using System.Linq; using System.Text; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Metrics/Metric.cs b/src/OpenTelemetry/Metrics/Metric.cs index 94a835e1d18..63338d81c2e 100644 --- a/src/OpenTelemetry/Metrics/Metric.cs +++ b/src/OpenTelemetry/Metrics/Metric.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Diagnostics.Metrics; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/MetricPoint.cs b/src/OpenTelemetry/Metrics/MetricPoint.cs index 99adab1af6e..0795b682e97 100644 --- a/src/OpenTelemetry/Metrics/MetricPoint.cs +++ b/src/OpenTelemetry/Metrics/MetricPoint.cs @@ -14,10 +14,8 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Threading; namespace OpenTelemetry.Metrics { diff --git a/src/OpenTelemetry/Metrics/MetricReader.cs b/src/OpenTelemetry/Metrics/MetricReader.cs index 8dcae7169bb..b5917d290a7 100644 --- a/src/OpenTelemetry/Metrics/MetricReader.cs +++ b/src/OpenTelemetry/Metrics/MetricReader.cs @@ -14,11 +14,8 @@ // limitations under the License. // -using System; using System.Diagnostics; using System.Diagnostics.Metrics; -using System.Threading; -using System.Threading.Tasks; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/MetricReaderExt.cs b/src/OpenTelemetry/Metrics/MetricReaderExt.cs index 4aa6769f346..c4710fe7bb5 100644 --- a/src/OpenTelemetry/Metrics/MetricReaderExt.cs +++ b/src/OpenTelemetry/Metrics/MetricReaderExt.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics.Metrics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Metrics/MetricStreamConfiguration.cs b/src/OpenTelemetry/Metrics/MetricStreamConfiguration.cs index 907c16e73d8..fec1be228f1 100644 --- a/src/OpenTelemetry/Metrics/MetricStreamConfiguration.cs +++ b/src/OpenTelemetry/Metrics/MetricStreamConfiguration.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { /// diff --git a/src/OpenTelemetry/Metrics/MetricStreamIdentity.cs b/src/OpenTelemetry/Metrics/MetricStreamIdentity.cs index 9039aa7612c..96a7ec53c62 100644 --- a/src/OpenTelemetry/Metrics/MetricStreamIdentity.cs +++ b/src/OpenTelemetry/Metrics/MetricStreamIdentity.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using System.Diagnostics.Metrics; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/MetricType.cs b/src/OpenTelemetry/Metrics/MetricType.cs index c5f1b375b29..93301a23b62 100644 --- a/src/OpenTelemetry/Metrics/MetricType.cs +++ b/src/OpenTelemetry/Metrics/MetricType.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { [Flags] diff --git a/src/OpenTelemetry/Metrics/PeriodicExportingMetricReader.cs b/src/OpenTelemetry/Metrics/PeriodicExportingMetricReader.cs index d008d20282d..69ad205c313 100644 --- a/src/OpenTelemetry/Metrics/PeriodicExportingMetricReader.cs +++ b/src/OpenTelemetry/Metrics/PeriodicExportingMetricReader.cs @@ -14,9 +14,7 @@ // limitations under the License. // -using System; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/PullMetricScope.cs b/src/OpenTelemetry/Metrics/PullMetricScope.cs index dd00e844bad..631dbdf7145 100644 --- a/src/OpenTelemetry/Metrics/PullMetricScope.cs +++ b/src/OpenTelemetry/Metrics/PullMetricScope.cs @@ -14,7 +14,6 @@ // limitations under the License. // -using System; using OpenTelemetry.Context; namespace OpenTelemetry.Metrics diff --git a/src/OpenTelemetry/Metrics/StringArrayEqualityComparer.cs b/src/OpenTelemetry/Metrics/StringArrayEqualityComparer.cs index 579325cef2a..74affe8f0ef 100644 --- a/src/OpenTelemetry/Metrics/StringArrayEqualityComparer.cs +++ b/src/OpenTelemetry/Metrics/StringArrayEqualityComparer.cs @@ -14,9 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; - namespace OpenTelemetry.Metrics { internal sealed class StringArrayEqualityComparer : IEqualityComparer diff --git a/src/OpenTelemetry/Metrics/Tags.cs b/src/OpenTelemetry/Metrics/Tags.cs index e7996bd846a..ba754fd7954 100644 --- a/src/OpenTelemetry/Metrics/Tags.cs +++ b/src/OpenTelemetry/Metrics/Tags.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; - namespace OpenTelemetry.Metrics { internal readonly struct Tags : IEquatable diff --git a/src/OpenTelemetry/Metrics/ThreadStaticStorage.cs b/src/OpenTelemetry/Metrics/ThreadStaticStorage.cs index 951ad1bac4a..023ba174d70 100644 --- a/src/OpenTelemetry/Metrics/ThreadStaticStorage.cs +++ b/src/OpenTelemetry/Metrics/ThreadStaticStorage.cs @@ -14,8 +14,6 @@ // limitations under the License. // -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/OpenTelemetry.csproj b/src/OpenTelemetry/OpenTelemetry.csproj index a2a06653357..5d5d8a4a32c 100644 --- a/src/OpenTelemetry/OpenTelemetry.csproj +++ b/src/OpenTelemetry/OpenTelemetry.csproj @@ -11,7 +11,6 @@ disable - disable diff --git a/src/OpenTelemetry/ProviderExtensions.cs b/src/OpenTelemetry/ProviderExtensions.cs index 0ce5752c1e7..c83127fdc51 100644 --- a/src/OpenTelemetry/ProviderExtensions.cs +++ b/src/OpenTelemetry/ProviderExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; diff --git a/src/OpenTelemetry/ReadOnlyTagCollection.cs b/src/OpenTelemetry/ReadOnlyTagCollection.cs index 27cdaabbaaf..d1c63c5bee7 100644 --- a/src/OpenTelemetry/ReadOnlyTagCollection.cs +++ b/src/OpenTelemetry/ReadOnlyTagCollection.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; namespace OpenTelemetry diff --git a/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs b/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs index b0e893618dc..59dbc8d08c8 100644 --- a/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs +++ b/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs @@ -16,7 +16,6 @@ #nullable enable -using System.Collections.Generic; using Microsoft.Extensions.Configuration; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs b/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs index 9b48f113956..4319a8a9f65 100644 --- a/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs +++ b/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs @@ -16,7 +16,6 @@ #nullable enable -using System.Collections.Generic; using Microsoft.Extensions.Configuration; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Resources/Resource.cs b/src/OpenTelemetry/Resources/Resource.cs index f6e82e2ffa4..ab5bc0733c8 100644 --- a/src/OpenTelemetry/Resources/Resource.cs +++ b/src/OpenTelemetry/Resources/Resource.cs @@ -16,10 +16,7 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using OpenTelemetry.Internal; namespace OpenTelemetry.Resources diff --git a/src/OpenTelemetry/Resources/ResourceBuilder.cs b/src/OpenTelemetry/Resources/ResourceBuilder.cs index 7c1ef54fdaa..25f408bf675 100644 --- a/src/OpenTelemetry/Resources/ResourceBuilder.cs +++ b/src/OpenTelemetry/Resources/ResourceBuilder.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs b/src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs index c68ee7ece59..3fcaf4b2b64 100644 --- a/src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs +++ b/src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Reflection; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/src/OpenTelemetry/SimpleExportProcessor.cs b/src/OpenTelemetry/SimpleExportProcessor.cs index b7ada68a779..50dfb6679d1 100644 --- a/src/OpenTelemetry/SimpleExportProcessor.cs +++ b/src/OpenTelemetry/SimpleExportProcessor.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using OpenTelemetry.Internal; namespace OpenTelemetry diff --git a/src/OpenTelemetry/SuppressInstrumentationScope.cs b/src/OpenTelemetry/SuppressInstrumentationScope.cs index 014c0743bdc..5a7319d52fb 100644 --- a/src/OpenTelemetry/SuppressInstrumentationScope.cs +++ b/src/OpenTelemetry/SuppressInstrumentationScope.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Runtime.CompilerServices; using OpenTelemetry.Context; diff --git a/src/OpenTelemetry/Trace/BatchExportActivityProcessorOptions.cs b/src/OpenTelemetry/Trace/BatchExportActivityProcessorOptions.cs index 0dd3fc39bcb..49c879b9993 100644 --- a/src/OpenTelemetry/Trace/BatchExportActivityProcessorOptions.cs +++ b/src/OpenTelemetry/Trace/BatchExportActivityProcessorOptions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using Microsoft.Extensions.Configuration; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs index 63e9e54416d..0ce4d3b2c28 100644 --- a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs +++ b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderExtensions.cs index 29e0e2512d3..654b368c721 100644 --- a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Resources; diff --git a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderServiceCollectionExtensions.cs b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderServiceCollectionExtensions.cs index 8b37f9080fb..68408ae056b 100644 --- a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderServiceCollectionExtensions.cs +++ b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderServiceCollectionExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using OpenTelemetry; using OpenTelemetry.Internal; using OpenTelemetry.Trace; diff --git a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderState.cs b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderState.cs index f446834249b..129efc55d97 100644 --- a/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderState.cs +++ b/src/OpenTelemetry/Trace/Builder/TracerProviderBuilderState.cs @@ -16,8 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Trace/ExceptionProcessor.cs b/src/OpenTelemetry/Trace/ExceptionProcessor.cs index bbfd09712f1..560395d9e1b 100644 --- a/src/OpenTelemetry/Trace/ExceptionProcessor.cs +++ b/src/OpenTelemetry/Trace/ExceptionProcessor.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Diagnostics; using System.Linq.Expressions; using System.Reflection; diff --git a/src/OpenTelemetry/Trace/SamplingParameters.cs b/src/OpenTelemetry/Trace/SamplingParameters.cs index 089c1ee63a1..daad55c05c8 100644 --- a/src/OpenTelemetry/Trace/SamplingParameters.cs +++ b/src/OpenTelemetry/Trace/SamplingParameters.cs @@ -16,7 +16,6 @@ #nullable enable -using System.Collections.Generic; using System.Diagnostics; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry/Trace/SamplingResult.cs b/src/OpenTelemetry/Trace/SamplingResult.cs index fe8ca36184a..c50529cd968 100644 --- a/src/OpenTelemetry/Trace/SamplingResult.cs +++ b/src/OpenTelemetry/Trace/SamplingResult.cs @@ -16,10 +16,6 @@ #nullable enable -using System; -using System.Collections.Generic; -using System.Linq; - namespace OpenTelemetry.Trace { /// diff --git a/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs b/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs index 20e00b5b66d..a782c002506 100644 --- a/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs +++ b/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs @@ -16,7 +16,6 @@ #nullable enable -using System; using System.Globalization; using OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Trace/TracerProviderExtensions.cs b/src/OpenTelemetry/Trace/TracerProviderExtensions.cs index 38e9d65c090..188e316bafe 100644 --- a/src/OpenTelemetry/Trace/TracerProviderExtensions.cs +++ b/src/OpenTelemetry/Trace/TracerProviderExtensions.cs @@ -16,9 +16,7 @@ #nullable enable -using System; using System.Diagnostics; -using System.Threading; using OpenTelemetry.Internal; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry/Trace/TracerProviderSdk.cs b/src/OpenTelemetry/Trace/TracerProviderSdk.cs index 476ece22229..3505d71adb0 100644 --- a/src/OpenTelemetry/Trace/TracerProviderSdk.cs +++ b/src/OpenTelemetry/Trace/TracerProviderSdk.cs @@ -16,10 +16,7 @@ #nullable enable -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Runtime.CompilerServices; using System.Text; using Microsoft.Extensions.DependencyInjection; From e90a99d4843accaed1760a18aa9a1952b3efd6ba Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Thu, 8 Dec 2022 10:22:19 -0800 Subject: [PATCH 9/9] remove pragma disable --- src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs | 2 -- src/OpenTelemetry.Api/Internal/Guard.cs | 2 -- src/OpenTelemetry.Api/Internal/StatusHelper.cs | 2 -- .../DiagnosticSourceListener.cs | 2 -- .../DiagnosticSourceSubscriber.cs | 2 -- .../InstrumentationEventSource.cs | 2 -- .../DiagnosticSourceInstrumentation/PropertyFetcher.cs | 2 -- src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs | 2 -- src/OpenTelemetry/Internal/ConfigurationExtensions.cs | 2 -- src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs | 4 ---- src/OpenTelemetry/Internal/PeerServiceResolver.cs | 2 -- src/OpenTelemetry/Internal/PooledList.cs | 2 -- src/OpenTelemetry/Internal/TagAndValueTransformer.cs | 2 -- src/OpenTelemetry/Internal/TagTransformer.cs | 3 --- 14 files changed, 31 deletions(-) diff --git a/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs b/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs index d5a3d9eb695..fda39cb828c 100644 --- a/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs +++ b/src/OpenTelemetry.Api/Internal/ExceptionExtensions.cs @@ -14,9 +14,7 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Globalization; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry.Api/Internal/Guard.cs b/src/OpenTelemetry.Api/Internal/Guard.cs index 1dd7c12ee62..e248310d1c6 100644 --- a/src/OpenTelemetry.Api/Internal/Guard.cs +++ b/src/OpenTelemetry.Api/Internal/Guard.cs @@ -14,11 +14,9 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; -#pragma warning restore IDE0005 #if !NET6_0_OR_GREATER namespace System.Runtime.CompilerServices diff --git a/src/OpenTelemetry.Api/Internal/StatusHelper.cs b/src/OpenTelemetry.Api/Internal/StatusHelper.cs index 426e1396543..78d8fa0cc24 100644 --- a/src/OpenTelemetry.Api/Internal/StatusHelper.cs +++ b/src/OpenTelemetry.Api/Internal/StatusHelper.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Runtime.CompilerServices; using OpenTelemetry.Trace; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs index 9c6d9a3d261..fd35aaa9a79 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceListener.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; using OpenTelemetry.Internal; -#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs index 05d8567ba25..57084fe0c9d 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/DiagnosticSourceSubscriber.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; using OpenTelemetry.Internal; -#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs index 6be0db5ec6e..8832f0992f4 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/InstrumentationEventSource.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics.Tracing; using OpenTelemetry.Internal; -#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs index b344d9b8109..9c1eb09c191 100644 --- a/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs +++ b/src/OpenTelemetry/DiagnosticSourceInstrumentation/PropertyFetcher.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Reflection; using OpenTelemetry.Internal; -#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs index 268969d0339..28854848e34 100644 --- a/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs +++ b/src/OpenTelemetry/Internal/ActivityInstrumentationHelper.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; using System.Linq.Expressions; -#pragma warning restore IDE0005 namespace OpenTelemetry.Instrumentation { diff --git a/src/OpenTelemetry/Internal/ConfigurationExtensions.cs b/src/OpenTelemetry/Internal/ConfigurationExtensions.cs index 658412f79d1..6259d571f3a 100644 --- a/src/OpenTelemetry/Internal/ConfigurationExtensions.cs +++ b/src/OpenTelemetry/Internal/ConfigurationExtensions.cs @@ -16,7 +16,6 @@ #nullable enable -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; #if !NETFRAMEWORK && !NETSTANDARD2_0 using System.Diagnostics.CodeAnalysis; @@ -26,7 +25,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs b/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs index aecb7b3fc9f..f8f941f2b67 100644 --- a/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs +++ b/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs @@ -14,13 +14,9 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -#if DEBUG -#endif using System.Diagnostics; using System.Diagnostics.Tracing; using System.Security; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/Internal/PeerServiceResolver.cs b/src/OpenTelemetry/Internal/PeerServiceResolver.cs index f1f1ad90e47..bfbb84dec04 100644 --- a/src/OpenTelemetry/Internal/PeerServiceResolver.cs +++ b/src/OpenTelemetry/Internal/PeerServiceResolver.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Runtime.CompilerServices; using OpenTelemetry.Trace; -#pragma warning restore IDE0005 namespace OpenTelemetry.Exporter { diff --git a/src/OpenTelemetry/Internal/PooledList.cs b/src/OpenTelemetry/Internal/PooledList.cs index 3caf34bc30e..8aad286d5e6 100644 --- a/src/OpenTelemetry/Internal/PooledList.cs +++ b/src/OpenTelemetry/Internal/PooledList.cs @@ -14,10 +14,8 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Buffers; using System.Collections; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal { diff --git a/src/OpenTelemetry/Internal/TagAndValueTransformer.cs b/src/OpenTelemetry/Internal/TagAndValueTransformer.cs index b96e96be154..fe1d1181215 100644 --- a/src/OpenTelemetry/Internal/TagAndValueTransformer.cs +++ b/src/OpenTelemetry/Internal/TagAndValueTransformer.cs @@ -14,9 +14,7 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. using System.Diagnostics; -#pragma warning restore IDE0005 namespace OpenTelemetry.Internal; diff --git a/src/OpenTelemetry/Internal/TagTransformer.cs b/src/OpenTelemetry/Internal/TagTransformer.cs index 1bed5ed1270..bb09dd3947d 100644 --- a/src/OpenTelemetry/Internal/TagTransformer.cs +++ b/src/OpenTelemetry/Internal/TagTransformer.cs @@ -14,9 +14,6 @@ // limitations under the License. // -#pragma warning disable IDE0005 // Temporarily suppressing "Using directive is unnecessary" until other projects have been updated. See #3958. -#pragma warning restore IDE0005 - namespace OpenTelemetry.Internal; internal abstract class TagTransformer