diff --git a/CHANGELOG.md b/CHANGELOG.md index a7399938d1..6599c21207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,26 @@ - `BeforeBreadcrumb` - use `SetBeforeBreadcrumb` instead. - `CreateHttpClientHandler` - use `CreateHttpMessageHandler` instead. - `ReportAssemblies` - use `ReportAssembliesMode` instead. - - `KeepAggregateException` - This property is no longer used and has no replacement. + - `KeepAggregateException` - this property is no longer used and has no replacement. - `DisableTaskUnobservedTaskExceptionCapture` method has been renamed to `DisableUnobservedTaskExceptionCapture`. + - `DebugDiagnosticLogger` - use `TraceDiagnosticLogger` instead. +- A number of iOS/Android-specific `[Obsolete]` options have been removed ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) + - `Distribution` - use `SentryOptions.Distribution` instead. + - `EnableAutoPerformanceTracking` - use `SetBeforeSendTransaction` instead. + - `EnableCoreDataTracking` - use `EnableCoreDataTracing` instead. + - `EnableFileIOTracking` - use `EnableFileIOTracing` instead. + - `EnableOutOfMemoryTracking` - use `EnableWatchdogTerminationTracking` instead. + - `EnableUIViewControllerTracking` - use `EnableUIViewControllerTracing` instead. + - `StitchAsyncCode` - no longer available. + - `ProfilingTracesInterval` - no longer available. + - `ProfilingEnabled` - use `ProfilesSampleRate` instead. +- Obsolete `SystemClock` constructor removed, use `SystemClock.Clock` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `Runtime.Clone()` removed, this shouldn't have been public in the past and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `SentryException.Data` removed, use `SentryException.Mechanism.Data` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `AssemblyExtensions` removed, this shouldn't have been public in the past and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `SentryDatabaseLogging.UseBreadcrumbs()` removed, it is called automatically and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `Scope.GetSpan()` removed, use `Span` property instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) +- Obsolete `IUserFactory` removed, use `ISentryUserFactory` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) #### Changed APIs diff --git a/src/Sentry.AspNetCore/DefaultUserFactory.cs b/src/Sentry.AspNetCore/DefaultUserFactory.cs index df56b5baa4..1fef155e9e 100644 --- a/src/Sentry.AspNetCore/DefaultUserFactory.cs +++ b/src/Sentry.AspNetCore/DefaultUserFactory.cs @@ -2,9 +2,7 @@ namespace Sentry.AspNetCore; -#pragma warning disable CS0618 internal class DefaultUserFactory : IUserFactory, ISentryUserFactory -#pragma warning restore CS0618 { private readonly IHttpContextAccessor? _httpContextAccessor; diff --git a/src/Sentry.AspNetCore/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/src/Sentry.AspNetCore/Extensions/DependencyInjection/ServiceCollectionExtensions.cs index 98c9415c6b..6f32b884ab 100644 --- a/src/Sentry.AspNetCore/Extensions/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Sentry.AspNetCore/Extensions/DependencyInjection/ServiceCollectionExtensions.cs @@ -23,9 +23,7 @@ public static ISentryBuilder AddSentry(this IServiceCollection services) services.AddSingleton(); services.AddHttpContextAccessor(); -#pragma warning disable CS0618 services.TryAddSingleton(); -#pragma warning restore CS0618 services.TryAddSingleton(); services diff --git a/src/Sentry.AspNetCore/IUserFactory.cs b/src/Sentry.AspNetCore/IUserFactory.cs index 32d5a09f9c..8c02efb1b3 100644 --- a/src/Sentry.AspNetCore/IUserFactory.cs +++ b/src/Sentry.AspNetCore/IUserFactory.cs @@ -5,8 +5,7 @@ namespace Sentry.AspNetCore; /// /// Sentry User Factory /// -[Obsolete("This interface is tightly coupled to AspNetCore and will be removed in version 4.0.0. Please consider using ISentryUserFactory with IHttpContextAccessor instead.")] -public interface IUserFactory +internal interface IUserFactory { /// /// Creates a from the diff --git a/src/Sentry.AspNetCore/ScopeExtensions.cs b/src/Sentry.AspNetCore/ScopeExtensions.cs index 5311409e50..b5b10cec52 100644 --- a/src/Sentry.AspNetCore/ScopeExtensions.cs +++ b/src/Sentry.AspNetCore/ScopeExtensions.cs @@ -38,10 +38,8 @@ public static void Populate(this Scope scope, HttpContext context, SentryAspNetC if (options.SendDefaultPii && !scope.HasUser()) { -#pragma warning disable CS0618 var userFactory = context.RequestServices.GetService(); var user = userFactory?.Create(context); -#pragma warning restore CS0618 if (user != null) { diff --git a/src/Sentry.EntityFramework/SentryDatabaseLogging.cs b/src/Sentry.EntityFramework/SentryDatabaseLogging.cs index 4861c0b864..c61ff996d2 100644 --- a/src/Sentry.EntityFramework/SentryDatabaseLogging.cs +++ b/src/Sentry.EntityFramework/SentryDatabaseLogging.cs @@ -3,19 +3,10 @@ namespace Sentry.EntityFramework; /// /// Sentry Database Logger /// -public static class SentryDatabaseLogging +internal static class SentryDatabaseLogging { private static int Init; - /// - /// Adds an instance of to - /// This is a static setup call, so make sure you only call it once for each instance you want to register globally - /// - /// Query Logger. - [Obsolete("This method is called automatically by options.AddEntityFramework. This method will be removed in future versions.")] - public static SentryCommandInterceptor? UseBreadcrumbs(IQueryLogger? logger = null) - => UseBreadcrumbs(logger, true); - internal static SentryCommandInterceptor? UseBreadcrumbs( IQueryLogger? queryLogger = null, bool initOnce = true, diff --git a/src/Sentry/Infrastructure/DebugDiagnosticLogger.cs b/src/Sentry/Infrastructure/DebugDiagnosticLogger.cs deleted file mode 100644 index 2a974eb5dc..0000000000 --- a/src/Sentry/Infrastructure/DebugDiagnosticLogger.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Sentry.Infrastructure; - -/// -/// Debug logger used by the SDK to report its internal logging. -/// -/// -/// Logger available when compiled in Debug mode. It's useful when debugging apps running under IIS which have no output to Console logger. -/// -[Obsolete("Logger doesn't work outside of Sentry SDK. Please use TraceDiagnosticLogger instead")] -public class DebugDiagnosticLogger : DiagnosticLogger -{ - /// - /// Creates a new instance of . - /// - public DebugDiagnosticLogger(SentryLevel minimalLevel) : base(minimalLevel) - { - } - - /// - protected override void LogMessage(string message) => Debug.WriteLine(message); -} diff --git a/src/Sentry/Infrastructure/SystemClock.cs b/src/Sentry/Infrastructure/SystemClock.cs index d93132ca01..2cc1f348a9 100644 --- a/src/Sentry/Infrastructure/SystemClock.cs +++ b/src/Sentry/Infrastructure/SystemClock.cs @@ -12,17 +12,12 @@ public sealed class SystemClock : ISystemClock /// /// This constructor should have been private originally. It will be removed in a future major version. /// - [Obsolete("This constructor will become private in a future major version. Use the `SystemClock.Clock` singleton instead.")] - public SystemClock() - { - } + private SystemClock() {} /// /// System clock singleton. /// -#pragma warning disable CS0618 public static readonly SystemClock Clock = new(); -#pragma warning restore CS0618 /// /// Gets the current time in UTC. diff --git a/src/Sentry/Platforms/Android/SentryOptions.cs b/src/Sentry/Platforms/Android/SentryOptions.cs index 5a90c892e3..a93de39b8c 100644 --- a/src/Sentry/Platforms/Android/SentryOptions.cs +++ b/src/Sentry/Platforms/Android/SentryOptions.cs @@ -143,13 +143,6 @@ internal AndroidOptions(SentryOptions options) /// public bool EnableUserInteractionTracing { get; set; } = false; - /// - /// Deprecated. - /// - [Obsolete("This property is deprecated and ignored.")] - public TimeSpan ProfilingTracesInterval { get; set; } - - // ---------- From SentryOptions.java ---------- /// @@ -164,16 +157,6 @@ internal AndroidOptions(SentryOptions options) /// public TimeSpan ConnectionTimeout { get; set; } = TimeSpan.FromSeconds(5); - /// - /// The distribution of the application, associated with the release set in . - /// - [Obsolete("Use SentryOptions.Distribution instead. This property will be removed in a future version.")] - public string? Distribution - { - get => _options.Distribution; - set => _options.Distribution = value; - } - /// /// Gets or sets a value that indicates if the NDK (Android Native Development Kit) is enabled. /// The default value is true (enabled). @@ -201,17 +184,6 @@ internal AndroidOptions(SentryOptions options) /// public bool PrintUncaughtStackTrace { get; set; } = false; - /// - /// Gets or sets if profiling is enabled for transactions. - /// The default value is false (disabled). - /// - [Obsolete("Use ProfilesSampleRate instead")] - public bool ProfilingEnabled - { - get => (ProfilesSampleRate ?? 0.0) > 0.0; - set => ProfilesSampleRate = value ? 1.0 : null; - } - /// /// Gets or sets the profiling sample rate, between 0.0 and 1.0. /// The default value is null (disabled). diff --git a/src/Sentry/Platforms/iOS/SentryOptions.cs b/src/Sentry/Platforms/iOS/SentryOptions.cs index f1f51a7c94..c43712d357 100644 --- a/src/Sentry/Platforms/iOS/SentryOptions.cs +++ b/src/Sentry/Platforms/iOS/SentryOptions.cs @@ -56,16 +56,6 @@ internal IosOptions(SentryOptions options) /// public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromSeconds(3); - /// - /// The distribution of the application, associated with the release set in . - /// - [Obsolete("Use SentryOptions.Distribution instead. This property will be removed in a future version.")] - public string? Distribution - { - get => _options.Distribution; - set => _options.Distribution = value; - } - /// /// When enabled, the SDK tracks when the application stops responding for a specific amount of /// time defined by the option. @@ -97,23 +87,6 @@ internal IosOptions(SentryOptions options) /// public bool EnableAutoPerformanceTracing { get; set; } = true; - /// - /// When enabled, the SDK tracks performance for subclasses and HTTP requests - /// automatically. It also measures the app start and slow and frozen frames. - /// The default value is true (enabled). - /// - /// - /// Performance Monitoring must be enabled for this option to take effect. - /// See: https://docs.sentry.io/platforms/apple/performance/ - /// And: https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#opt-out - /// - [Obsolete("Use EnableAutoPerformanceTracing instead. This property will be removed in a future version.")] - public bool EnableAutoPerformanceTracking - { - get => EnableAutoPerformanceTracing; - set => EnableAutoPerformanceTracing = value; - } - /// /// When enabled, the SDK tracks the performance of Core Data operations. /// It requires enabling performance monitoring. @@ -125,22 +98,6 @@ public bool EnableAutoPerformanceTracking /// public bool EnableCoreDataTracing { get; set; } = true; - /// - /// When enabled, the SDK tracks the performance of Core Data operations. - /// It requires enabling performance monitoring. - /// The default value is true (enabled). - /// - /// - /// Performance Monitoring must be enabled for this option to take effect. - /// See https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#core-data-instrumentation - /// - [Obsolete("Use EnableCoreDataTracing instead. This property will be removed in a future version.")] - public bool EnableCoreDataTracking - { - get => EnableCoreDataTracing; - set => EnableCoreDataTracing = value; - } - /// /// When enabled, the SDK tracks performance for file IO reads and writes with /// if auto performance tracking and are enabled. @@ -151,21 +108,6 @@ public bool EnableCoreDataTracking /// public bool EnableFileIOTracing { get; set; } = true; - /// - /// When enabled, the SDK tracks performance for file IO reads and writes with - /// if auto performance tracking and are enabled. - /// The default value is true (enabled). - /// - /// - /// See https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#file-io-instrumentation - /// - [Obsolete("Use EnableFileIOTracing instead. This property will be removed in a future version.")] - public bool EnableFileIOTracking - { - get => EnableFileIOTracing; - set => EnableFileIOTracing = value; - } - /// /// When enabled, the SDK adds breadcrumbs for each network request /// if auto performance tracking and are enabled. @@ -192,20 +134,6 @@ public bool EnableFileIOTracking /// public bool EnableWatchdogTerminationTracking { get; set; } = true; - /// - /// Whether to enable out of memory tracking or not. - /// The default value is true (enabled). - /// - /// - /// https://docs.sentry.io/platforms/apple/configuration/out-of-memory/ - /// - [Obsolete("Use EnableWatchdogTerminationTracking instead. This property will be removed in a future version.")] - public bool EnableOutOfMemoryTracking - { - get => EnableWatchdogTerminationTracking; - set => EnableWatchdogTerminationTracking = value; - } - /// /// Whether the SDK should use swizzling or not. /// The default value is true (enabled). @@ -228,20 +156,6 @@ public bool EnableOutOfMemoryTracking /// public bool EnableUIViewControllerTracing { get; set; } = true; - /// - /// When enabled, the SDK tracks performance for subclasses. - /// The default value is true (enabled). - /// - /// - /// See https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#uiviewcontroller-instrumentation - /// - [Obsolete("Use EnableUIViewControllerTracing instead.")] - public bool EnableUIViewControllerTracking - { - get => EnableUIViewControllerTracing; - set => EnableUIViewControllerTracing = value; - } - /// /// When enabled, the SDK creates transactions for UI events like buttons clicks, switch toggles, /// and other UI elements that uses . @@ -252,28 +166,6 @@ public bool EnableUIViewControllerTracking /// public bool EnableUserInteractionTracing { get; set; } = false; - /// - /// This feature is no longer available. This option does nothing and will be removed in a future release. - /// - /// - /// This was removed from the Cocoa SDK in 8.6.0 with https://github.com/getsentry/sentry-cocoa/pull/2973 - /// - [Obsolete("This feature is no longer available. This option does nothing and will be removed in a future release.")] - public bool StitchAsyncCode { get; set; } = false; - - // /// - // /// This gets called shortly after the initialization of the SDK when the last program execution - // /// terminated with a crash. It is not guaranteed that this is called on the main thread. - // /// - // /// - // /// This callback is only executed once during the entire run of the program to avoid - // /// multiple callbacks if there are multiple crash events to send. This can happen when the program - // /// terminates with a crash before the SDK can send the crash event. - // /// You can use if you prefer a callback for every event. - // /// See also https://docs.sentry.io/platforms/apple/enriching-events/user-feedback/ - // /// - // public Action? OnCrashedLastRun { get; set; } = null; - /// /// When provided, this will be set as delegate on the used for network /// data-transfer tasks performed by the native Sentry Cocoa SDK. @@ -292,17 +184,6 @@ public bool EnableUIViewControllerTracking /// public bool EnableCocoaSdkTracing { get; set; } = false; - // /// - // /// Gets or sets a value that indicates if the callback will be invoked for - // /// events that originate from the embedded Cocoa SDK. The default value is false (disabled). - // /// - // /// - // /// This is an experimental feature and is imperfect, as the .NET SDK and the embedded Cocoa SDK don't - // /// implement all of the same features that may be present in the event graph. Some optional elements may - // /// be stripped away during the round-tripping between the two SDKs. Use with caution. - // /// - // public bool EnableCocoaSdkBeforeSend { get; set; } - internal List? InAppExcludes { get; private set; } internal List? InAppIncludes { get; private set; } diff --git a/src/Sentry/Protocol/Runtime.cs b/src/Sentry/Protocol/Runtime.cs index 1ee2a3b4e4..572c3d9047 100644 --- a/src/Sentry/Protocol/Runtime.cs +++ b/src/Sentry/Protocol/Runtime.cs @@ -51,9 +51,7 @@ public sealed class Runtime : IJsonSerializable, ICloneable, IUpdatable /// /// Clones this instance /// - // NOTE: This appears to have been public by mistake - [Obsolete("This method will be made internal in a future version.")] - public Runtime Clone() => ((ICloneable)this).Clone(); + internal Runtime Clone() => ((ICloneable)this).Clone(); Runtime ICloneable.Clone() => new() diff --git a/src/Sentry/Protocol/SentryException.cs b/src/Sentry/Protocol/SentryException.cs index c22bde09f4..c04b95bf2f 100644 --- a/src/Sentry/Protocol/SentryException.cs +++ b/src/Sentry/Protocol/SentryException.cs @@ -43,16 +43,6 @@ public sealed class SentryException : IJsonSerializable /// public Mechanism? Mechanism { get; set; } - /// - /// Arbitrary extra data that is related to this error. - /// - /// - /// This property is obsolete and should no longer be used. - /// Anything added here will be ignored and not sent to Sentry. - /// - [Obsolete("Use SentryException.Mechanism.Data instead. This property will be removed in a future version.")] - public IDictionary Data { get; } = new Dictionary(StringComparer.Ordinal); - /// public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger) { diff --git a/src/Sentry/Reflection/AssemblyExtensions.cs b/src/Sentry/Reflection/AssemblyExtensions.cs index 104dca2005..486edfba6f 100644 --- a/src/Sentry/Reflection/AssemblyExtensions.cs +++ b/src/Sentry/Reflection/AssemblyExtensions.cs @@ -4,8 +4,7 @@ namespace Sentry.Reflection; /// Extension methods to . /// [EditorBrowsable(EditorBrowsableState.Never)] -[Obsolete("Should not be public. This method will be removed in version 4.")] -public static class AssemblyExtensions +internal static class AssemblyExtensions { /// /// Get the assemblies Name and Version. diff --git a/src/Sentry/Scope.cs b/src/Sentry/Scope.cs index f504fd41c7..5866b6a0de 100644 --- a/src/Sentry/Scope.cs +++ b/src/Sentry/Scope.cs @@ -536,12 +536,6 @@ internal void Evaluate() } } - /// - /// Obsolete. Use the property instead. - /// - [Obsolete("Use the Span property instead. This method will be removed in a future release.")] - public ISpanTracer? GetSpan() => Span; - private ISpanTracer? _span; /// diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 53a38b9bee..d8085ec032 100644 --- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -32,13 +32,6 @@ namespace Sentry.AspNetCore { Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } } - [System.Obsolete("This interface is tightly coupled to AspNetCore and will be removed in version 4." + - "0.0. Please consider using ISentryUserFactory with IHttpContextAccessor instead." + - "")] - public interface IUserFactory - { - Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context); - } public static class SamplingExtensions { public static Microsoft.AspNetCore.Http.HttpContext? TryGetHttpContext(this Sentry.TransactionSamplingContext samplingContext) { } diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 53a38b9bee..d8085ec032 100644 --- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -32,13 +32,6 @@ namespace Sentry.AspNetCore { Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } } - [System.Obsolete("This interface is tightly coupled to AspNetCore and will be removed in version 4." + - "0.0. Please consider using ISentryUserFactory with IHttpContextAccessor instead." + - "")] - public interface IUserFactory - { - Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context); - } public static class SamplingExtensions { public static Microsoft.AspNetCore.Http.HttpContext? TryGetHttpContext(this Sentry.TransactionSamplingContext samplingContext) { } diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index 53a38b9bee..d8085ec032 100644 --- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -32,13 +32,6 @@ namespace Sentry.AspNetCore { Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } } - [System.Obsolete("This interface is tightly coupled to AspNetCore and will be removed in version 4." + - "0.0. Please consider using ISentryUserFactory with IHttpContextAccessor instead." + - "")] - public interface IUserFactory - { - Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context); - } public static class SamplingExtensions { public static Microsoft.AspNetCore.Http.HttpContext? TryGetHttpContext(this Sentry.TransactionSamplingContext samplingContext) { } diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 53a38b9bee..d8085ec032 100644 --- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -32,13 +32,6 @@ namespace Sentry.AspNetCore { Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } } - [System.Obsolete("This interface is tightly coupled to AspNetCore and will be removed in version 4." + - "0.0. Please consider using ISentryUserFactory with IHttpContextAccessor instead." + - "")] - public interface IUserFactory - { - Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context); - } public static class SamplingExtensions { public static Microsoft.AspNetCore.Http.HttpContext? TryGetHttpContext(this Sentry.TransactionSamplingContext samplingContext) { } diff --git a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 2a9066abe0..53cafe92cc 100644 --- a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -28,12 +28,6 @@ namespace Sentry.EntityFramework public void ScalarExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } public void ScalarExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } } - public static class SentryDatabaseLogging - { - [System.Obsolete("This method is called automatically by options.AddEntityFramework. This method wi" + - "ll be removed in future versions.")] - public static Sentry.EntityFramework.SentryCommandInterceptor? UseBreadcrumbs(Sentry.EntityFramework.IQueryLogger? logger = null) { } - } } namespace Sentry { diff --git a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 2a9066abe0..53cafe92cc 100644 --- a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -28,12 +28,6 @@ namespace Sentry.EntityFramework public void ScalarExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } public void ScalarExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } } - public static class SentryDatabaseLogging - { - [System.Obsolete("This method is called automatically by options.AddEntityFramework. This method wi" + - "ll be removed in future versions.")] - public static Sentry.EntityFramework.SentryCommandInterceptor? UseBreadcrumbs(Sentry.EntityFramework.IQueryLogger? logger = null) { } - } } namespace Sentry { diff --git a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index 2a9066abe0..53cafe92cc 100644 --- a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -28,12 +28,6 @@ namespace Sentry.EntityFramework public void ScalarExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } public void ScalarExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } } - public static class SentryDatabaseLogging - { - [System.Obsolete("This method is called automatically by options.AddEntityFramework. This method wi" + - "ll be removed in future versions.")] - public static Sentry.EntityFramework.SentryCommandInterceptor? UseBreadcrumbs(Sentry.EntityFramework.IQueryLogger? logger = null) { } - } } namespace Sentry { diff --git a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 2a9066abe0..53cafe92cc 100644 --- a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -28,12 +28,6 @@ namespace Sentry.EntityFramework public void ScalarExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } public void ScalarExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } } - public static class SentryDatabaseLogging - { - [System.Obsolete("This method is called automatically by options.AddEntityFramework. This method wi" + - "ll be removed in future versions.")] - public static Sentry.EntityFramework.SentryCommandInterceptor? UseBreadcrumbs(Sentry.EntityFramework.IQueryLogger? logger = null) { } - } } namespace Sentry { diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index abcf9e51fd..60979c2d51 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -439,8 +439,6 @@ namespace Sentry public void ClearAttachments() { } public void ClearBreadcrumbs() { } public Sentry.Scope Clone() { } - [System.Obsolete("Use the Span property instead. This method will be removed in a future release.")] - public Sentry.ISpanTracer? GetSpan() { } public void SetExtra(string key, object? value) { } public void SetTag(string key, string value) { } public void UnsetTag(string key) { } @@ -1356,13 +1354,6 @@ namespace Sentry.Infrastructure public ConsoleDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } protected override void LogMessage(string message) { } } - [System.Obsolete("Logger doesn\'t work outside of Sentry SDK. Please use TraceDiagnosticLogger inste" + - "ad")] - public class DebugDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger - { - public DebugDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } - protected override void LogMessage(string message) { } - } public abstract class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger { protected DiagnosticLogger(Sentry.SentryLevel minimalLevel) { } @@ -1383,9 +1374,6 @@ namespace Sentry.Infrastructure public sealed class SystemClock : Sentry.Infrastructure.ISystemClock { public static readonly Sentry.Infrastructure.SystemClock Clock; - [System.Obsolete("This constructor will become private in a future major version. Use the `SystemCl" + - "ock.Clock` singleton instead.")] - public SystemClock() { } public System.DateTimeOffset GetUtcNow() { } } public class TraceDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger @@ -1629,17 +1617,12 @@ namespace Sentry.Protocol public string? Name { get; set; } public string? RawDescription { get; set; } public string? Version { get; set; } - [System.Obsolete("This method will be made internal in a future version.")] - public Sentry.Protocol.Runtime Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } public static Sentry.Protocol.Runtime FromJson(System.Text.Json.JsonElement json) { } } public sealed class SentryException : Sentry.IJsonSerializable { public SentryException() { } - [System.Obsolete("Use SentryException.Mechanism.Data instead. This property will be removed in a fu" + - "ture version.")] - public System.Collections.Generic.IDictionary Data { get; } public Sentry.Protocol.Mechanism? Mechanism { get; set; } public string? Module { get; set; } public Sentry.SentryStackTrace? Stacktrace { get; set; } @@ -1705,14 +1688,6 @@ namespace Sentry.Protocol.Envelopes System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); } } -namespace Sentry.Reflection -{ - [System.Obsolete("Should not be public. This method will be removed in version 4.")] - public static class AssemblyExtensions - { - public static Sentry.SdkVersion GetNameAndVersion(this System.Reflection.Assembly asm) { } - } -} public static class SentryExceptionExtensions { public static void AddSentryContext(this System.Exception ex, string name, System.Collections.Generic.IReadOnlyDictionary data) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index abcf9e51fd..60979c2d51 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -439,8 +439,6 @@ namespace Sentry public void ClearAttachments() { } public void ClearBreadcrumbs() { } public Sentry.Scope Clone() { } - [System.Obsolete("Use the Span property instead. This method will be removed in a future release.")] - public Sentry.ISpanTracer? GetSpan() { } public void SetExtra(string key, object? value) { } public void SetTag(string key, string value) { } public void UnsetTag(string key) { } @@ -1356,13 +1354,6 @@ namespace Sentry.Infrastructure public ConsoleDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } protected override void LogMessage(string message) { } } - [System.Obsolete("Logger doesn\'t work outside of Sentry SDK. Please use TraceDiagnosticLogger inste" + - "ad")] - public class DebugDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger - { - public DebugDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } - protected override void LogMessage(string message) { } - } public abstract class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger { protected DiagnosticLogger(Sentry.SentryLevel minimalLevel) { } @@ -1383,9 +1374,6 @@ namespace Sentry.Infrastructure public sealed class SystemClock : Sentry.Infrastructure.ISystemClock { public static readonly Sentry.Infrastructure.SystemClock Clock; - [System.Obsolete("This constructor will become private in a future major version. Use the `SystemCl" + - "ock.Clock` singleton instead.")] - public SystemClock() { } public System.DateTimeOffset GetUtcNow() { } } public class TraceDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger @@ -1629,17 +1617,12 @@ namespace Sentry.Protocol public string? Name { get; set; } public string? RawDescription { get; set; } public string? Version { get; set; } - [System.Obsolete("This method will be made internal in a future version.")] - public Sentry.Protocol.Runtime Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } public static Sentry.Protocol.Runtime FromJson(System.Text.Json.JsonElement json) { } } public sealed class SentryException : Sentry.IJsonSerializable { public SentryException() { } - [System.Obsolete("Use SentryException.Mechanism.Data instead. This property will be removed in a fu" + - "ture version.")] - public System.Collections.Generic.IDictionary Data { get; } public Sentry.Protocol.Mechanism? Mechanism { get; set; } public string? Module { get; set; } public Sentry.SentryStackTrace? Stacktrace { get; set; } @@ -1705,14 +1688,6 @@ namespace Sentry.Protocol.Envelopes System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); } } -namespace Sentry.Reflection -{ - [System.Obsolete("Should not be public. This method will be removed in version 4.")] - public static class AssemblyExtensions - { - public static Sentry.SdkVersion GetNameAndVersion(this System.Reflection.Assembly asm) { } - } -} public static class SentryExceptionExtensions { public static void AddSentryContext(this System.Exception ex, string name, System.Collections.Generic.IReadOnlyDictionary data) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index abcf9e51fd..60979c2d51 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -439,8 +439,6 @@ namespace Sentry public void ClearAttachments() { } public void ClearBreadcrumbs() { } public Sentry.Scope Clone() { } - [System.Obsolete("Use the Span property instead. This method will be removed in a future release.")] - public Sentry.ISpanTracer? GetSpan() { } public void SetExtra(string key, object? value) { } public void SetTag(string key, string value) { } public void UnsetTag(string key) { } @@ -1356,13 +1354,6 @@ namespace Sentry.Infrastructure public ConsoleDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } protected override void LogMessage(string message) { } } - [System.Obsolete("Logger doesn\'t work outside of Sentry SDK. Please use TraceDiagnosticLogger inste" + - "ad")] - public class DebugDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger - { - public DebugDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } - protected override void LogMessage(string message) { } - } public abstract class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger { protected DiagnosticLogger(Sentry.SentryLevel minimalLevel) { } @@ -1383,9 +1374,6 @@ namespace Sentry.Infrastructure public sealed class SystemClock : Sentry.Infrastructure.ISystemClock { public static readonly Sentry.Infrastructure.SystemClock Clock; - [System.Obsolete("This constructor will become private in a future major version. Use the `SystemCl" + - "ock.Clock` singleton instead.")] - public SystemClock() { } public System.DateTimeOffset GetUtcNow() { } } public class TraceDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger @@ -1629,17 +1617,12 @@ namespace Sentry.Protocol public string? Name { get; set; } public string? RawDescription { get; set; } public string? Version { get; set; } - [System.Obsolete("This method will be made internal in a future version.")] - public Sentry.Protocol.Runtime Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } public static Sentry.Protocol.Runtime FromJson(System.Text.Json.JsonElement json) { } } public sealed class SentryException : Sentry.IJsonSerializable { public SentryException() { } - [System.Obsolete("Use SentryException.Mechanism.Data instead. This property will be removed in a fu" + - "ture version.")] - public System.Collections.Generic.IDictionary Data { get; } public Sentry.Protocol.Mechanism? Mechanism { get; set; } public string? Module { get; set; } public Sentry.SentryStackTrace? Stacktrace { get; set; } @@ -1705,14 +1688,6 @@ namespace Sentry.Protocol.Envelopes System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); } } -namespace Sentry.Reflection -{ - [System.Obsolete("Should not be public. This method will be removed in version 4.")] - public static class AssemblyExtensions - { - public static Sentry.SdkVersion GetNameAndVersion(this System.Reflection.Assembly asm) { } - } -} public static class SentryExceptionExtensions { public static void AddSentryContext(this System.Exception ex, string name, System.Collections.Generic.IReadOnlyDictionary data) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 886d2eb616..967a380b30 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -438,8 +438,6 @@ namespace Sentry public void ClearAttachments() { } public void ClearBreadcrumbs() { } public Sentry.Scope Clone() { } - [System.Obsolete("Use the Span property instead. This method will be removed in a future release.")] - public Sentry.ISpanTracer? GetSpan() { } public void SetExtra(string key, object? value) { } public void SetTag(string key, string value) { } public void UnsetTag(string key) { } @@ -1353,13 +1351,6 @@ namespace Sentry.Infrastructure public ConsoleDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } protected override void LogMessage(string message) { } } - [System.Obsolete("Logger doesn\'t work outside of Sentry SDK. Please use TraceDiagnosticLogger inste" + - "ad")] - public class DebugDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger - { - public DebugDiagnosticLogger(Sentry.SentryLevel minimalLevel) { } - protected override void LogMessage(string message) { } - } public abstract class DiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger { protected DiagnosticLogger(Sentry.SentryLevel minimalLevel) { } @@ -1380,9 +1371,6 @@ namespace Sentry.Infrastructure public sealed class SystemClock : Sentry.Infrastructure.ISystemClock { public static readonly Sentry.Infrastructure.SystemClock Clock; - [System.Obsolete("This constructor will become private in a future major version. Use the `SystemCl" + - "ock.Clock` singleton instead.")] - public SystemClock() { } public System.DateTimeOffset GetUtcNow() { } } public class TraceDiagnosticLogger : Sentry.Infrastructure.DiagnosticLogger @@ -1627,17 +1615,12 @@ namespace Sentry.Protocol public string? Name { get; set; } public string? RawDescription { get; set; } public string? Version { get; set; } - [System.Obsolete("This method will be made internal in a future version.")] - public Sentry.Protocol.Runtime Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } public static Sentry.Protocol.Runtime FromJson(System.Text.Json.JsonElement json) { } } public sealed class SentryException : Sentry.IJsonSerializable { public SentryException() { } - [System.Obsolete("Use SentryException.Mechanism.Data instead. This property will be removed in a fu" + - "ture version.")] - public System.Collections.Generic.IDictionary Data { get; } public Sentry.Protocol.Mechanism? Mechanism { get; set; } public string? Module { get; set; } public Sentry.SentryStackTrace? Stacktrace { get; set; } @@ -1703,14 +1686,6 @@ namespace Sentry.Protocol.Envelopes System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); } } -namespace Sentry.Reflection -{ - [System.Obsolete("Should not be public. This method will be removed in version 4.")] - public static class AssemblyExtensions - { - public static Sentry.SdkVersion GetNameAndVersion(this System.Reflection.Assembly asm) { } - } -} public static class SentryExceptionExtensions { public static void AddSentryContext(this System.Exception ex, string name, System.Collections.Generic.IReadOnlyDictionary data) { }