FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(core): [Callback Errors 4] Drop failed breadcrumbs by adinauer · Pull Request #6143 · getsentry/sentry-java · GitHub

fix(core): [Callback Errors 4] Drop failed breadcrumbs - #6143

Open
adinauer wants to merge 3 commits into
fix/callback-error-handling-event-processorsfrom
fix/callback-error-handling-breadcrumbs
Open

adinauer wants to merge 3 commits into
fix/callback-error-handling-event-processorsfrom
fix/callback-error-handling-breadcrumbs

Conversation

adinauer commented Sep 22, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

PR Stack (Callback Errors)


📜 Description

Drops a breadcrumb when beforeBreadcrumb throws. The failed breadcrumb is not stored, decorated with exception details, or sent to scope observers.

Later breadcrumb additions continue to work because the callback reentrancy guard is released after the exception.

💡 Motivation and Context

Keeping the original breadcrumb after a filtering callback fails can retain data the callback intended to remove. Dropping it matches the fail-closed callback policy and avoids storing callback exception details on telemetry.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew :sentry:test --tests io.sentry.ScopeTest --tests io.sentry.ScopesTest

📝 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

None.

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

Drop breadcrumbs when beforeBreadcrumb throws instead of storing the breadcrumb with exception details. Keep observer state unchanged and release the callback reentrancy guard for later additions.

Refs #6081
Co-Authored-By: Claude <noreply@anthropic.com>

github-actions Bot commented Sep 22, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- [Callback Errors 4] Drop failed breadcrumbs ([#6143](https://github.com/getsentry/sentry-java/pull/6143))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 8a06fde

sentry Bot commented Sep 22, 2026 •
edited
Loading

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

SentryLevel.ERROR,
"The BeforeBreadcrumbCallback callback threw an exception. Exception details will be added to the breadcrumb.",
"The BeforeBreadcrumb callback threw an exception. Dropping breadcrumb.",
e);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There was an internal discussion around reporting dropped breadcrumbs in client reports via log_item category. This creates confusion since you can't tell whether a log item or breadcrumb was dropped. Instead we've decided not to report dropped breadcrumbs.

Carry the inserted SDK processor marker forward through the adjacent stack
branch without rewriting existing history or changing breadcrumb behavior.

Co-Authored-By: Claude <noreply@anthropic.com>
adinauer changed the title fix(core): [Callback Errors 3] Drop failed breadcrumbs fix(core): [Callback Errors 4] Drop failed breadcrumbs Sep 24, 2026
Merge #6142 forward into #6143 so SDK-owned processor failures preserve\ntelemetry throughout the stack. Keep the breadcrumb-only diff unchanged\nand retain both changelog entries without rewriting existing history.

This branch has not been deployed

No deployments
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL