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

Change context propagation debug failures from error to warn #8601

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package io.opentelemetry.instrumentation.api.internal;

import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;

import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Context;
Expand Down Expand Up @@ -75,10 +75,10 @@ public static void debugContextLeakIfEnabled() {

Context current = Context.current();
if (current != Context.root()) {
logger.severe("Unexpected non-root current context found when extracting remote context!");
logger.warning("Unexpected non-root current context found when extracting remote context!");
Span currentSpan = Span.fromContextOrNull(current);
if (currentSpan != null) {
logger.log(SEVERE, "It contains this span: {0}", currentSpan);
logger.log(WARNING, "It contains this span: {0}", currentSpan);
}

debugContextPropagation(current);
Expand Down Expand Up @@ -125,7 +125,7 @@ private static void debugContextPropagation(Context context) {
sb.append("\nwhich was propagated from:");
}
}
logger.log(SEVERE, "a context leak was detected. it was propagated from: {0}", sb);
logger.log(WARNING, "a context leak was detected. it was propagated from: {0}", sb);
}
}

Expand Down