Top Description Methods
io.opentelemetry.api.trace

public Interface TracerBuilder

Known Direct Implementers
io.opentelemetry.api.trace.DefaultTracerBuilder

Builder class for creating Tracer instances.

Tracers are identified by their scope name, version, and schema URL. These identifying fields, along with attributes, combine to form the instrumentation scope, which is attached to all spans produced by the Tracer.

Since
1.4.0

Method Summary

Modifier and TypeMethod and Description
public Tracer

Returns:

a Tracer instance configured with the provided options.
build
()

Gets or creates a Tracer instance.

public TracerBuilder

Returns:

this
setInstrumentationVersion
(String
The instrumentation scope version.
instrumentationScopeVersion
)

Sets the instrumentation scope version of the resulting Tracer.

public TracerBuilder

Returns:

this
setSchemaUrl
(String
The schema URL.
schemaUrl
)

Set the scope schema URL of the resulting Tracer.

Method Detail

buildback to summary
public Tracer build()

Gets or creates a Tracer instance.

Returns:Tracer

a Tracer instance configured with the provided options.

setInstrumentationVersionback to summary
public TracerBuilder setInstrumentationVersion(String instrumentationScopeVersion)

Sets the instrumentation scope version of the resulting Tracer. Version is part of Tracer identity.

Parameters
instrumentationScopeVersion:String

The instrumentation scope version.

Returns:TracerBuilder

this

setSchemaUrlback to summary
public TracerBuilder setSchemaUrl(String schemaUrl)

Set the scope schema URL of the resulting Tracer. Schema URL is part of Tracer identity.

Parameters
schemaUrl:String

The schema URL.

Returns:TracerBuilder

this