Package org.mockserver.telemetry
Class GenAiSpanExporter
java.lang.Object
org.mockserver.telemetry.GenAiSpanExporter
Optional exporter that publishes explicit OpenTelemetry spans via OTLP.
Off unless
mockserver.otelTracesEnabled is set. Self-configures
the OTel trace SDK (OTLP HTTP/protobuf, JDK sender) and installs the
tracer into both GenAiSpans and RequestSpans. Fail-soft:
a startup failure logs one line and leaves span emission disabled.-
Method Summary
Modifier and TypeMethodDescriptionstatic GenAiSpanExporterstatic GenAiSpanExporterstartWithProcessor(io.opentelemetry.sdk.trace.SpanProcessor processor) Build a tracer provider with the given span processor and install its tracer into bothGenAiSpansandRequestSpans.voidstop()
-
Method Details
-
startIfEnabled
-
startWithProcessor
public static GenAiSpanExporter startWithProcessor(io.opentelemetry.sdk.trace.SpanProcessor processor) Build a tracer provider with the given span processor and install its tracer into bothGenAiSpansandRequestSpans. Visible for testing (a test can pass a processor over an in-memory span exporter). -
stop
public void stop()
-