Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- Support spans that are split into multiple batches ([#3539](https://github.com/getsentry/sentry-java/pull/3539))
- 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.
- Parse and use `send-default-pii` and `max-request-body-size` from `sentry.properties` ([#3534](https://github.com/getsentry/sentry-java/pull/3534))
- `span.startChild` now uses `.makeCurrent()` by default ([#3544](https://github.com/getsentry/sentry-java/pull/3544))
- This caused an issue where the span tree wasn't correct because some spans were not added to their direct parent
- Partially fix bootstrap class loading ([#3543](https://github.com/getsentry/sentry-java/pull/3543))
- There was a problem with two separate Sentry `Scopes` being active inside each OpenTelemetry `Context` due to using context keys from more than one class loader.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ public OtelSpanWrapper(
return NoOpSpan.getInstance();
Copy link
Member

Choose a reason for hiding this comment

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

this should also use makeCurrent(), even if there is no practical change, right?

Copy link
Member Author

@adinauer adinauer Jul 3, 2024

Choose a reason for hiding this comment

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

Yeah NoOpSpan.makeCurrent does nothing and returns a NoOpScopesLifecycleToken atm.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just checked, there's more places where we would have to add this .makeCurrent for noop spans. I'd say we only add it when we actually need it. That's if we ever change NoOpSpan.makeCurrent to modify Context.

}

return scopes.getOptions().getSpanFactory().createSpan(scopes, spanOptions, spanContext, this);
final @NotNull ISpan childSpan =
scopes.getOptions().getSpanFactory().createSpan(scopes, spanOptions, spanContext, this);
// TODO [POTEL] spanOptions.isBindToScope with default true?
childSpan.makeCurrent();
return childSpan;
}

@Override
Expand Down