Skip to content

feat(telemetry): Add sampled Tokio parked-worker gauge - #315

Open
nox wants to merge 1 commit into
cloudflare:mainfrom
nox:nox/tokio-parked-workers
Open

nox wants to merge 1 commit into
cloudflare:mainfrom
nox:nox/tokio-parked-workers

Conversation

@nox

@nox nox commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

The Tokio runtime monitor now exposes tokio_runtime_core_parked_workers, an aggregate gauge derived from workers whose RuntimeMetrics::worker_park_unpark_count() is odd at each sample. It reuses the existing runtime registration, sampling, and optional runtime_name and runtime_id labels without installing runtime hooks.

The gauge excludes blocking-pool threads and remains unchanged between samples. Workers are read independently, so the aggregate is not an atomic runtime-wide snapshot.

The runtime-wide `tokio_runtime_core_parked_workers` gauge counts
workers with odd Tokio park/unpark counters at each sample. It uses
the existing runtime labels and monitoring path without runtime hooks.

The gauge excludes blocking-pool threads and represents independently
sampled workers rather than an atomic runtime-wide snapshot.
@cbranch cbranch self-assigned this Nov 17, 2026
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