Unified Observability API
Use std/observability when Harn code wants to record "something happened"
without caring whether the configured backend represents it as a log, span,
metric, or event.
import { obs } from "std/observability"
pipeline default() {
let o = obs()
o.configure({backend: o.Backend.auto})
let span = o.start_span("sync", {tenant: "acme"})
o.log_in_span(span, "queued", "info", {items: 3})
o.end_span(span)
}
For scoped work, prefer callback form:
o.span("sync", {tenant: "acme"}, { ->
o.log("started")
o.metric("items_synced", 3)
})
Configure processors when events need a shared transform before export:
o.configure({
backend: o.Backend.auto,
processors: [o.Processor.redaction],
})
The stock redaction processor applies the active runtime redaction policy
before OTLP, Splunk, Honeycomb, pretty, or test payloads are formatted.