OxL Справочник OxL
РусскийEnglish

method Span.recording

True when the span is recorded (sampled and exported); guard expensive attribute computation with it.

Example:

oxl✓ проверяется в CI
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()
}
Вывод
false
pub(api) fn recording() -> bool  io

С версии. 1.0.0-beta

Возвращает

bool

Эффекты

io

Определено в: std/obs/obs.oxl:388

См. также