macro_rules! context_span {
(target: $target:expr, parent: $parent:expr, $name:expr, $($field:tt)*) => { ... };
(target: $target:expr, parent: $parent:expr, $name:expr) => { ... };
(parent: $parent:expr, $name:expr, $($field:tt)*) => { ... };
(parent: $parent:expr, $name:expr) => { ... };
(target: $target:expr, $name:expr, $($field:tt)*) => { ... };
(target: $target:expr, $name:expr) => { ... };
($name:expr, $($field:tt)*) => { ... };
($name:expr) => { ... };
}Expand description
Create a context span at ERROR level with skip_record enabled. This is intended to create spans whose only purpose it is to add context to child events; the span itself is never independently recorded.
Example:
ⓘ
use hyperactor_telemetry::context_span;
let span = context_span!("my_context", field1 = value1, field2 = value2);
let _guard = span.enter();
// ... do work that will be logged with this context