File tree Expand file tree Collapse file tree
dd-java-agent/agent-otel/otel-shim/src/main/java/datadog/opentelemetry/shim/trace Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010@ ParametersAreNonnullByDefault
1111class OtelTracer implements Tracer {
12- private static final String INSTRUMENTATION_NAME = "otel" ;
12+ private static final String INSTRUMENTATION_NAME = otelInstrumentationName () ;
1313 private final AgentTracer .TracerAPI tracer ;
1414 private final String instrumentationScopeName ;
1515
@@ -24,4 +24,12 @@ public SpanBuilder spanBuilder(String spanName) {
2424 this .tracer .buildSpan (INSTRUMENTATION_NAME , SPAN_KIND_INTERNAL ).withResourceName (spanName );
2525 return new OtelSpanBuilder (delegate );
2626 }
27+
28+ @ SuppressWarnings ("ConstantConditions" )
29+ private static String otelInstrumentationName () {
30+ // is this the bootstrap shim for drop-in support, or the shim for manual instrumentation?
31+ return OtelTracer .class .getName ().startsWith ("datadog.trace.bootstrap" )
32+ ? "otel.library"
33+ : "otel" ;
34+ }
2735}
You can’t perform that action at this time.
0 commit comments