Skip to content

Commit aaf7418

Browse files
lblodergetsentry-botadinauer
authored
POTEL 35 - Use OtelSpan name as fallback for transaction name (#3557)
* use otel span name if sentrySpan exists but description is null * Format code * changelog * fix build --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io> Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io>
1 parent 2537a27 commit aaf7418

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Use OpenTelemetry span name as fallback for transaction name ([#3557](https://github.com/getsentry/sentry-java/pull/3557))
8+
- In certain cases we were sending transactions as "<unlabeled transaction>" when using OpenTelemetry
9+
310
## 8.0.0-alpha.4
411

512
### Fixes

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ private OtelSpanInfo extractSpanDescription(
6666
}
6767

6868
final @NotNull String name = otelSpan.getName();
69-
final @Nullable String description = sentrySpan != null ? sentrySpan.getDescription() : name;
69+
final @Nullable String maybeDescription =
70+
sentrySpan != null ? sentrySpan.getDescription() : name;
71+
final @NotNull String description = maybeDescription != null ? maybeDescription : name;
7072
return new OtelSpanInfo(name, description, TransactionNameSource.CUSTOM);
7173
}
7274

0 commit comments

Comments
 (0)