method Span.recording
True when the span is recorded (sampled and exported); guard expensive attribute computation with it.
Example:
use std.obs { span }
fn main() io {
let s = span.start("work")
// without an OTLP endpoint spans are not recorded
print("{s.recording()}")
s.end()
}Output
false
pub(api) fn recording() -> bool ioSince. 1.0.0-beta
Returns
bool
Effects
io
Defined in: std/obs/obs.oxl:388