Class OpenTelemetryMetricsCollector

java.lang.Object
com.soklet.otel.OpenTelemetryMetricsCollector
All Implemented Interfaces:
MetricsCollector

OpenTelemetry-backed MetricsCollector for Soklet HTTP and SSE telemetry.

This implementation records counters/histograms via OpenTelemetry's metrics API and is designed to be lightweight, thread-safe, and non-blocking in request hot paths.

By default, standard HTTP metrics use OpenTelemetry Semantic Convention names. Soklet-specific concepts (for example SSE queue/drop/broadcast details) are emitted with soklet.* names.

If inbound requests include W3C trace context, Soklet exposes it via Request.getTraceContext() to custom metrics collectors and application code. This metrics-only implementation intentionally does not emit trace IDs, parent IDs, or tracestate values as metric attributes because those values are high-cardinality and belong in logs, spans, or exemplar-aware tracing integrations instead.

See https://soklet.com/docs/metrics-collection for Soklet's metrics/telemetry documentation.

Author:
Mark Allen