Class NoopAgenorTelemetry

java.lang.Object
dev.agenor.core.telemetry.NoopAgenorTelemetry
All Implemented Interfaces:
AgenorTelemetry

public final class NoopAgenorTelemetry extends Object implements AgenorTelemetry
No-op implementation of AgenorTelemetry that produces zero overhead.

All methods return singleton objects that perform no work. No objects are allocated during normal operation: spanBuilder(String) always returns NOOP_BUILDER and SpanBuilder.startSpan() always returns NOOP_SPAN.

This class is the default telemetry used by all Agenor runtime components when no AgenorTelemetry implementation is configured. It ensures that the core and runtime modules compile and run without any tracing library on the classpath.

Since:
0.19.0
  • Method Details

    • spanBuilder

      public SpanBuilder spanBuilder(String operationName)
      Description copied from interface: AgenorTelemetry
      Returns a SpanBuilder for the given operation name.

      The returned builder captures the current tracing context so that spans started from it are automatically children of the ambient parent span.

      Specified by:
      spanBuilder in interface AgenorTelemetry
      Parameters:
      operationName - the name of the span (e.g. "llm.chat"); never null
      Returns:
      a new span builder; never null