Skip to content

fix(taskworker): Fix Worker Queue Metrics#728

Merged
george-sentry merged 2 commits into
mainfrom
george/push-taskbroker/fix-worker-queue-metrics
Jun 23, 2026
Merged

fix(taskworker): Fix Worker Queue Metrics#728
george-sentry merged 2 commits into
mainfrom
george/push-taskbroker/fix-worker-queue-metrics

Conversation

@george-sentry

Copy link
Copy Markdown
Member

Linear

Refs STREAM-1234

Description

Worker queue size metrics are currently broken - they are only emitted on startup when sending status updates in batches. When status updates are sent one by one, queue size metrics are only emitted once per result thread loop, which paints an inaccurate picture of how big the result queue actually is.

This PR moves the queue size metrics into a separate metrics thread that runs once per second. We can put other metrics here in the future as well if necessary.

@george-sentry george-sentry requested a review from a team as a code owner June 23, 2026 19:52
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

STREAM-1234

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f7cd920. Configure here.

Comment thread clients/python/src/taskbroker_client/worker/worker.py
@george-sentry george-sentry changed the title fix(taskworker): Create Background Thread for Queue Metrics (and Others) fix(taskworker): Fix Worker Queue Metrics Jun 23, 2026
Comment thread clients/python/src/taskbroker_client/worker/worker.py
@george-sentry george-sentry merged commit 46869ed into main Jun 23, 2026
27 checks passed
@george-sentry george-sentry deleted the george/push-taskbroker/fix-worker-queue-metrics branch June 23, 2026 20:28
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.

2 participants