Skip to content

Fix/5844 explicit breadcrumb clear - #6439

Open
rocky-bgta wants to merge 8 commits into
getsentry:mainfrom
rocky-bgta:fix/5844-explicit-breadcrumb-clear
Open

rocky-bgta wants to merge 8 commits into
getsentry:mainfrom
rocky-bgta:fix/5844-explicit-breadcrumb-clear

Conversation

@rocky-bgta

@rocky-bgta rocky-bgta commented Oct 31, 2026 •

Copy link
Copy Markdown

Summary

Fixes #5844

Updated the breadcrumb observer handling to use clearBreadcrumbs() instead of setBreadcrumbs().

Changes

  • Removed unnecessary observer calls when adding breadcrumbs.
  • Updated the persistence logic to clear cached breadcrumbs explicitly.
  • Updated related tests and API definitions.

Testing

  • Updated the relevant test cases.
  • Local tests have not been run yet.
  • CI verification is pending.

Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
Refs getsentry#5844

Signed-off-by: Md. Nazmus Salahin Rocky <rocky.bgta@gmail.com>
@rocky-bgta
rocky-bgta marked this pull request as ready for review October 31, 2026 13:14
@rocky-bgta
rocky-bgta requested review from a team and adinauer as code owners October 31, 2026 13:14
@rocky-bgta
rocky-bgta requested review from markushi and runningcode and removed request for a team October 31, 2026 13:14

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5a60510. Configure here.

void addBreadcrumb(@NotNull Breadcrumb crumb);

void setBreadcrumbs(@NotNull Collection<Breadcrumb> breadcrumbs);
void clearBreadcrumbs();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Breaking observer API without deprecation

High Severity

Replacing IScopeObserver.setBreadcrumbs with abstract clearBreadcrumbs is binary-incompatible. Existing implementors can throw AbstractMethodError when breadcrumbs are cleared, and ScopeObserverAdapter subclasses that overrode setBreadcrumbs stop receiving clear notifications. Issue #5844 targeted this for 9.0; the repo is still at 8.62.0.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bugbot

Reviewed by Cursor Bugbot for commit 5a60510. Configure here.

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.

Replace misleading IScopeObserver.setBreadcrumbs with clearBreadcrumbs

1 participant