Skip to content

Say in the HELP text what oracle_last_metrics_update actually covers - #820

Open
shaurya703 wants to merge 1 commit into
SO4-Markets:mainfrom
shaurya703:docs/last-metrics-update-scope
Open

Say in the HELP text what oracle_last_metrics_update actually covers#820
shaurya703 wants to merge 1 commit into
SO4-Markets:mainfrom
shaurya703:docs/last-metrics-update-scope

Conversation

@shaurya703

Copy link
Copy Markdown

Fixes #800.

-# HELP oracle_last_metrics_update Timestamp of last metrics update
+# HELP oracle_last_metrics_update Unix timestamp of the last price or keeper cycle metric update (does not track HTTP request metrics)

Why the documentation half, and not the other one

The issue offers either/or. I took the HELP text deliberately:

  • Renaming the series (oracle_last_cycle_metrics_update) breaks every dashboard panel and alert rule already selecting the old name. That is a migration, not a clarification.
  • Calling stamp() from the HTTP recorders changes what the gauge means: it would then advance whenever anything hit the service, which is close to the opposite of the failure it is watched for — the cycles hanging while HTTP keeps answering.

Both are yours to decide. This one makes the exported text true today and breaks nothing, and either of the others is still open afterwards.

stamp()'s doc comment now says the same thing from the other side, so the next person adding a recorder sees why it is not called there rather than assuming an oversight — which is how the two sides drifted in the first place.

Nothing else in the repo references the metric name (checked README, docs/, config/, tests), so the HELP string was the only place the scope was stated.

Checks

cargo test 16 suites green, cargo fmt --check clean, cargo clippy --all-targets -- -D warnings clean. test_promtool_validation still passes, so the exposition format is still valid.

Fixes SO4-Markets#800.

"Timestamp of last metrics update" reads as any metrics activity, but only
the price and keeper cycle recorders call stamp() — the four HTTP recorders
never have. An operator reading it as whole-service liveness would see it
advancing from cycle activity while the HTTP layer was stalled, and
conclude the service was healthy.

Took the documentation half of the issue's either/or. The other half —
calling stamp() from the HTTP recorders — changes what the gauge means, and
renaming the series breaks any dashboard or alert already selecting it;
both are the maintainers' call rather than a side effect of clarifying a
HELP string. Nothing else in the repo references the name.

stamp()'s doc comment now says the same thing from the other side, so the
next person adding a recorder sees why it is not called there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oracle_last_metrics_update only tracks price/keeper cycle activity despite its generic name, never HTTP request metrics

1 participant