Skip to main content

Module metrics

Module metrics 

Source
Expand description

The master’s metrics (see archive/PROJECT.md, Observability), registered in the process’s registry and served on the ops port.

Counters and histograms are recorded where things happen; the gauges taken from the database (runs, tasks, workers by state) are refreshed by the master’s loop every GAUGE_REFRESH, so a scrape never touches the database or the master’s lock. Labels are bounded: states, kinds, reasons and dag_id, never a run, task or attempt ID.

Structs§

ByLabels
Who waited for the core lock.
ChannelLabels
A notification channel.
CommandLabels
A command’s kind and the master’s decision.
EventResultLabels
A trigger event’s label.
KindLabels
What the retention job deleted.
LateLabels
A DAG and why its run turned a yellow success.
MasterMetrics
The master’s metrics (cheap to clone; clones share them).
PartLabels
A part of a worker’s turn.
ReasonLabels
A reason (a rejection’s, a waiting task’s).
ResultLabels
Finished runs by DAG and result.
RunLabels
Runs by state and kind.
StateLabels
A state (of runs, tasks or workers) and, for runs, their kind.
StatusLabels
An attempt’s status.
TriggerCounts
The triggers by state, for the gauge.

Constants§

GAUGE_REFRESH
How often the gauges taken from the database are refreshed.
METRICS
The master’s metrics, as registered (under schedr_).