Skip to content

Experience report with tracing? #732

Answered by arxanas
epage asked this question in Q&A
Jan 6, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

For Cargo, I would emphasize these points:

  • It encourages doing the right thing via the structured logging macros. Extra computation isn't carried out if it wouldn't be used by a subscriber, which could otherwise cause a performance regression.
  • Tracking spantraces for profiling is annoying, because you have to manually annotate each function that you want to sample. I'm not sure if this can be improved via using backtraces instead.
  • You can easily output to a number of different subscribers, including custom ones (...if you know what functions to call). For example, tracing_subscriber::fmt_layer::Layer::with_writer will let you construct a layer which consumes formatted logging information…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@arxanas
Comment options

@epage
Comment options

epage Jan 25, 2023
Collaborator Author

Answer selected by epage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants