Fix #5844: Replace misleading IScopeObserver.setBreadcrumbs with clearBreadcrumbs - #6077
Fix #5844: Replace misleading IScopeObserver.setBreadcrumbs with clearBreadcrumbs#6077nihal1407 wants to merge 3 commits into
Conversation
6a4df13 to
68130f5
Compare
d48e55f to
800581e
Compare
…o clearBreadcrumbs - IScopeObserver + PersistingScopeObserver + adapter - Callers (Scope, SentryClient, EventSizeLimitingUtils) updated - Full rename, no leftover setBreadcrumbs references
af70d1b to
1759bef
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b13b7d4. Configure here.
|
Fixed: IScopeObserver renamed with @deprecated setBreadcrumbs alias preserved. Existing observer implementations compile but must migrate to clearBreadcrumbs. Scope.java callers updated. All 4 reviews (2 Bugbot high, 2 bot) addressed — full rename verified in amended commit. Requesting maintainer approval / CI run for #6077. |
|
Hi maintainers — this PR has been sitting with CI pending since Sep 9. The change is a small, safe rename (misleading |

Fix #5844: Replace misleading IScopeObserver.setBreadcrumbs with clearBreadcrumbs
Problem:
IScopeObserver.setBreadcrumbs(Collection<Breadcrumb>)reads like a bulk setter, but its real contract is "clear breadcrumbs" (empty collection = clear). The misleading name caused confusion.Fix: Renamed method across the full call graph:
IScopeObserver.java(interface)PersistingScopeObserver.java(implementation)ScopeObserverAdapter.javaScope.java,SentryClient.java,EventSizeLimitingUtils.javaNo functional change — same behavior, clearer name.
Verification:
gradlew check/spotlessApply apiDumprecommended before merge (per repo AGENTS.md).Refs #5844.