Skip to main content

Module metrics

Module metrics 

Source
Expand description

Server-side metric recording over the process-global liminal registry.

init installs a global MetricsRegistry — which flips the library’s metrics gate on for this process — and registers the first-wave server families, caching their handles. Every recording helper no-ops until init has run, so a standalone liminal library user (who never calls init) pays nothing and the registry stays disabled.

Functions§

connection_closed
Records the teardown of a supervised connection (liminal_connections_active gauge decrement). Paired with connection_spawned.
connection_spawned
Records the spawn of a supervised connection (liminal_connections_active gauge increment). Paired with connection_closed on every teardown route.
deliveries_recorded
Records count genuine subscriber deliveries from a single publish (liminal_deliveries_total). A publish that reached no subscriber records nothing.
init
Enables metrics for this server process and registers the server families.
publish_accepted
Records one accepted publish on the services publish path (liminal_publishes_total).