offer function-level control over tracing (#5194)
* wiggle: fix compilation with async functions when tracing is off Fixes #5202 * switch tracing config from a boolean to a struct This will enable more complex tracing rules in the future * rename AsyncConfField to FunctionField It is going to be reused for cases other than just async functions * add support for disabling tracing per-function This adds a `disable_for` syntax after the `tracing` boolean. For example: ``` wiggle::from_witx!( tracing: true disable_for { module1::foo, module2::{bar, baz}, } ) ```
This commit is contained in:
@@ -153,7 +153,7 @@ pub fn from_witx(args: TokenStream) -> TokenStream {
|
||||
&config.async_,
|
||||
&doc,
|
||||
config.wasmtime,
|
||||
config.tracing,
|
||||
&config.tracing,
|
||||
)
|
||||
.expect("validating codegen settings");
|
||||
|
||||
@@ -195,7 +195,7 @@ pub fn wasmtime_integration(args: TokenStream) -> TokenStream {
|
||||
&config.c.async_,
|
||||
&doc,
|
||||
true,
|
||||
config.c.tracing,
|
||||
&config.c.tracing,
|
||||
)
|
||||
.expect("validating codegen settings");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user