Skip to content

Commit 3d4b46f

Browse files
fix(tracer): ensure callbacks are always invoked when processing ended spans
1 parent 8bd3bdd commit 3d4b46f

File tree

2 files changed

+6
-1
lines changed
  • bugsnag-android-performance-impl/src/main/kotlin/com/bugsnag/android/performance/internal/processing

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* System metrics are now reported for first-class `ViewLoad` spans
66
[#475](https://github.com/bugsnag/bugsnag-android-performance/pull/475)
77

8+
### Bug fixes
9+
10+
* Fixed an issue where `onSpanEnd` callbacks were not invoked for sampled spans
11+
[#486](https://github.com/bugsnag/bugsnag-android-performance/pull/486)
12+
813
## 2.1.1 (2025-11-20)
914

1015
### Bug fixes

bugsnag-android-performance-impl/src/main/kotlin/com/bugsnag/android/performance/internal/processing/Tracer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class Tracer(
5555
override fun onEnd(span: Span) {
5656
if (span !is SpanImpl) return
5757

58-
if (sampler.shouldKeepSpan(span) && callbacksKeepSpan(span)) {
58+
if (callbacksKeepSpan(span) && sampler.shouldKeepSpan(span)) {
5959
span.isSealed = true
6060
val batchSize = addToBatch(span)
6161
if (batchSize >= InternalDebug.spanBatchSizeSendTriggerPoint) {

0 commit comments

Comments
 (0)