Class IsotopeMetrics

java.lang.Object
ai.signalroom.kafka.isotope.IsotopeMetrics

public final class IsotopeMetrics extends Object
Static facade that routes isotope metric emissions to a registered IsotopeMetricsSink. This is the seam that keeps kafka-isotope-core free of any metrics dependency: IsotopeProducerInterceptor and IsotopeContext call these static methods unconditionally, and they delegate to whatever sink is installed.

Default and registration

The default sink is NoOpMetricsSinkisEnabled() is false and every record* call is inert, so propagation works with zero metrics overhead. The optional kafka-isotope-metrics module's PrometheusIsotopeMetrics calls register(IsotopeMetricsSink) when its exporter binds, after which emissions flow to Micrometer/Prometheus.

The historic contract is preserved: emission is a no-op until a sink that reports isEnabled() is registered, so the interceptor may call recordHop(java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, int) unguarded on every send.