Class SdkTracer
java.lang.Object
io.opentelemetry.sdk.trace.SdkTracer
- All Implemented Interfaces:
ExtendedTracer, Tracer
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Stringprivate final InstrumentationScopeInfoprivate static final Tracerprivate final TracerSharedStateprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionSdkTracer(TracerSharedState sharedState, InstrumentationScopeInfo instrumentationScopeInfo, TracerConfig tracerConfig) -
Method Summary
Modifier and TypeMethodDescription(package private) InstrumentationScopeInfobooleanReturnstrueif the tracer is enabled.spanBuilder(String spanName) Returns aSpanBuilderto create and start a newSpan.
-
Field Details
-
FALLBACK_SPAN_NAME
- See Also:
-
NOOP_TRACER
-
instrumentationScopeInfo
-
tracerEnabled
private boolean tracerEnabled
-
-
Constructor Details
-
Method Details
-
spanBuilder
Description copied from interface:Tracer- Specified by:
spanBuilderin interfaceTracer- Parameters:
spanName- The name of the returned Span.- Returns:
- a
Span.Builderto create and start a newSpan.
-
getInstrumentationScopeInfo
InstrumentationScopeInfo getInstrumentationScopeInfo() -
isEnabled
public boolean isEnabled()Description copied from interface:ExtendedTracerReturnstrueif the tracer is enabled.This allows callers to avoid unnecessary compute when nothing is consuming the data. Because the response is subject to change over the application, callers should call this before each call to
Tracer.spanBuilder(String).- Specified by:
isEnabledin interfaceExtendedTracer
-