method Span.set
Adds a string attribute.
Example:
use std.obs { span }
fn main() io {
let s = span.start("lookup")
s.set("table", "users")
s.end()
print("ok")
}Вывод
ok
pub(api) fn set(key: str, value: str) ioСложность. O(1); a no-op when the span is not recorded.
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
key | str |
value | str |
Эффекты
io
Определено в: std/obs/obs.oxl:329