Skip to content

Commit f0c8cf2

Browse files
committed
Use transaction name
1 parent 789ae1e commit f0c8cf2

File tree

1 file changed

+8
-2
lines changed
  • sentry-opentelemetry/sentry-opentelemetry-bootstrap/src/main/java/io/sentry/opentelemetry

1 file changed

+8
-2
lines changed

sentry-opentelemetry/sentry-opentelemetry-bootstrap/src/main/java/io/sentry/opentelemetry/OtelSpanFactory.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ public final class OtelSpanFactory implements ISpanFactory {
137137
if (description != null) {
138138
sentrySpan.setDescription(description);
139139
}
140-
if (samplingDecision != null) {
141-
sentrySpan.getSpanContext().setSamplingDecision(samplingDecision);
140+
// TODO [POTEL] do we need this?
141+
// if (samplingDecision != null) {
142+
// sentrySpan.getSpanContext().setSamplingDecision(samplingDecision);
143+
// }
144+
if (spanContext instanceof TransactionContext) {
145+
final @NotNull TransactionContext transactionContext = (TransactionContext) spanContext;
146+
sentrySpan.setTransactionName(
147+
transactionContext.getName(), transactionContext.getTransactionNameSource());
142148
}
143149
}
144150

0 commit comments

Comments
 (0)