Skip to content

Commit 3b43bd2

Browse files
authored
Do not log if OtelContextScopesStorage cannot be found (#4127)
* Do not log if OtelContextScopesStorage cannot be found * changelog
1 parent 1218739 commit 3b43bd2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Do not log if `OtelContextScopesStorage` cannot be found ([#4127](https://github.com/getsentry/sentry-java/pull/4127))
8+
- Previously `java.lang.ClassNotFoundException: io.sentry.opentelemetry.OtelContextScopesStorage` was shown in the log if the class could not be found.
9+
- This is just a lookup the SDK performs to configure itself. The SDK also works without OpenTelemetry.
10+
311
## 8.1.0
412

513
### Features

sentry/src/main/java/io/sentry/Sentry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ private static void initScopesStorage(SentryOptions options) {
395395
if (SentryOpenTelemetryMode.OFF == options.getOpenTelemetryMode()) {
396396
scopesStorage = new DefaultScopesStorage();
397397
} else {
398-
scopesStorage = ScopesStorageFactory.create(new LoadClass(), options.getLogger());
398+
scopesStorage = ScopesStorageFactory.create(new LoadClass(), NoOpLogger.getInstance());
399399
}
400400
}
401401

0 commit comments

Comments
 (0)