Skip to main content

build_export_json

Function build_export_json 

Source
pub fn build_export_json(r: &SpanRecord, service_name: &str) -> Value
Expand description

Build the OTLP-JSON ExportTraceServiceRequest for one span. The attribute keys are the OpenInference / gen_ai.* keys a downstream OTel store normalizes, so the span round-trips. Ints are encoded as strings (the protobuf int64 → JSON mapping OTLP-JSON uses).