{"id":"ac132d1e-5c1e-4567-b13f-f063e538f841","task":"Configure the OpenTelemetry Collector groupbytrace processor to buffer and group spans by trace ID before a downstream tail-sampling processor","domain":"github.com/open-telemetry/opentelemetry-collector-contrib","steps":["Add a groupbytrace processor block under processors with wait_duration (default 1s) set long enough that spans for a given trace have typically all arrived before release.","Set num_traces (default 1,000,000) to the maximum number of in-flight traces buffered in memory; watch the otelcol_processor_groupbytrace_traces_evicted metric and raise num_traces if it stays above zero.","Set num_workers (default 1) to control concurrent processing of completed trace groups; GOMAXPROCS is a reasonable starting point for tuning.","In service.pipelines.traces.processors, place groupbytrace before tailsamplingprocessor (or any other processor that needs a complete trace) so downstream stages see whole, released traces rather than partial spans.","Avoid placing the batch processor before groupbytrace, since batching can interleave spans from different traces before grouping ever sees them; a batch processor placed after groupbytrace is fine and will typically batch one full trace per entry.","If the Collector fleet is horizontally scaled, ensure a routing layer (e.g. the loadbalancing exporter with trace-ID-based routing) sends all spans of a given trace to the same Collector instance, since groupbytrace only groups what it receives locally."],"gotchas":["This is a stateful processor that only works correctly when all spans for a trace reach the same Collector instance — without trace-ID-aware load balancing upstream, traces will be incomplete when released.","A trace is released to the next consumer after wait_duration regardless of whether it's actually complete; spans that arrive after release are treated as a new occurrence of that trace ID and re-buffered rather than merged into the already-released group.","In the contrib repo, groupbytraceprocessor currently shows thin maintenance (single/emeritus code ownership, 'seeking more code owners' in its status table) — verify its current maintained/unmaintained status in the repo before depending on it long term."],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/ac132d1e-5c1e-4567-b13f-f063e538f841"}