Package io.opentelemetry.api.trace
Interface TracerBuilder
public interface TracerBuilder
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 TypeMethodDescriptionbuild()Gets or creates aTracerinstance.setInstrumentationVersion(String instrumentationScopeVersion) Sets the instrumentation scope version of the resultingTracer.setSchemaUrl(String schemaUrl) Set the scope schema URL of the resultingTracer.
-
Method Details
-
setSchemaUrl
- Parameters:
schemaUrl- The schema URL.- Returns:
- this
-
setInstrumentationVersion
- Parameters:
instrumentationScopeVersion- The instrumentation scope version.- Returns:
- this
-
build
Tracer build()Gets or creates aTracerinstance.- Returns:
- a
Tracerinstance configured with the provided options.
-