OxL Reference

method Span.set

Adds a string attribute.

Example:

oxl✓ checked in CI
use std.obs { span }

fn main() io {
  let s = span.start("lookup")
  s.set("table", "users")
  s.end()
  print("ok")
}
Output
ok
pub(api) fn set(key: str, value: str) io

Complexity. O(1); a no-op when the span is not recorded.

Since. 1.0.0-beta

Parameters

NameType
keystr
valuestr

Effects

io

Defined in: std/obs/obs.oxl:329

See also