-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rustc_resolve: use structured fields in traces #135676
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(don't make another commit, just amend the existing one).
"find_span_immediately_after_crate_name: module_name={:?} use_span={:?}", | ||
module_name, use_span | ||
); | ||
debug!("find_span_immediately_after_crate_name",); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no need to repeat the name of the function here and elsewhere; please remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think should be the message instead? Something like debug!("entered")
?
(in the places where fields are added I can just remove the message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not totally certain that they're even adding much value to keep around at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed those, then. (and the instrumentation for the containing fns)
7079452
to
1dc6b91
Compare
1dc6b91
to
a70ca63
Compare
I think this crate was written before
tracing
was adopted, and was manually writing fields into trace logs instead of using structured fields.I kept function names in the trace messages even though I added
#[instrument]
invocations so that the events will be in named spans, wasn't sure if spans are always printed.