Skip to content

Commit

Permalink
Ref: Check if options.isTracingEnabled before calling Hub#assignTrace…
Browse files Browse the repository at this point in the history
…Context (#1714)

Fixes #1710
  • Loading branch information
maciejwalkowiak authored Sep 14, 2021
1 parent 11c2c37 commit 1319305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/Hub.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public boolean isEnabled() {
}

private void assignTraceContext(final @NotNull SentryEvent event) {
if (event.getThrowable() != null) {
if (options.isTracingEnabled() && event.getThrowable() != null) {
final Pair<ISpan, String> pair =
throwableToSpan.get(ExceptionUtils.findRootCause(event.getThrowable()));
if (pair != null) {
Expand Down

0 comments on commit 1319305

Please sign in to comment.