Skip to content

Add a server status gauge metric

Shows the status of this mercurius instance by emitting "true" (1) on a gauge labeled by status.

There are three status values to start: startup (initializing), active (consuming jobs from Kafka), shutdown (no longer consuming jobs, waiting for workers to exit).

A more minimal version of this could be a boolean "is active" metric, that just captures that middle phase. However:

  1. Being able to distinguish initialization from shutdown seems quite useful to me.
  2. Treating status as enum-like (rather than boolean) is future-proof if additional states are of interest later on.

Bug: T383641

Merge request reports

Loading