Skip to content

Commit a62056e

Browse files
authored
Support spans that are split into multiple batches (#3539)
* Support spans across batches * changelog
1 parent c7232fe commit a62056e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Fixes
1010

11+
- Support spans that are split into multiple batches ([#3539](https://github.com/getsentry/sentry-java/pull/3539))
12+
- When spans belonging to a single transaction were split into multiple batches for SpanExporter, we did not add all spans because the isSpanTooOld check wasn't inverted.
1113
- Parse and use `send-default-pii` and `max-request-body-size` from `sentry.properties` ([#3534](https://github.com/getsentry/sentry-java/pull/3534))
1214

1315
## 8.0.0-alpha.2

sentry-opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry/SentrySpanExporter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public CompletableResultCode export(Collection<SpanData> spans) {
105105
final @NotNull SentryInstantDate now = new SentryInstantDate();
106106

107107
final @NotNull List<SpanData> nonExpired =
108-
remaining.stream().filter((span) -> isSpanTooOld(span, now)).collect(Collectors.toList());
108+
remaining.stream().filter((span) -> !isSpanTooOld(span, now)).collect(Collectors.toList());
109+
109110
this.finishedSpans.addAll(nonExpired);
110111

111112
// TODO

0 commit comments

Comments
 (0)