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 instrumentationScopeVersion) Assign a version to the instrumentation scope 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 scope.- Returns:
- this
-
setInstrumentationVersion
Assign a version to the instrumentation scope that is using the resulting Tracer.- Parameters:
instrumentationScopeVersion- The version of the instrumentation scope.- Returns:
- this
-
build
Tracer build()Gets or creates aTracerinstance.- Returns:
- a
Tracerinstance configured with the provided options.
-