public class OpenTelemetryTracerBuilder
extends java.lang.Object
Tracer
tracer instances.
In order to enable tracing in the vapi stack, a tracer must be configured.
Example usage in a vapi client:
Tracer tracer = new OpenTelemetryTracerBuilder(openTelemetry)
.setTracingLevel(TracingLevel.INFO)
.build();
ClientConfiguration clientConfig = new ClientConfiguration
.Builder()
.setTracer(tracer)
.getConfig();
Example usage in a vapi server:
Tracer tracer = new OpenTelemetryTracerBuilder(openTelemetry)
.setTracingLevel(TracingLevel.INFO)
.build();
SimpleConfigurator configurator = new SimpleConfigurator();
configurator.setTracer(tracer);
Tracer}
Constructor and Description |
---|
OpenTelemetryTracerBuilder(io.opentelemetry.api.OpenTelemetry openTelemetry) |
Modifier and Type | Method and Description |
---|---|
Tracer |
build()
Builds a new
Tracer |
OpenTelemetryTracerBuilder |
setTracingLevel(TracingLevel tracingLevel)
Sets the
TracingLevel for the Tracer that will be built. |
public OpenTelemetryTracerBuilder(io.opentelemetry.api.OpenTelemetry openTelemetry)
openTelemetry
- the OpenTelemetry instance to usepublic OpenTelemetryTracerBuilder setTracingLevel(TracingLevel tracingLevel)
tracingLevel
- the tracing level to set