Package io.opentelemetry.api.trace
Interface TracerProvider
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Tracer
get(String instrumentationName)
Gets or creates a named tracer instance.Tracer
get(String instrumentationName, String instrumentationVersion)
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.
-
-
-
Method Detail
-
noop
static TracerProvider noop()
Returns a no-opTracerProvider
which only creates no-opSpan
s which do not record nor are emitted.
-
get
Tracer get(String instrumentationName)
Gets or creates a named tracer instance.- Parameters:
instrumentationName
- The name of the instrumentation library, not the name of the instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.- Returns:
- a tracer instance.
-
get
Tracer get(String instrumentationName, String instrumentationVersion)
Gets or creates a named and versioned tracer instance.- Parameters:
instrumentationName
- The name of the instrumentation library, not the name of the instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.instrumentationVersion
- The version of the instrumentation library (e.g., "1.0.0").- Returns:
- a tracer instance.
-
-