Skip to content

feat(core): [Scope-Based Deduplication 3] Add scope-based deduplication option - #6431

Draft
adinauer wants to merge 2 commits into
feat/scope-based-deduplication-processorfrom
feat/scope-based-deduplication-option
Draft

adinauer wants to merge 2 commits into
feat/scope-based-deduplication-processorfrom
feat/scope-based-deduplication-option

Conversation

@adinauer

@adinauer adinauer commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Scope-Based Deduplication)


📜 Description

Expose experimental scope-based duplicate event detection through SentryOptions, external properties, Android manifest metadata, and all supported Spring Boot property binders. Install the processor only on the root isolation scope and warn when legacy deduplication remains enabled.

Use the new behavior with:

enable-deduplication=false
enable-scope-based-deduplication=true

💡 Motivation and Context

Reusable or singleton exception instances can occur repeatedly across requests, but global throwable identity deduplication can suppress every occurrence after the first. Isolation-scope state preserves same-request cross-integration deduplication without suppressing unrelated requests.

refs: #6365

💚 How did you test it?

  • Full ./gradlew :sentry:test
  • Logback, Log4j2, and JUL integration tests
  • Spring MVC and WebFlux integration tests
  • Spring Boot 2, 3, and 4 property and installation tests
  • Android manifest and initialization tests
  • ./gradlew spotlessApply :sentry:updateKotlinAbi

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Evaluate the experimental mode with affected integrations before considering it as the default deduplication behavior.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

adinauer and others added 2 commits October 28, 2026 14:01
Expose the experimental mode through core, external, Android, and Spring configuration. Install its processor only on the root isolation scope and warn when legacy deduplication remains enabled.

Cover reusable exceptions across logging and Spring request integrations so repeated singleton failures remain visible across isolation scopes.

Refs GH-6365

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 609b5e7

@sentry

sentry Bot commented Oct 30, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant