Skip to content

Conversation

@syphar
Copy link
Member

@syphar syphar commented Jan 21, 2026

I wanted to look into performance traces for builds, and discovered they are all over the place.

Mainly: the main docbuilder.build_package trace is not connected to the child traces.

I'm not 100% sure if these changes solve it completely, but I definitely discovered these issues, and they are fixed by the PR:

  • we had logic in place that would force all builds to be traced, and only applies the sampling ratio to web requests. This didn't work, at least since the multi-crate migration. I validated what's in ctx.operation() and ctx.name() and fixed the filter.
  • we have our custom spawn_blocking function that takes care of passing on the parent span into the task because tokio doesn't. I realized that block_on has the same issue. For now I just used the new fixed handle for builds. If it solves the issues there, I'll move the spawn_blocking fn into the handler too, and update the whole codebase.

@syphar syphar requested a review from a team as a code owner January 21, 2026 20:30
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jan 21, 2026
@syphar syphar merged commit 07f7a05 into rust-lang:main Jan 22, 2026
10 checks passed
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jan 22, 2026
@syphar syphar deleted the build-tracing branch January 22, 2026 06:25
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jan 22, 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