Class OpenTracingRequestSpan

java.lang.Object
com.couchbase.client.tracing.opentracing.OpenTracingRequestSpan
All Implemented Interfaces:
RequestSpan

public class OpenTracingRequestSpan
extends Object
implements RequestSpan
Wraps an OpenTracing span, ready to be passed in into options for each operation into the SDK as a parent.
  • Method Details

    • wrap

      public static OpenTracingRequestSpan wrap​(io.opentracing.Tracer tracer, io.opentracing.Span span)
      Wraps an OpenTracing span so that it can be passed in to the SDK-operation options as a parent.
      Parameters:
      span - the span that should act as the parent.
      Returns:
      the created wrapped span.
    • span

      public io.opentracing.Span span()
      Returns the wrapped OpenTracing span.
    • attribute

      public void attribute​(String key, String value)
      Specified by:
      attribute in interface RequestSpan
    • attribute

      public void attribute​(String key, boolean value)
      Specified by:
      attribute in interface RequestSpan
    • attribute

      public void attribute​(String key, long value)
      Specified by:
      attribute in interface RequestSpan
    • event

      public void event​(String name, Instant timestamp)
      Specified by:
      event in interface RequestSpan
    • end

      public void end()
      Specified by:
      end in interface RequestSpan
    • requestContext

      public void requestContext​(RequestContext requestContext)
      Specified by:
      requestContext in interface RequestSpan