Change context propagation debug failures from error to warn (#8601)
This commit is contained in:
parent
f3a58b2524
commit
ed9cac6fa2
|
@ -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;
|
||||
|
@ -75,10 +75,10 @@ public final class ContextPropagationDebug {
|
|||
|
||||
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);
|
||||
|
@ -125,7 +125,7 @@ public final class ContextPropagationDebug {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue