-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Opt in to traced fields [WIP - Some open questions] #1306
base: master
Are you sure you want to change the base?
Opt in to traced fields [WIP - Some open questions] #1306
Conversation
…of `skip`. Comment out tests that do not compile anymore (i.e. `XYZ does not implement Debug`).
I don't feel like this is a good solution, then people will ask for opt-out feature. |
Is there an interest to progress this one (a.k.a. me bringing it up to speed with trunk and updating the docs) or should I close it? @hawkw? |
Thanks for working on this, unfortunately, seems we were not able to get your open questions answered (due to lack of bandwidth probably). @hawkw thoughts on this? Something we want to merge, or should we close? |
Happy to bring it back to a mergeable state @bryangarza if desired. |
Thanks, I'll follow up on the Discord about this and see if we can get some direction on if we want to move forwards or not |
hey! any updates on design considerations? |
Hi -- this one must have fallen through the cracks. I'm no longer contributing to tracing; if anyone is interested in following up on this, you should probably reach out to the maintainers on the Tokio discord. |
Motivation
Closes #651
Solution
skip
is used within#[tracing::instrument]
;Open questions
The PR is not ready for prime-time yet (mostly because I need to update the documentation), but I wanted to clarify a few questions before moving forward:
skip
is used the desired behaviour? Or do we want to emit a compiler error?behaves quite surprisingly: instead of adding
a
to the span, using itsDebug
representation, it adds a new field with its value set toEmpty
.To get the expected behaviour you need to use
This was perhaps rarely encountered in the wild when the macro worked according to an opt-out philosophy but I am sure it's going to become a very common mistake now that it's opt-in by default and developers need to spell out the fields they want to capture.
Looking at the source code, there is a comment by @hawkw on the issue
Is this something you want to resolve as part of the set of breaking changes for the next release? Should it be part of this PR?