Skip to content

fix(observer): emit every Prometheus series once - #381

Merged
rldyourmnd merged 1 commit into
mainfrom
fix/observer-emits-one-prometheus-series
Sep 2, 2026
Merged

fix(observer): emit every Prometheus series once#381
rldyourmnd merged 1 commit into
mainfrom
fix/observer-emits-one-prometheus-series

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

The completed-wait metrics added in #379 were rendered inside the outer scale-set loop. With ten configured scale sets, the observer emitted each of fourteen series ten times; the OpenTelemetry collector accepted the first and dropped 126 conflicting samples on every scrape as different value but same timestamp.

This moves the aggregate metrics outside that loop and adds a renderer-wide invariant test that rejects every duplicate Prometheus series, not only this metric family.

Verification:

  • go test ./internal/fleetobserve
  • make verify
  • exact commit observer installed temporarily on gha-services: healthy endpoint, zero duplicate series, zero collector duplicate-timestamp warnings after restart

No private identity, host, tenant, or runtime evidence is included in this public change.

Completed-wait metrics were accidentally rendered inside the scale-set loop. The observer therefore emitted each aggregate ten times and the collector dropped 126 conflicting samples every scrape. Render the aggregates once and enforce global series uniqueness in the metrics test.
@rldyourmnd
rldyourmnd merged commit ea6b528 into main Sep 2, 2026
10 checks passed
@rldyourmnd
rldyourmnd deleted the fix/observer-emits-one-prometheus-series branch September 2, 2026 18:59
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.

1 participant