fn build_otlp(span: &SpanContext, ctx: &Context, service_name: &str) -> ValueExpand description
Builds the OTLP/HTTP JSON payload for a finished span (pure; no I/O).
Ids are emitted as lowercase hex strings (the canonical OTLP/JSON encoding).
status.code is 2 (ERROR) for a 5xx response, else 0 (UNSET).