pub fn encode_payload_from_v1<T: TraceData>(
chunks: &[TraceChunk<T>],
metadata: &TracerMetadata,
) -> Result<Vec<u8>, Error>Expand description
V1-native analog of encode_payload. Downgrades v1’s unified attribute model back to the
same meta/metrics/meta_struct-shaped wire fields, so the emitted JSON body is
equivalent to what a v0.4 tracer would produce for the same trace — see
[crate::msgpack_encoder::v04::span_v1] for the mapping table this mirrors. Chunk-level
context (trace_id, origin, priority, sampling_mechanism, dropped_trace, chunk
attributes) is propagated into every span, matching the v1::TraceChunk-level granularity v1
operates at.