From 3b43bd2bc107ea6279ee664debec4a39f3fc5eb2 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Mon, 3 Feb 2025 06:11:56 +0100 Subject: [PATCH 1/2] Do not log if `OtelContextScopesStorage` cannot be found (#4127) * Do not log if OtelContextScopesStorage cannot be found * changelog --- CHANGELOG.md | 8 ++++++++ sentry/src/main/java/io/sentry/Sentry.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d89f0ae054..3803bc2a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +### Fixes + +- Do not log if `OtelContextScopesStorage` cannot be found ([#4127](https://github.com/getsentry/sentry-java/pull/4127)) + - Previously `java.lang.ClassNotFoundException: io.sentry.opentelemetry.OtelContextScopesStorage` was shown in the log if the class could not be found. + - This is just a lookup the SDK performs to configure itself. The SDK also works without OpenTelemetry. + ## 8.1.0 ### Features diff --git a/sentry/src/main/java/io/sentry/Sentry.java b/sentry/src/main/java/io/sentry/Sentry.java index 70519fb98f..94007e42c5 100644 --- a/sentry/src/main/java/io/sentry/Sentry.java +++ b/sentry/src/main/java/io/sentry/Sentry.java @@ -395,7 +395,7 @@ private static void initScopesStorage(SentryOptions options) { if (SentryOpenTelemetryMode.OFF == options.getOpenTelemetryMode()) { scopesStorage = new DefaultScopesStorage(); } else { - scopesStorage = ScopesStorageFactory.create(new LoadClass(), options.getLogger()); + scopesStorage = ScopesStorageFactory.create(new LoadClass(), NoOpLogger.getInstance()); } } From a4fd36f38a9b4d4e275ba30a8f282b12fd21299f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 11:49:29 +0100 Subject: [PATCH 2/2] chore(deps): update Native SDK to v0.7.20 (#4128) Co-authored-by: GitHub --- CHANGELOG.md | 6 ++++++ buildSrc/src/main/java/Config.kt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3803bc2a7e..287d56e3f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ - Previously `java.lang.ClassNotFoundException: io.sentry.opentelemetry.OtelContextScopesStorage` was shown in the log if the class could not be found. - This is just a lookup the SDK performs to configure itself. The SDK also works without OpenTelemetry. +### Dependencies + +- Bump Native SDK from v0.7.19 to v0.7.20 ([#4128](https://github.com/getsentry/sentry-java/pull/4128)) + - [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0720) + - [diff](https://github.com/getsentry/sentry-native/compare/v0.7.19...0.7.20) + ## 8.1.0 ### Features diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 59a54600cf..e77417d7bb 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -153,7 +153,7 @@ object Config { val apolloKotlin = "com.apollographql.apollo3:apollo-runtime:3.8.2" - val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.7.19" + val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.7.20" object OpenTelemetry { val otelVersion = "1.44.1"