Class NoopRequestSpan

java.lang.Object
com.couchbase.client.core.cnc.tracing.NoopRequestSpan
All Implemented Interfaces:
RequestSpan

public class NoopRequestSpan
extends Object
implements RequestSpan
A NOOP implementation of a request span, utilized by the NoopRequestTracer.

Calling individual methods on this span won't do anything, since, well, it's a noop.

  • Field Summary

    Fields
    Modifier and Type Field Description
    static NoopRequestSpan INSTANCE
    Holds a single, static representation of this span.
  • Method Summary

    Modifier and Type Method Description
    void attribute​(String key, boolean value)
    Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
    void attribute​(String key, long value)
    Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
    void attribute​(String key, String value)
    Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
    void end()
    Completes this span.
    void event​(String name, Instant timestamp)
    Sets an event on the span, which is translated to the corresponding implementation specific event.
    void requestContext​(RequestContext requestContext)
    Allows to set a request context to the request span.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final NoopRequestSpan INSTANCE
      Holds a single, static representation of this span.
  • Method Details

    • attribute

      public void attribute​(String key, String value)
      Description copied from interface: RequestSpan
      Sets an attribute on the span, which is translated to the corresponding implementation specific tag.

      Note that, depending on the implementation, attributes might be ignored.

      Specified by:
      attribute in interface RequestSpan
      Parameters:
      key - the key of the attribute.
      value - the value of the attribute.
    • attribute

      public void attribute​(String key, boolean value)
      Description copied from interface: RequestSpan
      Sets an attribute on the span, which is translated to the corresponding implementation specific tag.

      Note that, depending on the implementation, attributes might be ignored.

      Specified by:
      attribute in interface RequestSpan
      Parameters:
      key - the key of the attribute.
      value - the value of the attribute.
    • attribute

      public void attribute​(String key, long value)
      Description copied from interface: RequestSpan
      Sets an attribute on the span, which is translated to the corresponding implementation specific tag.

      Note that, depending on the implementation, attributes might be ignored.

      Specified by:
      attribute in interface RequestSpan
      Parameters:
      key - the key of the attribute.
      value - the value of the attribute.
    • event

      public void event​(String name, Instant timestamp)
      Description copied from interface: RequestSpan
      Sets an event on the span, which is translated to the corresponding implementation specific event.

      Note that, depending on the implementation, events might be ignored.

      Specified by:
      event in interface RequestSpan
      Parameters:
      name - the name of the event
      timestamp - the timestamp when it happened.
    • end

      public void end()
      Description copied from interface: RequestSpan
      Completes this span.
      Specified by:
      end in interface RequestSpan
    • requestContext

      public void requestContext​(RequestContext requestContext)
      Description copied from interface: RequestSpan
      Allows to set a request context to the request span.
      Specified by:
      requestContext in interface RequestSpan
      Parameters:
      requestContext - the request context, if present.