Interface CredentialJSentinelMetrics

All Known Implementing Classes:
NoOpCredentialJSentinelMetrics

public interface CredentialJSentinelMetrics
Backend-neutral sink for CredentialMetricEvents.

The core never assumes a specific metrics framework. Adapters plug in their preferred exporter (Micrometer, OpenTelemetry, Statsd, Prometheus) through this interface. The default is NoOpCredentialJSentinelMetrics, which records nothing — minimal deployments don't pay any cost.

Implementations must swallow exceptions internally; the credential pipeline is on a security-critical path and must not be blocked by a metrics-backend hiccup (CWE-778). The default publish(CredentialMetricEvent) contract documents this — failed publish calls are absorbed silently.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Records one event.
  • Method Details

    • publish

      void publish(CredentialMetricEvent event)
      Records one event. Implementations must not throw; if the backend is unavailable, swallow the failure.