Repository navigation
chore: Remove unused SentrySuccessfulResponseBody - #5899
Merged
jamescrosswell merged 1 commit intoNov 9, 2026
Merged
Conversation
Its only caller, a DEBUG-only response id assert in HttpTransport, was removed by #544 (Envelopes) in 2020.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5899 +/- ##
==========================================
+ Coverage 76.77% 76.78% +0.01%
==========================================
Files 532 532
Lines 19826 19826
Branches 3909 3909
==========================================
+ Hits 15222 15224 +2
+ Misses 3718 3717 -1
+ Partials 886 885 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
marked this pull request as ready for review
November 9, 2026 20:31
jamescrosswell
requested review from
jamescrosswell and
ric-oliv
as code owners
November 9, 2026 20:31
jamescrosswell
approved these changes
Nov 9, 2026
jamescrosswell
deleted the
chore/remove-unused-sentry-successful-response-body
branch
November 9, 2026 20:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
src/Sentry/Internal/Http/SentrySuccessfulResponseBody.cs, aninternal,#if DEBUG-only DTO for the{"id": "..."}body that Sentry returns on a successful store request (23 lines). Nothing references it.When it was added: df6a20f ("Composer assembles the SDK"), part of #9 (
Implementing the new unified SDK API), merged 2018-06-10.HttpTransportused it in a#if DEBUGblock to deserialize the response body andDebug.Assertthat the returned id matched the event id it had sent.When it became irrelevant, and why: #544 (
Envelopes, merged 2020-10-15, commit 5dada5b) switchedHttpTransportfrom sending single events to sending envelopes. It replaced that DEBUG-only assert with a"Envelope {0} successfully received by Sentry."debug log and deleted the only call toDeserializeObject<SentrySuccessfulResponseBody>. The class file wasn't part of that change, so it stayed behind. Since then it has only been touched by cosmetic passes: #562 (reference URL), #509 (nullable annotations, before #544) and #2063 (misc cleanup).Evidence it's unused:
git log -S SentrySuccessfulResponseBodyacross the full history returns only df6a20f (added the type and its caller) and 5dada5b (removed the caller).modules/forSentrySuccessfulResponseBodyfinds only the deleted file. The test helperSentryResponses.SentryOkResponseBodyis an unrelated string constant.#pragma warning disable S1144("Unused private types or members should be removed") andS3459to silence the analyzers that flag it.Why it's safe: the type is
internaland only compiles in Debug, so it's not in the shipped Release assemblies and not in the API approval snapshots. Nothing constructs it, so behavior doesn't change. No target framework or package dependency changes.Checks:
dotnet build src/Sentry/Sentry.csprojpasses in both Debug (where the file used to compile) and Release for net8.0, net9.0, net10.0, netstandard2.1, netstandard2.0 and net462, with 0 warnings.Sentry.Testson net10.0: 2,800 passed, 0 failed, 5 skipped. No snapshot changes.workloadVersionwas dropped fromglobal.jsonfor the local build only. That change isn't committed.#skip-changelog
via automation
sched_2fb5d12bd3a78841d7d2559c56e8141d· Run IDsched_2fb5d12bd3a78841d7d2559c56e8141d:1794207600000.--
View Session [Sentry]