offer function-level control over tracing#5194
Conversation
Subscribe to Label Actioncc @kubkon DetailsThis issue or pull request has been labeled: "wasi"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
|
Thanks. I'd rather not break the current use of |
|
Thanks for the feedback, I'll look into it. My worry with |
|
It should probably give an error if used in the |
|
Perhaps: Would that work for your use case? I agree we'd ideally avoid various directions of lists here if we could. One possibility would be to support globs as well if families of functions to trace all have similar names. I suppose this could even go so far as to have: where a |
|
@alexcrichton For my use case, I am looking to suppress tracing from a function that carries sensitive information, so negation is the only thing that'd work. Taking a step back: is there a strong reason to have the tracing config be highly customizable? I think I have a compelling reason for disabling tracing on a particular function but is it important to be able to turn it on for just a few functions? I'm also hesitant to diverge too much from syntax that already exists. |
|
Keeping consistent with and that may work? |
This will enable more complex tracing rules in the future
It is going to be reused for cases other than just async functions
This adds a `disable_for` syntax after the `tracing` boolean. For
example:
```
wiggle::from_witx!(
tracing: true disable_for {
module1::foo,
module2::{bar, baz},
}
)
```
767e74f to
0957863
Compare
|
I pushed a new set of commits that implements what @pchickey suggested (but with Example usage: I'm also happy to switch this to be a separate argument altogether (@alexcrichton's |
|
Seems reasonable to me 👍 but I defer to @pchickey for the final approval |
|
Thanks @joeshaw, this is good work. |
This adds to the
tracingboolean from thefrom_witx!macro adisabled_forlist of identifiers that allow for suppression of tracing on a per-function basis.Example:
Fixes #5193