|
3 | 3 | import static io.sentry.TransactionContext.DEFAULT_TRANSACTION_NAME; |
4 | 4 | import static io.sentry.opentelemetry.InternalSemanticAttributes.IS_REMOTE_PARENT; |
5 | 5 | import static io.sentry.opentelemetry.OtelInternalSpanDetectionUtil.isSentryRequest; |
| 6 | +import static io.sentry.opentelemetry.OtelSpanUtils.maybeTransferOtelAttribute; |
6 | 7 |
|
7 | 8 | import io.opentelemetry.api.common.Attributes; |
8 | 9 | import io.opentelemetry.api.trace.StatusCode; |
|
12 | 13 | import io.opentelemetry.sdk.trace.export.SpanExporter; |
13 | 14 | import io.opentelemetry.semconv.HttpAttributes; |
14 | 15 | import io.opentelemetry.semconv.incubating.ProcessIncubatingAttributes; |
| 16 | +import io.opentelemetry.semconv.incubating.ThreadIncubatingAttributes; |
15 | 17 | import io.sentry.Baggage; |
16 | 18 | import io.sentry.DateUtils; |
17 | 19 | import io.sentry.DefaultSpanFactory; |
@@ -340,6 +342,9 @@ private void transferSpanDetails( |
340 | 342 | setOtelSpanKind(span, sentryTransaction); |
341 | 343 | transferSpanDetails(sentrySpanMaybe, sentryTransaction); |
342 | 344 |
|
| 345 | + maybeTransferOtelAttribute(span, sentryTransaction, ThreadIncubatingAttributes.THREAD_ID); |
| 346 | + maybeTransferOtelAttribute(span, sentryTransaction, ThreadIncubatingAttributes.THREAD_NAME); |
| 347 | + |
343 | 348 | scopesToUse.configureScope( |
344 | 349 | ScopeType.CURRENT, |
345 | 350 | scope -> attributesExtractor.extract(span, scope, scopesToUse.getOptions())); |
|
0 commit comments