Ferricstore.QuorumMetrics (ferricstore v0.4.0)

Copy Markdown View Source

Low-cardinality Prometheus counters for the quorum write path.

The write path emits raw :telemetry events. This GenServer owns a small ETS table and aggregates those events into counters that Ferricstore.Metrics exposes through FERRICSTORE.METRICS.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns Prometheus text for currently collected quorum write-path counters.

Clears collected counters.

Starts the quorum metrics collector.

Types

labels()

@type labels() :: keyword()

metric_id()

@type metric_id() :: atom()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

prometheus_text()

@spec prometheus_text() :: binary()

Returns Prometheus text for currently collected quorum write-path counters.

reset()

@spec reset() :: :ok

Clears collected counters.

This is primarily used by tests. In production counters normally live for the lifetime of the supervised collector process.

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()

Starts the quorum metrics collector.