Skip to content

Conversation

@yousif-bugsnag
Copy link
Contributor

Goal

Fixes an issue where onSpanEnd callbacks are not invoked for sampled spans. Since the span tracking plugins rely on these callbacks to stop tracking spans, it means they end up holding on to span references for longer than is necessary.

Design

Reversed the logic in the Tracer's onEnd method so that the callbacks are invoked before the sampling check

Testing

Covered by CI

@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size of apk (kB)
APK 614.95
APK with Bugsnag 745.87

Android notifier size impact

Format Size impact of Bugsnag (kB)
APK 130.92
Minified APK 55.88

Generated by 🚫 Danger

@yousif-bugsnag yousif-bugsnag force-pushed the run-callbacks-for-sampled-spans branch from 2e6a8b7 to 3d4b46f Compare December 10, 2025 09:28
@yousif-bugsnag yousif-bugsnag marked this pull request as ready for review December 10, 2025 09:44
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.

3 participants