instrument_with_debug_spans

Macro instrument_with_debug_spans 

Source
macro_rules! instrument_with_debug_spans {
    (target: $target:expr, options: $options:expr, $($field:tt)*) => { ... };
    (options: $options:expr, $($field:tt)*) => { ... };
    (target: $target:expr, options: $options:expr) => { ... };
    (options: $options:expr) => { ... };
}
Expand description

Constructs a new instrumentation PhysicalOptimizerRule for a DataFusion ExecutionPlan at the debug level.

This macro automatically sets the tracing level to DEBUG and is a convenience wrapper around instrument_with_spans! with the appropriate log level preset.

See instrument_with_spans! for details on instrumentation options and span fields.

ยงExamples

Basic usage with default options:

let instrument_rule = instrument_with_debug_spans!(options: InstrumentationOptions::default());

Adding custom fields:

let custom_fields = HashMap::from([
    ("custom.key1".to_string(), "value1".to_string()),
]);
let options = InstrumentationOptions {
   custom_fields,
   ..Default::default()
};
let instrument_rule = instrument_with_debug_spans!(
    options: options,
    datafusion.additional_info = "some info",
    custom.key1 = field::Empty,
);