From 24c159fac119315e21df6138dc04bfe3ccd573c2 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Fri, 12 Jan 2024 05:56:53 -0500 Subject: [PATCH] add sentry to global usings (#3043) --- CHANGELOG.md | 12 ++++++++++++ .../Sentry.Benchmarks/LastActiveSpanBenchmarks.cs | 1 - benchmarks/Sentry.Benchmarks/StackFrameBenchmarks.cs | 1 - .../Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs | 1 - .../Controllers/HomeController.cs | 1 - .../ExampleEventProcessor.cs | 1 - .../SpecialExceptionProcessor.cs | 1 - samples/Sentry.Samples.Console.Basic/Program.cs | 2 -- samples/Sentry.Samples.Console.Customized/Program.cs | 2 -- samples/Sentry.Samples.Console.Metrics/Program.cs | 4 +--- samples/Sentry.Samples.Console.Native/Program.cs | 1 - samples/Sentry.Samples.Console.Profiling/Program.cs | 1 - samples/Sentry.Samples.EntityFramework/Program.cs | 1 - .../SampleHostedService.cs | 1 - .../Sentry.Samples.GraphQL.Client.Http/Program.cs | 1 - .../Sentry.Samples.GraphQL.Server/Notes/NotesData.cs | 2 -- .../Sentry.Samples.OpenTelemetry.Console/Program.cs | 1 - .../SentryHttpServerUtilityExtensions.cs | 1 - .../BindableSentryAspNetCoreOptions.cs | 4 ---- .../SentryAspNetCoreOptionsSetup.cs | 2 -- src/Sentry.AspNetCore/SentryTracingBuilder.cs | 1 - .../SentryTracingMiddlewareExtensions.cs | 2 -- .../SentryWebHostBuilderExtensions.cs | 1 - .../SentryFunctionsWorkerMiddleware.cs | 1 - .../EFConnectionDiagnosticSourceHelper.cs | 1 - src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs | 1 - src/Sentry.Profiling/Downsampler.cs | 3 --- src/Sentry.Profiling/SampleProfileBuilder.cs | 1 - src/Sentry/Extensibility/HubAdapter.cs | 1 - .../AppDomainUnhandledExceptionIntegration.cs | 1 - .../UnobservedTaskExceptionIntegration.cs | 1 - src/Sentry/Internal/Extensions/PEReaderExtensions.cs | 1 - src/Sentry/Internal/ITransactionProfiler.cs | 2 -- src/Sentry/Internal/MainSentryEventProcessor.cs | 1 - src/Sentry/Internal/NoOpTransaction.cs | 2 -- src/Sentry/Internal/ScopeObserver.cs | 1 - src/Sentry/Internal/StackFrame.cs | 3 --- src/Sentry/MetricAggregator.cs | 1 - src/Sentry/PlatformAbstractions/RuntimeInfo.cs | 2 -- src/Sentry/Platforms/Android/SentrySdk.cs | 1 - .../Platforms/Cocoa/Facades/SerializableNSObject.cs | 1 - src/Sentry/Platforms/Native/NativeScopeObserver.cs | 3 --- src/Sentry/Protocol/ProfileInfo.cs | 1 - src/Sentry/Protocol/SampleProfile.cs | 1 - src/Sentry/Scope.cs | 3 --- src/Sentry/SentryEvent.cs | 1 - src/Sentry/SentryHttpFailedRequestHandler.cs | 1 - src/Sentry/SentryHttpMessageHandler.cs | 2 -- src/Sentry/SentryMessageHandler.cs | 2 -- src/Sentry/TransactionTracer.cs | 1 - src/Sentry/buildTransitive/Sentry.targets | 4 ++++ .../Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs | 1 - .../SentrySqlListenerTests.cs | 2 -- test/Sentry.Maui.Tests/MauiEventsBinderTests.cs | 1 - test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs | 2 -- .../SentrySpanProcessorTests.cs | 3 --- .../SamplingTransactionProfilerTests.cs | 1 - .../TraceLogProcessorTests.verify.cs | 3 --- test/Sentry.Tests/DynamicSamplingContextTests.cs | 2 -- test/Sentry.Tests/HubTests.cs | 1 - test/Sentry.Tests/HubTests.verify.cs | 2 -- test/Sentry.Tests/MetricBucketHelperTests.cs | 2 -- test/SingleFileTestApp/SingleFileTestApp.csproj | 1 + 63 files changed, 18 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cdd3b1db8..8bbba85426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## Unreleased + +### Significant change in behavior + +- Added `Sentry` namespace to global usings when `ImplicitUsings` is enabled ([#3043](https://github.com/getsentry/sentry-dotnet/pull/3043)) +If you have conflicts, you can opt-out by adding the following to your `csproj`: +``` + + false + +``` + ## 4.0.0-beta.8 ### Features diff --git a/benchmarks/Sentry.Benchmarks/LastActiveSpanBenchmarks.cs b/benchmarks/Sentry.Benchmarks/LastActiveSpanBenchmarks.cs index 9aba4059c6..5950d7fd7e 100644 --- a/benchmarks/Sentry.Benchmarks/LastActiveSpanBenchmarks.cs +++ b/benchmarks/Sentry.Benchmarks/LastActiveSpanBenchmarks.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using Perfolizer.Mathematics.Randomization; namespace Sentry.Benchmarks; diff --git a/benchmarks/Sentry.Benchmarks/StackFrameBenchmarks.cs b/benchmarks/Sentry.Benchmarks/StackFrameBenchmarks.cs index 6797013c45..f13391f09c 100644 --- a/benchmarks/Sentry.Benchmarks/StackFrameBenchmarks.cs +++ b/benchmarks/Sentry.Benchmarks/StackFrameBenchmarks.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using Sentry.Extensibility; namespace Sentry.Benchmarks; diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs index e4ebdd7e0d..09b877536f 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs @@ -1,6 +1,5 @@ using System.Diagnostics; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -using Sentry; using Sentry.Samples.AspNetCore.Blazor.Wasm; // Capture blazor bootstrapping errors diff --git a/samples/Sentry.Samples.AspNetCore.Mvc/Controllers/HomeController.cs b/samples/Sentry.Samples.AspNetCore.Mvc/Controllers/HomeController.cs index e96c55af73..3eb4402cc4 100644 --- a/samples/Sentry.Samples.AspNetCore.Mvc/Controllers/HomeController.cs +++ b/samples/Sentry.Samples.AspNetCore.Mvc/Controllers/HomeController.cs @@ -1,7 +1,6 @@ using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Samples.AspNetCore.Mvc.Models; -using Sentry; namespace Samples.AspNetCore.Mvc.Controllers; diff --git a/samples/Sentry.Samples.AspNetCore.Mvc/ExampleEventProcessor.cs b/samples/Sentry.Samples.AspNetCore.Mvc/ExampleEventProcessor.cs index 9025ce1005..bf2d7b308f 100644 --- a/samples/Sentry.Samples.AspNetCore.Mvc/ExampleEventProcessor.cs +++ b/samples/Sentry.Samples.AspNetCore.Mvc/ExampleEventProcessor.cs @@ -1,4 +1,3 @@ -using Sentry; using Sentry.Extensibility; namespace Samples.AspNetCore.Mvc; diff --git a/samples/Sentry.Samples.AspNetCore.Mvc/SpecialExceptionProcessor.cs b/samples/Sentry.Samples.AspNetCore.Mvc/SpecialExceptionProcessor.cs index c16627d31a..6d9d8df3e6 100644 --- a/samples/Sentry.Samples.AspNetCore.Mvc/SpecialExceptionProcessor.cs +++ b/samples/Sentry.Samples.AspNetCore.Mvc/SpecialExceptionProcessor.cs @@ -1,4 +1,3 @@ -using Sentry; using Sentry.Extensibility; namespace Samples.AspNetCore.Mvc; diff --git a/samples/Sentry.Samples.Console.Basic/Program.cs b/samples/Sentry.Samples.Console.Basic/Program.cs index bf477fd658..2b8e82478c 100644 --- a/samples/Sentry.Samples.Console.Basic/Program.cs +++ b/samples/Sentry.Samples.Console.Basic/Program.cs @@ -8,8 +8,6 @@ * For more advanced features of the SDK, see Sentry.Samples.Console.Customized. */ -using Sentry; - // Initialize the Sentry SDK. (It is not necessary to dispose it.) SentrySdk.Init(options => { diff --git a/samples/Sentry.Samples.Console.Customized/Program.cs b/samples/Sentry.Samples.Console.Customized/Program.cs index b1af6291fd..d4a41f829e 100644 --- a/samples/Sentry.Samples.Console.Customized/Program.cs +++ b/samples/Sentry.Samples.Console.Customized/Program.cs @@ -1,6 +1,4 @@ -using System.Reflection; using System.Xml.Xsl; -using Sentry; using Sentry.Extensibility; internal static class Program diff --git a/samples/Sentry.Samples.Console.Metrics/Program.cs b/samples/Sentry.Samples.Console.Metrics/Program.cs index defdb6daf4..09c7b3246e 100644 --- a/samples/Sentry.Samples.Console.Metrics/Program.cs +++ b/samples/Sentry.Samples.Console.Metrics/Program.cs @@ -1,6 +1,4 @@ -using System.Numerics; - -namespace Sentry.Samples.Console.Metrics; +namespace Sentry.Samples.Console.Metrics; internal static class Program { diff --git a/samples/Sentry.Samples.Console.Native/Program.cs b/samples/Sentry.Samples.Console.Native/Program.cs index 0cf32fb9b6..1814e0355a 100644 --- a/samples/Sentry.Samples.Console.Native/Program.cs +++ b/samples/Sentry.Samples.Console.Native/Program.cs @@ -1,7 +1,6 @@ /* * This sample demonstrates a native crash handling in a NativeAOT published application. */ -using Sentry; // Initialize the Sentry SDK. (It is not necessary to dispose it.) SentrySdk.Init(options => diff --git a/samples/Sentry.Samples.Console.Profiling/Program.cs b/samples/Sentry.Samples.Console.Profiling/Program.cs index da948b8b8f..487f302653 100644 --- a/samples/Sentry.Samples.Console.Profiling/Program.cs +++ b/samples/Sentry.Samples.Console.Profiling/Program.cs @@ -1,5 +1,4 @@ using System.Diagnostics; -using Sentry; using Sentry.Profiling; internal static class Program diff --git a/samples/Sentry.Samples.EntityFramework/Program.cs b/samples/Sentry.Samples.EntityFramework/Program.cs index 8fcc2ac879..89a43c6756 100644 --- a/samples/Sentry.Samples.EntityFramework/Program.cs +++ b/samples/Sentry.Samples.EntityFramework/Program.cs @@ -1,7 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.Data.Common; using System.Data.Entity; -using Sentry; using var _ = SentrySdk.Init(o => { diff --git a/samples/Sentry.Samples.GenericHost/SampleHostedService.cs b/samples/Sentry.Samples.GenericHost/SampleHostedService.cs index b8a9b8b101..f6b671e179 100644 --- a/samples/Sentry.Samples.GenericHost/SampleHostedService.cs +++ b/samples/Sentry.Samples.GenericHost/SampleHostedService.cs @@ -1,6 +1,5 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Sentry; internal class SampleHostedService : IHostedService { diff --git a/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs b/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs index 81f8fb61ea..69a69743e4 100644 --- a/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs +++ b/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs @@ -8,7 +8,6 @@ using GraphQL; using GraphQL.Client.Http; using GraphQL.Client.Serializer.SystemTextJson; -using Sentry; SentrySdk.Init(options => { diff --git a/samples/Sentry.Samples.GraphQL.Server/Notes/NotesData.cs b/samples/Sentry.Samples.GraphQL.Server/Notes/NotesData.cs index 0211603ff4..0012746b88 100644 --- a/samples/Sentry.Samples.GraphQL.Server/Notes/NotesData.cs +++ b/samples/Sentry.Samples.GraphQL.Server/Notes/NotesData.cs @@ -1,5 +1,3 @@ -using System.Collections.Concurrent; - namespace Sentry.Samples.GraphQL.Server.Notes; public class NotesData diff --git a/samples/Sentry.Samples.OpenTelemetry.Console/Program.cs b/samples/Sentry.Samples.OpenTelemetry.Console/Program.cs index 3123432392..9237c84cb3 100644 --- a/samples/Sentry.Samples.OpenTelemetry.Console/Program.cs +++ b/samples/Sentry.Samples.OpenTelemetry.Console/Program.cs @@ -8,7 +8,6 @@ using OpenTelemetry; using OpenTelemetry.Resources; using OpenTelemetry.Trace; -using Sentry; using Sentry.OpenTelemetry; var serviceName = "Sentry.Samples.OpenTelemetry.Console"; diff --git a/src/Sentry.AspNet/SentryHttpServerUtilityExtensions.cs b/src/Sentry.AspNet/SentryHttpServerUtilityExtensions.cs index 42ffac95d1..95374679c7 100644 --- a/src/Sentry.AspNet/SentryHttpServerUtilityExtensions.cs +++ b/src/Sentry.AspNet/SentryHttpServerUtilityExtensions.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Protocol; namespace Sentry.AspNet; diff --git a/src/Sentry.AspNetCore/BindableSentryAspNetCoreOptions.cs b/src/Sentry.AspNetCore/BindableSentryAspNetCoreOptions.cs index 35cac5b05e..6ee5520549 100644 --- a/src/Sentry.AspNetCore/BindableSentryAspNetCoreOptions.cs +++ b/src/Sentry.AspNetCore/BindableSentryAspNetCoreOptions.cs @@ -1,12 +1,8 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; using Sentry.Extensibility; using Sentry.Extensions.Logging; #if NETSTANDARD2_0 using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment; -#else -using Microsoft.Extensions.Hosting; #endif namespace Sentry.AspNetCore; diff --git a/src/Sentry.AspNetCore/SentryAspNetCoreOptionsSetup.cs b/src/Sentry.AspNetCore/SentryAspNetCoreOptionsSetup.cs index 1055237cd1..d5af7f3e3a 100644 --- a/src/Sentry.AspNetCore/SentryAspNetCoreOptionsSetup.cs +++ b/src/Sentry.AspNetCore/SentryAspNetCoreOptionsSetup.cs @@ -3,8 +3,6 @@ using Microsoft.Extensions.Options; using Sentry.Extensions.Logging; -using IHostingEnvironment = Microsoft.AspNetCore.Hosting.IWebHostEnvironment; - namespace Sentry.AspNetCore; /// diff --git a/src/Sentry.AspNetCore/SentryTracingBuilder.cs b/src/Sentry.AspNetCore/SentryTracingBuilder.cs index 3c7e0b8b8b..9a251d8a15 100644 --- a/src/Sentry.AspNetCore/SentryTracingBuilder.cs +++ b/src/Sentry.AspNetCore/SentryTracingBuilder.cs @@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; namespace Sentry.AspNetCore; diff --git a/src/Sentry.AspNetCore/SentryTracingMiddlewareExtensions.cs b/src/Sentry.AspNetCore/SentryTracingMiddlewareExtensions.cs index bf46e6eaca..dbc4ac93c2 100644 --- a/src/Sentry.AspNetCore/SentryTracingMiddlewareExtensions.cs +++ b/src/Sentry.AspNetCore/SentryTracingMiddlewareExtensions.cs @@ -1,8 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Sentry; using Sentry.AspNetCore; -using Sentry.Extensibility; using Sentry.Internal.Extensions; // ReSharper disable once CheckNamespace diff --git a/src/Sentry.AspNetCore/SentryWebHostBuilderExtensions.cs b/src/Sentry.AspNetCore/SentryWebHostBuilderExtensions.cs index 931da5bcf2..c00217368b 100644 --- a/src/Sentry.AspNetCore/SentryWebHostBuilderExtensions.cs +++ b/src/Sentry.AspNetCore/SentryWebHostBuilderExtensions.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Configuration; diff --git a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs index 00cce11512..0970d4e216 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs @@ -1,5 +1,4 @@ using Microsoft.Azure.Functions.Worker; -using Microsoft.Azure.Functions.Worker.Http; using Microsoft.Azure.Functions.Worker.Middleware; using Sentry.Extensibility; using Sentry.Internal; diff --git a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs index 50ac30fb65..6f27286505 100644 --- a/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs +++ b/src/Sentry.DiagnosticSource/Internal/DiagnosticSource/EFConnectionDiagnosticSourceHelper.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal.Extensions; namespace Sentry.Internal.DiagnosticSource; diff --git a/src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs b/src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs index 1501d39393..f3d621b881 100644 --- a/src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs +++ b/src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs @@ -1,4 +1,3 @@ -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/src/Sentry.Profiling/Downsampler.cs b/src/Sentry.Profiling/Downsampler.cs index a2df56d991..1580231a3b 100644 --- a/src/Sentry.Profiling/Downsampler.cs +++ b/src/Sentry.Profiling/Downsampler.cs @@ -1,6 +1,3 @@ -using Microsoft.Diagnostics.Tracing; -using Microsoft.Diagnostics.Tracing.EventPipe; - /// /// Reduce sampling rate from 1 Hz that is the default for the provider to the configured SamplingRateMs. /// diff --git a/src/Sentry.Profiling/SampleProfileBuilder.cs b/src/Sentry.Profiling/SampleProfileBuilder.cs index 832eb68ecf..46440c2a6b 100644 --- a/src/Sentry.Profiling/SampleProfileBuilder.cs +++ b/src/Sentry.Profiling/SampleProfileBuilder.cs @@ -1,7 +1,6 @@ using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Etlx; using Sentry.Extensibility; -using Sentry.Internal; using Sentry.Protocol; namespace Sentry.Profiling; diff --git a/src/Sentry/Extensibility/HubAdapter.cs b/src/Sentry/Extensibility/HubAdapter.cs index 6797fef9bd..1935ede45b 100644 --- a/src/Sentry/Extensibility/HubAdapter.cs +++ b/src/Sentry/Extensibility/HubAdapter.cs @@ -1,5 +1,4 @@ using Sentry.Infrastructure; -using Sentry.Internal; namespace Sentry.Extensibility; diff --git a/src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs b/src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs index c5d15b8f34..fad9a18b81 100644 --- a/src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs +++ b/src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs @@ -1,6 +1,5 @@ using Sentry.Extensibility; using Sentry.Internal; -using Sentry.Protocol; namespace Sentry.Integrations; diff --git a/src/Sentry/Integrations/UnobservedTaskExceptionIntegration.cs b/src/Sentry/Integrations/UnobservedTaskExceptionIntegration.cs index 16080a1d24..a403186904 100644 --- a/src/Sentry/Integrations/UnobservedTaskExceptionIntegration.cs +++ b/src/Sentry/Integrations/UnobservedTaskExceptionIntegration.cs @@ -1,5 +1,4 @@ using Sentry.Internal; -using Sentry.Protocol; namespace Sentry.Integrations; diff --git a/src/Sentry/Internal/Extensions/PEReaderExtensions.cs b/src/Sentry/Internal/Extensions/PEReaderExtensions.cs index dba8455671..3163460605 100644 --- a/src/Sentry/Internal/Extensions/PEReaderExtensions.cs +++ b/src/Sentry/Internal/Extensions/PEReaderExtensions.cs @@ -1,4 +1,3 @@ -using Sentry.Extensibility; using Sentry.Protocol; namespace Sentry.Internal.Extensions; diff --git a/src/Sentry/Internal/ITransactionProfiler.cs b/src/Sentry/Internal/ITransactionProfiler.cs index e8a2a67758..e17ace104a 100644 --- a/src/Sentry/Internal/ITransactionProfiler.cs +++ b/src/Sentry/Internal/ITransactionProfiler.cs @@ -1,5 +1,3 @@ -using Sentry.Protocol; - namespace Sentry.Internal; /// diff --git a/src/Sentry/Internal/MainSentryEventProcessor.cs b/src/Sentry/Internal/MainSentryEventProcessor.cs index 4561f7565f..fcb925e8e4 100644 --- a/src/Sentry/Internal/MainSentryEventProcessor.cs +++ b/src/Sentry/Internal/MainSentryEventProcessor.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal.Extensions; using Sentry.Reflection; namespace Sentry.Internal; diff --git a/src/Sentry/Internal/NoOpTransaction.cs b/src/Sentry/Internal/NoOpTransaction.cs index da5891de64..15d44b5156 100644 --- a/src/Sentry/Internal/NoOpTransaction.cs +++ b/src/Sentry/Internal/NoOpTransaction.cs @@ -1,5 +1,3 @@ -using Sentry.Protocol; - namespace Sentry.Internal; /// diff --git a/src/Sentry/Internal/ScopeObserver.cs b/src/Sentry/Internal/ScopeObserver.cs index 39ef871b16..8e99626e4e 100644 --- a/src/Sentry/Internal/ScopeObserver.cs +++ b/src/Sentry/Internal/ScopeObserver.cs @@ -1,4 +1,3 @@ -using Sentry.Extensibility; using Sentry.Internal.Extensions; namespace Sentry.Internal; diff --git a/src/Sentry/Internal/StackFrame.cs b/src/Sentry/Internal/StackFrame.cs index 3b5f64312a..cdfe61f01a 100644 --- a/src/Sentry/Internal/StackFrame.cs +++ b/src/Sentry/Internal/StackFrame.cs @@ -1,6 +1,3 @@ -using Sentry.Internal.Extensions; -using Sentry.Extensibility; - namespace Sentry.Internal; /// diff --git a/src/Sentry/MetricAggregator.cs b/src/Sentry/MetricAggregator.cs index b40151d654..26dce5e234 100644 --- a/src/Sentry/MetricAggregator.cs +++ b/src/Sentry/MetricAggregator.cs @@ -1,4 +1,3 @@ -using System; using Sentry.Extensibility; using Sentry.Internal; using Sentry.Internal.Extensions; diff --git a/src/Sentry/PlatformAbstractions/RuntimeInfo.cs b/src/Sentry/PlatformAbstractions/RuntimeInfo.cs index 047cb73f87..1ef10bfa91 100644 --- a/src/Sentry/PlatformAbstractions/RuntimeInfo.cs +++ b/src/Sentry/PlatformAbstractions/RuntimeInfo.cs @@ -1,5 +1,3 @@ -using System; - namespace Sentry.PlatformAbstractions; // https://github.com/dotnet/corefx/issues/17452 diff --git a/src/Sentry/Platforms/Android/SentrySdk.cs b/src/Sentry/Platforms/Android/SentrySdk.cs index d9e6fe3332..33f926e8a8 100644 --- a/src/Sentry/Platforms/Android/SentrySdk.cs +++ b/src/Sentry/Platforms/Android/SentrySdk.cs @@ -3,7 +3,6 @@ using Sentry.Android; using Sentry.Android.Callbacks; using Sentry.Android.Extensions; -using Sentry.Internal; using Sentry.JavaSdk.Android.Core; // Don't let the Sentry Android SDK auto-init, as we do that manually in SentrySdk.Init diff --git a/src/Sentry/Platforms/Cocoa/Facades/SerializableNSObject.cs b/src/Sentry/Platforms/Cocoa/Facades/SerializableNSObject.cs index b82d51850e..00340fa4e3 100644 --- a/src/Sentry/Platforms/Cocoa/Facades/SerializableNSObject.cs +++ b/src/Sentry/Platforms/Cocoa/Facades/SerializableNSObject.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal; namespace Sentry.Cocoa.Facades; diff --git a/src/Sentry/Platforms/Native/NativeScopeObserver.cs b/src/Sentry/Platforms/Native/NativeScopeObserver.cs index 4f859ae9c8..68b8bc6e57 100644 --- a/src/Sentry/Platforms/Native/NativeScopeObserver.cs +++ b/src/Sentry/Platforms/Native/NativeScopeObserver.cs @@ -1,6 +1,3 @@ -using System; -using System.Runtime.InteropServices; -using Sentry.Extensibility; using Sentry.Internal; namespace Sentry.Native; diff --git a/src/Sentry/Protocol/ProfileInfo.cs b/src/Sentry/Protocol/ProfileInfo.cs index 48fb29e88b..4a0cad6e69 100644 --- a/src/Sentry/Protocol/ProfileInfo.cs +++ b/src/Sentry/Protocol/ProfileInfo.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal; using Sentry.Internal.Extensions; namespace Sentry.Protocol; diff --git a/src/Sentry/Protocol/SampleProfile.cs b/src/Sentry/Protocol/SampleProfile.cs index d750e2ff3d..264d0492ee 100644 --- a/src/Sentry/Protocol/SampleProfile.cs +++ b/src/Sentry/Protocol/SampleProfile.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal; using Sentry.Internal.Extensions; #if NETFRAMEWORK diff --git a/src/Sentry/Scope.cs b/src/Sentry/Scope.cs index cebcfc276c..e0c4ede588 100644 --- a/src/Sentry/Scope.cs +++ b/src/Sentry/Scope.cs @@ -1,8 +1,5 @@ using Sentry.Extensibility; -using Sentry.Internal; using Sentry.Internal.Extensions; -using Sentry.Internal.OpenTelemetry; -using Sentry.Protocol; namespace Sentry; diff --git a/src/Sentry/SentryEvent.cs b/src/Sentry/SentryEvent.cs index 7dcec67e55..fbddc28b9f 100644 --- a/src/Sentry/SentryEvent.cs +++ b/src/Sentry/SentryEvent.cs @@ -1,6 +1,5 @@ using Sentry.Extensibility; using Sentry.Integrations; -using Sentry.Internal; using Sentry.Internal.Extensions; using Sentry.Protocol; diff --git a/src/Sentry/SentryHttpFailedRequestHandler.cs b/src/Sentry/SentryHttpFailedRequestHandler.cs index 617aa57013..1e2fc17b11 100644 --- a/src/Sentry/SentryHttpFailedRequestHandler.cs +++ b/src/Sentry/SentryHttpFailedRequestHandler.cs @@ -1,4 +1,3 @@ -using Sentry.Internal; using Sentry.Protocol; namespace Sentry; diff --git a/src/Sentry/SentryHttpMessageHandler.cs b/src/Sentry/SentryHttpMessageHandler.cs index fa64feb5c7..925df567d1 100644 --- a/src/Sentry/SentryHttpMessageHandler.cs +++ b/src/Sentry/SentryHttpMessageHandler.cs @@ -1,6 +1,4 @@ using Sentry.Extensibility; -using Sentry.Internal; -using Sentry.Internal.Extensions; using Sentry.Internal.OpenTelemetry; namespace Sentry; diff --git a/src/Sentry/SentryMessageHandler.cs b/src/Sentry/SentryMessageHandler.cs index 8ebeaf77fb..f7e257591b 100644 --- a/src/Sentry/SentryMessageHandler.cs +++ b/src/Sentry/SentryMessageHandler.cs @@ -1,7 +1,5 @@ using Sentry.Extensibility; -using Sentry.Internal; using Sentry.Internal.Extensions; -using Sentry.Internal.OpenTelemetry; namespace Sentry; diff --git a/src/Sentry/TransactionTracer.cs b/src/Sentry/TransactionTracer.cs index 6899f3f628..6dd3e9b514 100644 --- a/src/Sentry/TransactionTracer.cs +++ b/src/Sentry/TransactionTracer.cs @@ -1,6 +1,5 @@ using Sentry.Extensibility; using Sentry.Internal; -using Sentry.Internal.ScopeStack; using Sentry.Protocol; namespace Sentry; diff --git a/src/Sentry/buildTransitive/Sentry.targets b/src/Sentry/buildTransitive/Sentry.targets index 18aedfda57..952c2e91e2 100644 --- a/src/Sentry/buildTransitive/Sentry.targets +++ b/src/Sentry/buildTransitive/Sentry.targets @@ -1,6 +1,10 @@ + + + + Sentry.Attributes$(MSBuildProjectExtension.Replace('proj', '')) diff --git a/test/Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs b/test/Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs index b315d4d0f8..aa6bb8f019 100644 --- a/test/Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs +++ b/test/Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs @@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Logging; -using Sentry.AspNetCore.Extensions; #if NETCOREAPP3_1_OR_GREATER using IHostingEnvironment = Microsoft.AspNetCore.Hosting.IWebHostEnvironment; diff --git a/test/Sentry.DiagnosticSource.Tests/SentrySqlListenerTests.cs b/test/Sentry.DiagnosticSource.Tests/SentrySqlListenerTests.cs index 62690daa74..4deec14a4f 100644 --- a/test/Sentry.DiagnosticSource.Tests/SentrySqlListenerTests.cs +++ b/test/Sentry.DiagnosticSource.Tests/SentrySqlListenerTests.cs @@ -1,6 +1,4 @@ -using Microsoft.EntityFrameworkCore.Storage; using Sentry.Internal.DiagnosticSource; -using Sentry.Internal.Extensions; using static Sentry.Internal.DiagnosticSource.SentrySqlListener; namespace Sentry.DiagnosticSource.Tests; diff --git a/test/Sentry.Maui.Tests/MauiEventsBinderTests.cs b/test/Sentry.Maui.Tests/MauiEventsBinderTests.cs index 1b9d4d40fb..66a57936e0 100644 --- a/test/Sentry.Maui.Tests/MauiEventsBinderTests.cs +++ b/test/Sentry.Maui.Tests/MauiEventsBinderTests.cs @@ -1,4 +1,3 @@ -using Microsoft.Extensions.Options; using Sentry.Maui.Internal; namespace Sentry.Maui.Tests; diff --git a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs index 3f84581edd..8cb79e2d42 100644 --- a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs +++ b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs @@ -1,6 +1,4 @@ using Microsoft.Extensions.Options; -using Sentry.Internal.Http; -using Sentry.Maui.Internal; namespace Sentry.Maui.Tests; diff --git a/test/Sentry.OpenTelemetry.Tests/SentrySpanProcessorTests.cs b/test/Sentry.OpenTelemetry.Tests/SentrySpanProcessorTests.cs index 5596cafe7a..b2bca26c61 100644 --- a/test/Sentry.OpenTelemetry.Tests/SentrySpanProcessorTests.cs +++ b/test/Sentry.OpenTelemetry.Tests/SentrySpanProcessorTests.cs @@ -1,7 +1,4 @@ -using OpenTelemetry; -using OpenTelemetry.Trace; using Sentry.Internal.OpenTelemetry; -using Sentry.PlatformAbstractions; namespace Sentry.OpenTelemetry.Tests; diff --git a/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs b/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs index 5b46d09901..b4d96ca8a2 100644 --- a/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs +++ b/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs @@ -1,5 +1,4 @@ using Sentry.Internal.Http; -using Xunit.Sdk; namespace Sentry.Profiling.Tests; diff --git a/test/Sentry.Profiling.Tests/TraceLogProcessorTests.verify.cs b/test/Sentry.Profiling.Tests/TraceLogProcessorTests.verify.cs index bf3404381e..9829fa30e1 100644 --- a/test/Sentry.Profiling.Tests/TraceLogProcessorTests.verify.cs +++ b/test/Sentry.Profiling.Tests/TraceLogProcessorTests.verify.cs @@ -1,9 +1,6 @@ -using System.Diagnostics.Tracing; -using Microsoft.Diagnostics.NETCore.Client; using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Etlx; using Microsoft.Diagnostics.Tracing.EventPipe; -using Microsoft.Diagnostics.Tracing.Parsers; namespace Sentry.Profiling.Tests; diff --git a/test/Sentry.Tests/DynamicSamplingContextTests.cs b/test/Sentry.Tests/DynamicSamplingContextTests.cs index e1ffe9230c..b99cfb73c4 100644 --- a/test/Sentry.Tests/DynamicSamplingContextTests.cs +++ b/test/Sentry.Tests/DynamicSamplingContextTests.cs @@ -1,5 +1,3 @@ -using Xunit.Sdk; - namespace Sentry.Tests; public class DynamicSamplingContextTests diff --git a/test/Sentry.Tests/HubTests.cs b/test/Sentry.Tests/HubTests.cs index d38f180c95..865a094f68 100644 --- a/test/Sentry.Tests/HubTests.cs +++ b/test/Sentry.Tests/HubTests.cs @@ -1,5 +1,4 @@ using Sentry.Internal.Http; -using Sentry.Internal.OpenTelemetry; namespace Sentry.Tests; diff --git a/test/Sentry.Tests/HubTests.verify.cs b/test/Sentry.Tests/HubTests.verify.cs index 084b2cfa00..5279f98dfa 100644 --- a/test/Sentry.Tests/HubTests.verify.cs +++ b/test/Sentry.Tests/HubTests.verify.cs @@ -1,5 +1,3 @@ -using Sentry.PlatformAbstractions; - namespace Sentry.Tests; [UsesVerify] diff --git a/test/Sentry.Tests/MetricBucketHelperTests.cs b/test/Sentry.Tests/MetricBucketHelperTests.cs index 5de929afb4..1c5412d771 100644 --- a/test/Sentry.Tests/MetricBucketHelperTests.cs +++ b/test/Sentry.Tests/MetricBucketHelperTests.cs @@ -1,5 +1,3 @@ -using Sentry.Protocol.Metrics; - namespace Sentry.Tests; public class MetricBucketHelperTests diff --git a/test/SingleFileTestApp/SingleFileTestApp.csproj b/test/SingleFileTestApp/SingleFileTestApp.csproj index 13285771a6..123c265621 100644 --- a/test/SingleFileTestApp/SingleFileTestApp.csproj +++ b/test/SingleFileTestApp/SingleFileTestApp.csproj @@ -8,6 +8,7 @@ true true true + false