Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Tracing span names should match function names #17148

Merged
merged 1 commit into from Apr 30, 2024

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Apr 27, 2024

When viewing traces, it's slightly confusing when the span name doesn't match the function name. Ensure the names are consistent.

(It might be worth moving most of these to use #[tracing::instrument] so the name can never go stale. @davidbarsky suggested that is marginally slower, so I've just done the simple change here.)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 27, 2024
@Wilfred Wilfred marked this pull request as ready for review April 27, 2024 00:03
@davidbarsky
Copy link
Contributor

(It might be worth moving most of these to use #[tracing::instrument] so the name can never go stale. @davidbarsky suggested that is marginally slower, so I've just done the simple change here.)

it's also kinda more annoying if you only want to record some parameters. The runtime speed should be the same, it's just a papercut in compile times.

@Veykril
Copy link
Member

Veykril commented Apr 27, 2024

Fwiw, using the attribute is also worse for rust-analyzer analysis performance

@Veykril
Copy link
Member

Veykril commented Apr 29, 2024

@bors delegate+

@bors
Copy link
Collaborator

bors commented Apr 29, 2024

✌️ @Wilfred, you can now approve this pull request!

If @Veykril told you to "r=me" after making some further change, please make that change, then do @bors r=@Veykril

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2024
When viewing traces, it's slightly confusing when the span name doesn't
match the function name. Ensure the names are consistent.

(It might be worth moving most of these to use #[tracing::instrument]
so the name can never go stale. @davidbarsky suggested that is marginally
slower, so I've just done the simple change here.)
@Wilfred
Copy link
Contributor Author

Wilfred commented Apr 30, 2024

@bors r=@Veykril

@bors
Copy link
Collaborator

bors commented Apr 30, 2024

📌 Commit c981ff0 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Apr 30, 2024

⌛ Testing commit c981ff0 with merge 49e502b...

@bors
Copy link
Collaborator

bors commented Apr 30, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 49e502b to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants