Repository navigation
Conversation
Allow exception class names and patterns to bypass throwable-based event deduplication. Exclude Netty ReadTimeoutException by default so its static singleton does not suppress independent timeout occurrences for the SDK lifetime. Fixes #6365
📲 Install BuildsAndroid
|
This branch has not been deployed
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.
📜 Description
Adds
ignoredErrorsForDeduplicationto let exception types bypass throwable-based event deduplication by fully qualified class name or full regular expression.io.netty.handler.timeout.ReadTimeoutExceptionis excluded by default. Netty reusesReadTimeoutException.INSTANCEfor independent timeout occurrences, so storing that singleton in the SDK-lifetime deduplication map previously caused later timeouts to be discarded indefinitely.Configuration semantics:
setIgnoredErrorsForDeduplicationreplaces the built-in list;nullor an empty list removes all exclusions.addIgnoredErrorForDeduplicationextends the current list and therefore preserves the default entry.Excluded types are neither checked against nor inserted into the deduplication map. This restores independent occurrences, but also means that multiple integrations capturing the same excluded exception may each send an event. For
Noccurrences captured throughKintegrations, volume can reachN × K, which can increase event quota and customer cost during timeout bursts.💡 Motivation and Context
Netty holds a static reference to
ReadTimeoutException.INSTANCE. Because the SDK deduplication processor uses throwable keys in a weak map, the static singleton never becomes collectible and its first capture can suppress unrelated later timeouts for the lifetime of the SDK client.The configurable exclusion keeps deduplication enabled for other exception types while allowing known reusable exceptions to fail open.
Fixes #6365
Refs JAVA-794
💚 How did you test it?
./gradlew :sentry:test --tests io.sentry.DuplicateEventDetectionEventProcessorTest --tests io.sentry.SentryOptionsTest./gradlew spotlessApply apiDumpgit diff --check📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.