Skip to content
Draft
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
- Kotlin now sees `Attachment.getBytes()`, `Device.getArchs()`, `Spring.getActiveProfiles()` and `JsonSerializationUtils.bytesFrom(...)` as nullable, because `@Nullable` now annotates the returned array instead of its elements ([#6558](https://github.com/getsentry/sentry-java/pull/6558))
- Shake-to-report no longer leaks the first Activity that resumes after `Sentry.init` ([#6686](https://github.com/getsentry/sentry-java/pull/6686))

### Dependencies

- Bump OpenTelemetry ([#6691](https://github.com/getsentry/sentry-java/pull/6691))
- `opentelemetry` to `1.68.0` (was `1.67.0`)
- `opentelemetry-alpha` to `1.68.0-alpha` (was `1.67.0-alpha`)
- `opentelemetry-instrumentation` to `2.34.0` (was `2.33.1`)
- `opentelemetry-instrumentation-alpha` to `2.34.0-alpha` (was `2.33.1-alpha`)
- `opentelemetry-semconv` to `1.45.0` (was `1.44.0`)
- `opentelemetry-semconv-alpha` to `1.45.0-alpha` (was `1.44.0-alpha`)

## 8.65.0

### Features
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ nopen = "1.0.1"
# see https://developer.android.com/jetpack/androidx/releases/compose-kotlin
okhttp = "5.5.1"
openfeature = "1.18.2"
otel = "1.67.0"
otelAlpha = "1.67.0-alpha"
otelInstrumentation = "2.33.1"
otelInstrumentationAlpha = "2.33.1-alpha"
otel = "1.68.0"
otelAlpha = "1.68.0-alpha"
otelInstrumentation = "2.34.0"
otelInstrumentationAlpha = "2.34.0-alpha"
# check https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/dependencyManagement/build.gradle.kts#L49 for release version above to find a compatible version
otelSemanticConventions = "1.44.0"
otelSemanticConventionsAlpha = "1.44.0-alpha"
otelSemanticConventions = "1.45.0"
otelSemanticConventionsAlpha = "1.45.0-alpha"
retrofit = "3.0.0"
room2 = "2.8.5"
room3 = "3.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,7 @@ private void transferSpanDetails(
maybeTransferOtelAttribute(span, sentryTransaction, ThreadIncubatingAttributes.THREAD_ID);
maybeTransferOtelAttribute(span, sentryTransaction, ThreadIncubatingAttributes.THREAD_NAME);

maybeTransferOtelAttribute(
span, sentryTransaction, MessagingIncubatingAttributes.MESSAGING_SYSTEM);
transferMessagingSystem(span, sentryTransaction);
maybeTransferOtelAttribute(
span, sentryTransaction, MessagingIncubatingAttributes.MESSAGING_DESTINATION_NAME);
maybeTransferOtelAttribute(
Expand All @@ -382,6 +381,27 @@ private void transferSpanDetails(
return sentryTransaction;
}

/**
* OpenTelemetry deprecated {@code messaging.system} in favor of {@code messaging.system.name},
* but Sentry only supports {@code messaging.system}. Instrumentation may set either, so the value
* is transferred to {@code messaging.system}, preferring {@code messaging.system} if both are
* set.
*/
@SuppressWarnings("deprecation")
private static void transferMessagingSystem(
final @NotNull SpanData span, final @NotNull ISpan sentrySpan) {
final @NotNull Attributes attributes = span.getAttributes();
final @Nullable String deprecatedMessagingSystem =
attributes.get(MessagingIncubatingAttributes.MESSAGING_SYSTEM);
final @Nullable String messagingSystem =
deprecatedMessagingSystem != null
? deprecatedMessagingSystem
: attributes.get(MessagingIncubatingAttributes.MESSAGING_SYSTEM_NAME);
if (messagingSystem != null) {
sentrySpan.setData(MessagingIncubatingAttributes.MESSAGING_SYSTEM.getKey(), messagingSystem);
}
}

private List<SpanNode> findCompletedRootNodes(final @NotNull List<SpanNode> grouped) {
final @NotNull Predicate<SpanNode> isRootPredicate =
node -> {
Expand Down
Loading