Skip to content

Commit 4adffb6

Browse files
committed
Document summarizer Prometheus metrics and fix stale lag_epochs help
Add a chaind_summarizer_* section to docs/prometheus.md. All seven summarizer metrics were undocumented (six pre-date this branch — the gap dates to whenever chaind_summarizer_* was introduced — plus the new lag_epochs from this branch). Documenting the full set in one place catches the doc up with reality and gives operators a complete reference for the new alert. Fix the Help string on summarizerLagEpochs: it claimed the gauge measures lag against "the finality target", which was true under the original formula in commit 066bb38 but no longer matches the cursor- diff formula introduced in the previous commit. Replace with "lags its direct upstream cursor" so /metrics, the docs, and the ADR all agree on the gauge's contract.
1 parent 1edcb45 commit 4adffb6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/prometheus.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ Operations metrics provide information about numbers of operations performed. T
2424
- `chaind_finalizer_latest_epoch` latest epoch processed by the finalizer module this run of chaind
2525
- `chaind_proposerduties_epochs_processed` number of epochs processed by the proposer duties module this run of chaind
2626
- `chaind_proposerduties_latest_epoch` latest epoch processed by the proposer duties module this run of chaind
27+
- `chaind_summarizer_epochs_processed_total` number of epochs processed by the summarizer module this run of chaind
28+
- `chaind_summarizer_latest_epoch` latest epoch processed by the summarizer module this run of chaind
29+
- `chaind_summarizer_days_processed_total` number of days processed by the daily-rollup submodule of the summarizer module this run of chaind
30+
- `chaind_summarizer_latest_day` latest day (Unix timestamp of midnight UTC) processed by the daily-rollup submodule of the summarizer module this run of chaind
31+
- `chaind_summarizer_balance_prune_ts` Unix timestamp of the last validator-balance prune run by the summarizer module
32+
- `chaind_summarizer_epoch_prune_ts` Unix timestamp of the last epoch-summary prune run by the summarizer module
33+
- `chaind_summarizer_lag_epochs{pipeline="epoch|block|validator"}` number of epochs by which each summarizer pipeline lags its direct upstream cursor: `pipeline=epoch` is the gap between `validators.latest_balances_epoch` and the summarizer's epoch cursor (i.e. how far the upstream balances pipeline is ahead of summarization); `pipeline=block` and `pipeline=validator` are the gaps between the summarizer's epoch cursor and its own block / validator sub-pipeline cursors. Values are clamped at zero — disabled pipelines (e.g. `summarizer.blocks.enable=false`) produce no series for that label
2734
- `chaind_validators_epochs_processed` number of epochs processed by the validators module this run of chaind
2835
- `chaind_validators_latest_epoch` latest epoch processed by the validators module this run of chaind
2936
- `chaind_validators_balances_epochs_processed` number of epochs processed by the balances submodule of the validators module this run of chaind

services/summarizer/standard/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func registerPrometheusMetrics() error {
124124
summarizerLagEpochs = prometheus.NewGaugeVec(prometheus.GaugeOpts{
125125
Namespace: metricsNamespace,
126126
Name: "lag_epochs",
127-
Help: "Number of epochs by which each summarizer pipeline lags the finality target",
127+
Help: "Number of epochs by which each summarizer pipeline lags its direct upstream cursor",
128128
}, []string{"pipeline"})
129129
if err := prometheus.Register(summarizerLagEpochs); err != nil {
130130
return errors.Wrap(err, "failed to register lag_epochs")

0 commit comments

Comments
 (0)