Skip to main content

build_otlp

Function build_otlp 

Source
fn build_otlp(span: &SpanContext, ctx: &Context, service_name: &str) -> Value
Expand 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).