Skip to content

feat(stovepipe): move queue health periodic metrics polling into OSS - #1132

Open
mnoah1 wants to merge 2 commits into
mainfrom
mnoah1/stovepipe-periodic-metrics-worker
Open

mnoah1 wants to merge 2 commits into
mainfrom
mnoah1/stovepipe-periodic-metrics-worker

Conversation

@mnoah1

@mnoah1 mnoah1 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why?

  • Internally, we currently have each instance perform its own polling and metrics emission. Since this is a periodic task, it runs on every instance and produces excessive API usage and unnecessary metric emission.
  • Instead, this PR moves the existing logic into an open source controller, which can then be driven by the message queue
  • Will allow us to to have the task execute about once per minute - after each completion, the message is held for up to one minute

What?

  • Seed one durable metrics task per queue. Workers share the task across replicas and reschedule it every minute.
  • Fail startup if task seeding fails or exceeds 30 seconds. Each sample has a 45-second timeout.

Test Plan

  • Run ./tool/bazel test //stovepipe/controller/periodicmetrics:go_default_test //stovepipe/core/messagequeue:go_default_test //service/stovepipe/server:go_default_test to check metric values, task cadence, and startup timeout handling.
  • Run the focused MySQL queue integration cases for deduplication, shared workers, postponement, and crash recovery.

Revert Plan

  • Revert this PR to stop the periodic metrics worker.

Seed one durable metrics task per queue at startup. Let the worker postpone the same task after each sample and preserve the existing metrics and queue tags.

Test plan: Run ./tool/bazel test //stovepipe/controller/periodicmetrics:go_default_test //stovepipe/core/messagequeue:go_default_test //service/stovepipe/server:go_default_test.
Match the topic registry formatting and keep the metrics README focused on cadence and the gauges it emits.
@mnoah1 mnoah1 changed the title feat(stovepipe): Sample queue health once a minute feat(stovepipe): move queue health periodic metrics polling into OSS Nov 24, 2026
@mnoah1
mnoah1 marked this pull request as ready for review November 24, 2026 15:56
@mnoah1
mnoah1 requested review from a team and sbalabanov as code owners November 24, 2026 15:56

This branch has not been deployed

No deployments
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