Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POTEL 59 - Bump OpenTelemetry #3935

Merged
merged 4 commits into from
Nov 29, 2024
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Extract OpenTelemetry `URL_PATH` span attribute into description ([#3933](https://github.com/getsentry/sentry-java/pull/3933))

### Dependencies

- Bump OpenTelemetry to 1.44.1, OpenTelemetry Java Agent to 2.10.0 and Semantic Conventions to 1.28.0 ([#3935](https://github.com/getsentry/sentry-java/pull/3935))

## 8.0.0-beta.3

### Features
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ object Config {
val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.7.14"

object OpenTelemetry {
val otelVersion = "1.41.0"
val otelVersion = "1.44.1"
val otelAlphaVersion = "$otelVersion-alpha"
val otelInstrumentationVersion = "2.7.0"
val otelInstrumentationVersion = "2.10.0"
val otelInstrumentationAlphaVersion = "$otelInstrumentationVersion-alpha"
val otelSemanticConvetionsVersion = "1.25.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
val otelSemanticConvetionsVersion = "1.28.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

val otelSdk = "io.opentelemetry:opentelemetry-sdk:$otelVersion"
val otelSemconv = "io.opentelemetry.semconv:opentelemetry-semconv:$otelSemanticConvetionsVersion"
Expand All @@ -170,6 +170,7 @@ object Config {
val otelJavaAgentTooling = "io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:$otelInstrumentationAlphaVersion"
val otelExtensionAutoconfigureSpi = "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:$otelVersion"
val otelExtensionAutoconfigure = "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:$otelVersion"
val otelInstrumentationBom = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:$otelInstrumentationVersion"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ private OtelSpanInfo descriptionForHttpMethod(
private OtelSpanInfo descriptionForDbSystem(final @NotNull SpanData otelSpan) {
final @NotNull Attributes attributes = otelSpan.getAttributes();
@Nullable String dbStatement = attributes.get(DbIncubatingAttributes.DB_STATEMENT);
@NotNull String description = dbStatement != null ? dbStatement : otelSpan.getName();
return new OtelSpanInfo("db", description, TransactionNameSource.TASK);
if (dbStatement != null) {
return new OtelSpanInfo("db", dbStatement, TransactionNameSource.TASK);
}
@Nullable String dbQueryText = attributes.get(DbIncubatingAttributes.DB_QUERY_TEXT);
if (dbQueryText != null) {
return new OtelSpanInfo("db", dbQueryText, TransactionNameSource.TASK);
}

return new OtelSpanInfo("db", otelSpan.getName(), TransactionNameSource.TASK);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {

dependencyManagement {
imports {
mavenBom("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.7.0")
mavenBom(Config.Libs.OpenTelemetry.otelInstrumentationBom)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ dependencies {
testImplementation(Config.Libs.apolloKotlin)
}

dependencyManagement {
imports {
mavenBom("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:2.7.0")
}
}

configure<SourceSetContainer> {
test {
java.srcDir("src/test/java")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ dependencies {
testImplementation("org.apache.httpcomponents:httpclient")
}

dependencyManagement {
imports {
mavenBom(Config.Libs.OpenTelemetry.otelInstrumentationBom)
}
}

configure<SourceSetContainer> {
test {
java.srcDir("src/test/java")
Expand Down
Loading