-
Notifications
You must be signed in to change notification settings - Fork 48
Feature (sync): #[trace(recurse=all)] #134
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
Comments
Just recording reasoning around hierarchy/precedence, more likely to arise when tracing a #[trace("a", recurse=all)]
pub fn outer() {
defined_later();
defined_later_too();
#trace["b", recurse=false]
fn defined_later_too() {
println!("I'm traced with 'b' options/settings"):
fn defined_lastish(){
println!("I'm traced with 'a' options/settings"):
}
}
fn defined_later() {
println!("I'm traced with 'a' options/settings too"):
}
} |
Also, with
When using
|
Whenever this is implemented... we will need to explicitly document that when Specifically, for example: #[trace(recurse=all, option_a="some")]
fn f() {
#[trace(option_b="thing")]
fn g(){
fn x() {
// not traced
}
}
fn h(){
fn y(){
// is traced
}
}
} is not equivalent to the second macro being
|
I feel uncomfortable adding implicit tracing because:
What's the scenario is |
Pure convenience when debugging the scenario is you have a bug of unknown provenance in a non-trivial Not for prod or even dev - unless of course you're disciplined and place all you traceable functions in a single module. Ack the costs of tracing. As always - Caveat emptor. |
Signed-off-by: Mark Van de Vyver <[email protected]>
I believe incorporating this feature could be beneficial for debugging and should integrate well with minitrace. However, a question arises: isn't this feature sufficiently general to warrant its own crate? For instance, we can recursively annotate an entire module using |
Closing it for now since it's not entirely related to minitrace. |
Uh oh!
There was an error while loading. Please reload this page.
Need to evaluate the defaults in #133 in light of the following behavior - are those defaults the least restrictive? Here we'll need to have the test suite be more comprehensive.
The model phase of #113 is taking shape.
The following two cases should be possible (initially sync only):
Tracing inner functions
Where all setting from the outer
trace
percolate down. It is the users responsibility to ensure the settings are appropriate for the child functions.Tracing a module
More tricky, but likely possible, and empowering for novice-users when debugging:
async
and entry on poll traces should also be possible, but can be second phase.A natural extension is to have option settings:
Thoughts?
The text was updated successfully, but these errors were encountered: