Better info message (#937)
This commit is contained in:
parent
f9f6d1f6b3
commit
51717d1e2f
|
@ -59,8 +59,10 @@ public class UnshadedTracerProvider implements TracerProvider, Obfuscated {
|
||||||
public Object unobfuscate() {
|
public Object unobfuscate() {
|
||||||
if (!messageAlreadyLogged.getAndSet(true)) {
|
if (!messageAlreadyLogged.getAndSet(true)) {
|
||||||
String message =
|
String message =
|
||||||
"direct usage of the OpenTelemetry SDK is not supported when running agent"
|
"direct usage of the OpenTelemetry SDK, e.g. using OpenTelemetrySdk.getTracerProvider()"
|
||||||
+ " (run with debug logging to see stack trace)";
|
+ " instead of OpenTelemetry.getTracerProvider(), is not supported when running agent"
|
||||||
|
+ " (see https://github.com/open-telemetry/opentelemetry-java-instrumentation#troubleshooting"
|
||||||
|
+ " for how to run with debug logging, which will log stack trace with this message)";
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug(message, new Exception("stack trace"));
|
log.debug(message, new Exception("stack trace"));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue