Skip to content

Commit

Permalink
Do not log if OtelContextScopesStorage cannot be found (#4127)
Browse files Browse the repository at this point in the history
* Do not log if OtelContextScopesStorage cannot be found

* changelog
  • Loading branch information
adinauer authored Feb 3, 2025
1 parent 1218739 commit 3b43bd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/Sentry.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 3b43bd2

Please sign in to comment.