Skip to content

feat: add tid to WorkerParkEvent and WorkerUnparkEvent#410

Merged
rcoh merged 1 commit into
mainfrom
park-unpark-tid
May 15, 2026
Merged

feat: add tid to WorkerParkEvent and WorkerUnparkEvent#410
rcoh merged 1 commit into
mainfrom
park-unpark-tid

Conversation

@rcoh
Copy link
Copy Markdown
Contributor

@rcoh rcoh commented May 15, 2026

Add tid: u32 to both events so the trace is self-describing for thread-role attribution. Previously, analysis tools had to query runtime state at flush time to recover the tid→worker_id mapping, which only works while the runtime is alive.

The field is stamped via events::current_tid() (one gettid syscall on Linux, ~5 ns) in the existing park/unpark hooks.

This is an additive schema change: old JS/Rust decoders ignore unknown fields in the schema-driven format.

This will allow us to remove the tid attribution map and remove WorkerId from CPU samples since it will be recoverable from the unpark event which joins the events together.

Add `tid: u32` to both events so the trace is self-describing for
thread-role attribution. Previously, analysis tools had to query
runtime state at flush time to recover the tid→worker_id mapping,
which only works while the runtime is alive.

The field is stamped via `events::current_tid()` (one gettid syscall
on Linux, ~5 ns) in the existing park/unpark hooks.

This is an additive schema change: old JS/Rust decoders ignore
unknown fields in the schema-driven format.
@rcoh rcoh requested a review from a team May 15, 2026 18:02
@rcoh rcoh added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit 3723dc1 May 15, 2026
20 checks passed
@github-actions github-actions Bot mentioned this pull request May 15, 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