Skip to content

Commit e990937

Browse files
authored
Fix profilerId propagation (#4833)
1 parent 377d98a commit e990937

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Only set `DefaultReplayBreadcrumbConverter` if replay is available ([#4888](https://github.com/getsentry/sentry-java/pull/4888))
1111
- Session Replay: Cache connection status instead of using blocking calls ([#4891](https://github.com/getsentry/sentry-java/pull/4891))
1212
- Fix log count in client reports ([#4869](https://github.com/getsentry/sentry-java/pull/4869))
13+
- Fix profilerId propagation ([#4833](https://github.com/getsentry/sentry-java/pull/4833))
1314

1415
### Improvements
1516

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ private void transferSpanDetails(
297297
@NotNull TransactionNameSource transactionNameSource = spanInfo.getTransactionNameSource();
298298
@Nullable SpanId parentSpanId = null;
299299
@Nullable Baggage baggage = null;
300+
@NotNull SentryId profilerId = SentryId.EMPTY_ID;
300301

301302
if (sentrySpanMaybe != null) {
302303
final @NotNull IOtelSpanWrapper sentrySpan = sentrySpanMaybe;
@@ -312,6 +313,7 @@ private void transferSpanDetails(
312313
final @NotNull SpanContext spanContext = sentrySpan.getSpanContext();
313314
parentSpanId = spanContext.getParentSpanId();
314315
baggage = spanContext.getBaggage();
316+
profilerId = spanContext.getProfilerId();
315317
}
316318

317319
final @NotNull TransactionContext transactionContext =
@@ -324,6 +326,7 @@ private void transferSpanDetails(
324326
transactionContext.setTransactionNameSource(transactionNameSource);
325327
transactionContext.setOperation(spanInfo.getOp());
326328
transactionContext.setInstrumenter(Instrumenter.SENTRY);
329+
transactionContext.setProfilerId(profilerId);
327330
if (sentrySpanMaybe != null) {
328331
transactionContext.setSamplingDecision(sentrySpanMaybe.getSamplingDecision());
329332
transactionOptions.setOrigin(sentrySpanMaybe.getSpanContext().getOrigin());

0 commit comments

Comments
 (0)