Top Description Methods
io.opentelemetry.api.trace

public Interface TracerProvider

Known Direct Implementers
io.opentelemetry.api.trace.DefaultTracerProvider
Annotations
@ThreadSafe
Imports
javax.annotation.concurrent.ThreadSafe

A registry for creating named Tracers. The name Provider is for consistency with * other languages and it is NOT loaded using reflection.
See Also
Tracer

Method Summary

Modifier and TypeMethod and Description
public Tracer

Returns:

a tracer instance.
get
(String
A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
instrumentationScopeName
)

Gets or creates a named tracer instance.

public Tracer

Returns:

a tracer instance.
get
(String
A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
instrumentationScopeName
,
String
The version of the instrumentation scope (e.g., "1.0.0").
instrumentationScopeVersion
)

Gets or creates a named and versioned tracer instance.

public static TracerProvider
noop()

Returns a no-op TracerProvider which only creates no-op Spans which do not record nor are emitted.

public default TracerBuilder

Returns:

a TracerBuilder instance.
tracerBuilder
(String
A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
instrumentationScopeName
)

Creates a TracerBuilder for a named Tracer instance.

Method Detail

getback to summary
public Tracer get(String instrumentationScopeName)

Gets or creates a named tracer instance.

Parameters
instrumentationScopeName:String

A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.

Returns:Tracer

a tracer instance.

getback to summary
public Tracer get(String instrumentationScopeName, String instrumentationScopeVersion)

Gets or creates a named and versioned tracer instance.

Parameters
instrumentationScopeName:String

A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.

instrumentationScopeVersion:String

The version of the instrumentation scope (e.g., "1.0.0").

Returns:Tracer

a tracer instance.

noopback to summary
public static TracerProvider noop()

Returns a no-op TracerProvider which only creates no-op Spans which do not record nor are emitted.

tracerBuilderback to summary
public default TracerBuilder tracerBuilder(String instrumentationScopeName)

Creates a TracerBuilder for a named Tracer instance.

Parameters
instrumentationScopeName:String

A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.

Returns:TracerBuilder

a TracerBuilder instance.

Since
1.4.0