Skip to main content

drop_chunks

Function drop_chunks 

Source
pub fn drop_chunks<T: TraceData>(
    traces: &mut Vec<TraceChunk<T>>,
) -> DroppedP0Stats
Expand description

Remove spans and chunks, only keeping the ones that may be sampled by the agent.

Unlike v0.4 (where sampling priority is a per-span metric), v1’s priority is already a direct field on TraceChunk, so it is read once per chunk instead of being searched for across the chunk’s spans.

§Returns

The number of P0 traces and spans that were dropped.