The instrumentation framework covers counters and histograms. A gauge -- a value that goes up and down, sampled at the moment something happens -- has no declarative form, so the four synchronous gauges in the tree are hand-rolled instruments sitting outside the standard: outside the metric-name conventions, outside core_metrics.md, and outside the contract check that keeps the catalogue honest.
Add metric = gauge to #[derive(Event)], taking its value from an #[observation] field the way a histogram does, and migrate the four call sites that record one.
The other 136 gauges are observable (pull/callback): OpenTelemetry asks them for a value at scrape time, so there is no occurrence, no call site, and nothing to log. The Event model is push, and those legitimately stay hand-rolled.
Three of the four also carry names that predate the standard, and nothing consumes them -- no dashboard, no alert, no catalogue row:
ssh_console_total_machines and ssh_console_grpc_total_machines end in _total, which is the Prometheus counter suffix, on a gauge
- none of the three carry the
carbide_ prefix
Those get conforming names. The fourth, carbide_api_vault_token_time_until_refresh_seconds, is queried by two dashboards and already conforms once the exporter normalizes it, so it keeps its exported name exactly.
Part of the instrumentation ergonomics work in #3169, following #4407.
The instrumentation framework covers counters and histograms. A gauge -- a value that goes up and down, sampled at the moment something happens -- has no declarative form, so the four synchronous gauges in the tree are hand-rolled instruments sitting outside the standard: outside the metric-name conventions, outside
core_metrics.md, and outside the contract check that keeps the catalogue honest.Add
metric = gaugeto#[derive(Event)], taking its value from an#[observation]field the way a histogram does, and migrate the four call sites that record one.The other 136 gauges are observable (pull/callback): OpenTelemetry asks them for a value at scrape time, so there is no occurrence, no call site, and nothing to log. The Event model is push, and those legitimately stay hand-rolled.
Three of the four also carry names that predate the standard, and nothing consumes them -- no dashboard, no alert, no catalogue row:
ssh_console_total_machinesandssh_console_grpc_total_machinesend in_total, which is the Prometheus counter suffix, on a gaugecarbide_prefixThose get conforming names. The fourth,
carbide_api_vault_token_time_until_refresh_seconds, is queried by two dashboards and already conforms once the exporter normalizes it, so it keeps its exported name exactly.Part of the instrumentation ergonomics work in #3169, following #4407.