Class NoopTracer

java.lang.Object
org.opensearch.telemetry.tracing.noop.NoopTracer
All Implemented Interfaces:
Closeable, AutoCloseable, Tracer

public class NoopTracer extends Object implements Tracer
No-op implementation of Tracer
Opensearch.internal:
  • Field Details

    • INSTANCE

      public static final Tracer INSTANCE
      No-op Tracer instance
  • Method Details

    • startSpan

      public SpanScope startSpan(String spanName)
      Description copied from interface: Tracer
      Starts the Span with given name
      Specified by:
      startSpan in interface Tracer
      Parameters:
      spanName - span name
      Returns:
      scope of the span, must be closed with explicit close or with try-with-resource
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable