Repository navigation
feat!: remove SentryOptions.EnableMetrics - #5690
Merged
Merged
Conversation
Metrics have been on regardless of this option since 6.10.0, and #5509 made it an obsolete no-op that 7.0.0 would remove. Code that set EnableMetrics = false still compiled, with a warning, and sent metrics anyway. It now fails to build, so users move to SetBeforeSendMetric. The JavaScript SDK has removed the same option. Cocoa and Python have deprecated it and will remove it in their next major. The configuration binder ignores a leftover EnableMetrics key in the Sentry section, so those apps still start. A test covers it through a UseSentry host. Refs #5675 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version7 #5690 +/- ##
============================================
+ Coverage 74.65% 75.18% +0.53%
============================================
Files 505 520 +15
Lines 18372 18895 +523
Branches 3535 3664 +129
============================================
+ Hits 13715 14206 +491
- Misses 3796 3827 +31
- Partials 861 862 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The test checked that the configuration binder ignores a key for a property that no longer exists. It passed, which confirms that apps with the leftover key still start. Keeping it would only test a removed option. Refs #5675 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #5675
SentryOptions.EnableMetricshas done nothing since 6.10.0. #5509 made it obsolete, with a message saying it would be removed in 7.0.0. Code that setsEnableMetrics = falsestill compiles, with only a warning, and the SDK sends metrics anyway. Removing the property turns that into a build error, so users find out and switch toSetBeforeSendMetric. The JavaScript SDK has removed the same option. Cocoa and Python have deprecated it and will remove it in their next major.Breaking changes
SentryOptions.EnableMetricsis removed. Delete it from the options passed toSentrySdk.Initand from configuration. To drop metrics, returnnullfromSetBeforeSendMetric.Notes for review
EnableMetricskey in theSentryconfiguration section is ignored by the configuration binder, so apps still start. I checked this with a test that runs a realUseSentryhost, then removed the test so the suite doesn't keep testing a property that no longer exists.Logging:Sentry, the key already stops the app at startup, as every SDK setting there has since feat(mel)!: the Microsoft.Extensions.Logging integration no longer initializes the SDK #5595. That doesn't change.MissingMethodExceptionon 7.0.🤖 Generated with Claude Code