Package io.opentelemetry.api.trace
Interface TracerProvider
@ThreadSafe
public interface TracerProvider
A registry for creating named
Tracer
s. The name Provider is for consistency with *
other languages and it is NOT loaded using reflection.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets or creates a named tracer instance.Gets or creates a named and versioned tracer instance.static TracerProvider
noop()
Returns a no-opTracerProvider
which only creates no-opSpan
s which do not record nor are emitted.default TracerBuilder
tracerBuilder
(String instrumentationScopeName) Creates a TracerBuilder for a namedTracer
instance.
-
Method Details
-
noop
Returns a no-opTracerProvider
which only creates no-opSpan
s which do not record nor are emitted. -
get
Gets or creates a named tracer instance.- Parameters:
instrumentationScopeName
- A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.- Returns:
- a tracer instance.
-
get
Gets or creates a named and versioned tracer instance.- Parameters:
instrumentationScopeName
- A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.instrumentationScopeVersion
- The version of the instrumentation scope (e.g., "1.0.0").- Returns:
- a tracer instance.
-
tracerBuilder
Creates a TracerBuilder for a namedTracer
instance.- Parameters:
instrumentationScopeName
- A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.- Returns:
- a TracerBuilder instance.
- Since:
- 1.4.0
-