From d107f27d1a0db5dd8b02371e693443e4cff309b0 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 15 Nov 2023 15:53:39 +0100 Subject: [PATCH 1/3] dispose no longer a problem --- src/Sentry/SentryClient.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Sentry/SentryClient.cs b/src/Sentry/SentryClient.cs index 23794cf049..205d3017b7 100644 --- a/src/Sentry/SentryClient.cs +++ b/src/Sentry/SentryClient.cs @@ -403,7 +403,6 @@ private bool CaptureEnvelope(Envelope envelope) /// Disposes this client /// /// - [Obsolete("Sentry client should not be explicitly disposed of. This method will be removed in version 4.")] public void Dispose() { _options.LogDebug("Flushing SentryClient."); From be6d9e87e3354690d37e10300d5d782a422735be Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 16 Nov 2023 11:31:16 +0100 Subject: [PATCH 2/3] verified --- test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt | 2 -- test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt | 2 -- test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt | 2 -- test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt | 2 -- 4 files changed, 8 deletions(-) diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 237db27cab..abcf9e51fd 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -482,8 +482,6 @@ namespace Sentry public void CaptureTransaction(Sentry.Transaction transaction) { } public void CaptureTransaction(Sentry.Transaction transaction, Sentry.Hint? hint) { } public void CaptureUserFeedback(Sentry.UserFeedback userFeedback) { } - [System.Obsolete("Sentry client should not be explicitly disposed of. This method will be removed i" + - "n version 4.")] public void Dispose() { } public System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout) { } } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 237db27cab..abcf9e51fd 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -482,8 +482,6 @@ namespace Sentry public void CaptureTransaction(Sentry.Transaction transaction) { } public void CaptureTransaction(Sentry.Transaction transaction, Sentry.Hint? hint) { } public void CaptureUserFeedback(Sentry.UserFeedback userFeedback) { } - [System.Obsolete("Sentry client should not be explicitly disposed of. This method will be removed i" + - "n version 4.")] public void Dispose() { } public System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout) { } } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index 237db27cab..abcf9e51fd 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -482,8 +482,6 @@ namespace Sentry public void CaptureTransaction(Sentry.Transaction transaction) { } public void CaptureTransaction(Sentry.Transaction transaction, Sentry.Hint? hint) { } public void CaptureUserFeedback(Sentry.UserFeedback userFeedback) { } - [System.Obsolete("Sentry client should not be explicitly disposed of. This method will be removed i" + - "n version 4.")] public void Dispose() { } public System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout) { } } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index cd39043dd6..886d2eb616 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -481,8 +481,6 @@ namespace Sentry public void CaptureTransaction(Sentry.Transaction transaction) { } public void CaptureTransaction(Sentry.Transaction transaction, Sentry.Hint? hint) { } public void CaptureUserFeedback(Sentry.UserFeedback userFeedback) { } - [System.Obsolete("Sentry client should not be explicitly disposed of. This method will be removed i" + - "n version 4.")] public void Dispose() { } public System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout) { } } From d6ecb2f70cf472cd93ca593b0ef4e03134ace3f1 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 16 Nov 2023 20:14:36 +0100 Subject: [PATCH 3/3] Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de88f48511..76b4b3e9f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ Additionally, we're dropping support for some of the old target frameworks, plea - Contexts now inherits from `IDictionary` rather than `ConcurrentDictionary`. The specific dictionary being used is an implementation detail. ([#2729](https://github.com/getsentry/sentry-dotnet/pull/2729)) - Transaction names for ASP.NET Core are now consistently named `HTTP-VERB /path` (e.g. `GET /home`). Previously the leading forward slash was missing for some endpoints. ([#2808](https://github.com/getsentry/sentry-dotnet/pull/2808)) - `DebugImage` and `DebugMeta` moved to `Sentry.Protocol` namespace. ([#2815](https://github.com/getsentry/sentry-dotnet/pull/2815)) +- `SentryClient.Dispose` is no longer obsolete ([#2842](https://github.com/getsentry/sentry-dotnet/pull/2842)) ### Fixes