pub fn encode_payload<T: TraceData>(
traces: &[Vec<Span<T>>],
metadata: &TracerMetadata,
client_side_stats: bool,
) -> Result<Vec<u8>, Error>Expand description
Encode the given traces to the agentless JSON payload (/v1/input body).
When client_side_stats is true, the encoder will not inject
meta["_dd.compute_stats"]="1" on the first span of each chunk. Set this
when the caller is already computing and exporting stats locally so that the intake does not
double- count the same traces.
Returns the serialized JSON bytes on success.