Class OpenTracingRequestTracer

  • All Implemented Interfaces:
    com.couchbase.client.core.cnc.RequestTracer

    public class OpenTracingRequestTracer
    extends Object
    implements com.couchbase.client.core.cnc.RequestTracer
    Wraps the OpenTracing 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.
    • Method Detail

      • wrap

        public static OpenTracingRequestTracer wrap​(io.opentracing.Tracer tracer)
        Wraps the OpenTracing tracer and returns a datatype that can be passed into the requestTracer method of the environment.
        Parameters:
        tracer - the tracer to wrap.
        Returns:
        the wrapped tracer ready to be passed in.
      • requestSpan

        public com.couchbase.client.core.cnc.RequestSpan requestSpan​(String operationName,
                                                                     com.couchbase.client.core.cnc.RequestSpan parent)
        Specified by:
        requestSpan in interface com.couchbase.client.core.cnc.RequestTracer
      • tracer

        public io.opentracing.Tracer tracer()
        Returns the inner OpenTracing tracer.
      • start

        public Mono<Void> start()
        Specified by:
        start in interface com.couchbase.client.core.cnc.RequestTracer
      • stop

        public Mono<Void> stop​(Duration timeout)
        Specified by:
        stop in interface com.couchbase.client.core.cnc.RequestTracer