Class NoopMcpTracer

java.lang.Object
com.tnsai.mcp.observability.NoopMcpTracer
All Implemented Interfaces:
McpTracer

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

All spans created by this tracer are no-op spans that perform no work. This is suitable for production environments where tracing is not needed.

See Also:
  • Method Details

    • startSpan

      public McpSpan startSpan(String operationName)
      Description copied from interface: McpTracer
      Starts a new root span with the given operation name.
      Specified by:
      startSpan in interface McpTracer
      Parameters:
      operationName - the name of the operation being traced
      Returns:
      a new span that must be ended via McpSpan.end()
    • startSpan

      public McpSpan startSpan(String operationName, McpSpan parent)
      Description copied from interface: McpTracer
      Starts a new child span with the given operation name and parent.
      Specified by:
      startSpan in interface McpTracer
      Parameters:
      operationName - the name of the operation being traced
      parent - the parent span
      Returns:
      a new child span that must be ended via McpSpan.end()