Class OpenTelemetryRequestTracer
- java.lang.Object
-
- com.couchbase.client.tracing.opentelemetry.OpenTelemetryRequestTracer
-
- All Implemented Interfaces:
com.couchbase.client.core.cnc.RequestTracer
public class OpenTelemetryRequestTracer extends Object implements com.couchbase.client.core.cnc.RequestTracer
Wraps the OpenTelemetry tracer so it is suitable to be passed in into the couchbase environment and picked up by the rest of the SDK as a result.
-
-
Field Summary
Fields Modifier and Type Field Description static StringINSTRUMENTATION_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.couchbase.client.core.cnc.RequestSpanrequestSpan(String operationName, com.couchbase.client.core.cnc.RequestSpan parent)Mono<Void>start()Mono<Void>stop(Duration timeout)io.opentelemetry.api.trace.Tracertracer()Returns the inner OpenTelemetry tracer.static OpenTelemetryRequestTracerwrap(io.opentelemetry.api.OpenTelemetry openTelemetry)Wraps OpenTelemetry and returns a datatype that can be passed into the requestTracer method of the environment.static OpenTelemetryRequestTracerwrap(io.opentelemetry.api.trace.TracerProvider tracerProvider)Wraps OpenTelemetry and returns a datatype that can be passed into the requestTracer method of the environment.
-
-
-
Field Detail
-
INSTRUMENTATION_NAME
public static final String INSTRUMENTATION_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
wrap
public static OpenTelemetryRequestTracer wrap(io.opentelemetry.api.OpenTelemetry openTelemetry)
Wraps OpenTelemetry and returns a datatype that can be passed into the requestTracer method of the environment.- Parameters:
openTelemetry- the OpenTelemetry instance to wrap.- Returns:
- the wrapped OpenTelemetry ready to be passed in.
-
wrap
public static OpenTelemetryRequestTracer wrap(io.opentelemetry.api.trace.TracerProvider tracerProvider)
Wraps OpenTelemetry and returns a datatype that can be passed into the requestTracer method of the environment.- Parameters:
tracerProvider- the OpenTelemetry TracerProvider instance to wrap.- Returns:
- the wrapped OpenTelemetry ready to be passed in.
-
tracer
public io.opentelemetry.api.trace.Tracer tracer()
Returns the inner OpenTelemetry tracer.
-
requestSpan
public com.couchbase.client.core.cnc.RequestSpan requestSpan(String operationName, com.couchbase.client.core.cnc.RequestSpan parent)
- Specified by:
requestSpanin interfacecom.couchbase.client.core.cnc.RequestTracer
-
start
public Mono<Void> start()
- Specified by:
startin interfacecom.couchbase.client.core.cnc.RequestTracer
-
-