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
|
markushi
approved these changes
Nov 5, 2026
| * | ||
| * @return the list of exception class names excluded from event deduplication | ||
| */ | ||
| public @Nullable List<FilterString> getIgnoredErrorsForDeduplication() { |
Member
There was a problem hiding this comment.
I'm wondering if we should mark those APIs as internal for now, unless someone requests access.
Member
Author
There was a problem hiding this comment.
The idea was to give everyone a tool to exclude their own singleton exceptions, so I think it should be public.
This was referenced Nov 6, 2026
Allow deduplication exclusions to be configured through external properties, Android manifest metadata, and Spring Boot binding. Preserve built-in defaults when unset and replace them when explicitly configured, including empty lists. Refs GH-6365 Co-Authored-By: Claude <noreply@anthropic.com>
adinauer
force-pushed
the
fix/netty-read-timeout-deduplication
branch
from
November 6, 2026 11:00
e995cdd to
4e5a867
Compare
Return deduplication exclusions as strings while retaining compiled filters through an internal getter. This keeps the public getter and setter symmetric and prevents callers from mutating internal state. Refs #6365 Co-Authored-By: Claude <noreply@anthropic.com>
Resolve conflicts after the symmetric ignored-filter getter changes landed on the target branch. Preserve the string-based getter API and the new deduplication configuration. Co-Authored-By: Claude <noreply@anthropic.com>
Netty reuses WriteTimeoutException.INSTANCE across independent timeout occurrences. Exclude it by default alongside ReadTimeoutException so later write timeout events are not suppressed for the SDK lifetime. Refs #6365 Co-Authored-By: Claude <noreply@anthropic.com>
Return ignored top-level exceptions before checking their causes so configured exclusions consistently preserve the event. Refs #6365 Co-Authored-By: Claude <noreply@anthropic.com>
Treat ignored exceptions as cause-chain boundaries so deeper causes do not discard an event while non-ignored wrappers remain deduplicatable. Refs #6365 Co-Authored-By: Claude <noreply@anthropic.com>
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.