Package io.opentelemetry.api.trace
Interface TracerBuilder
public interface TracerBuilder
Builder class for creating
Tracer instances.- Since:
- 1.4.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Gets or creates aTracerinstance.setInstrumentationVersion(String instrumentationVersion) Assign a version to the instrumentation library that is using the resulting Tracer.setSchemaUrl(String schemaUrl) Assign an OpenTelemetry schema URL to the resulting Tracer.
-
Method Details
-
setSchemaUrl
Assign an OpenTelemetry schema URL to the resulting Tracer.- Parameters:
schemaUrl- The URL of the OpenTelemetry schema being used by this instrumentation library.- Returns:
- this
-
setInstrumentationVersion
Assign a version to the instrumentation library that is using the resulting Tracer.- Parameters:
instrumentationVersion- The version of the instrumentation library.- Returns:
- this
-
build
Tracer build()Gets or creates aTracerinstance.- Returns:
- a
Tracerinstance configured with the provided options.
-