Skip to content

Commit c24760c

Browse files
authored
docs(trace-retention): clarify span vs trace sampling order and behavior
Clarifies the evaluation order and semantics of span rate and trace rate in retention filters. The previous wording could be interpreted as span and trace rates being applied independently.
1 parent 21ebf18 commit c24760c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/en/tracing/trace_pipeline/trace_retention.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ To create a retention filter:
148148
<div class="alert alert-warning">Configuring a trace rate can significantly increase your indexed spans usage.</div>
149149

150150
For example, if you configure a retention filter to index spans from `service:my-service`:
151-
- Configuring a span rate of `100%` ensures that all spans matching `service:my-service` are indexed.
152-
- Configuring a trace rate of `50%` ensures that all spans from all traces with a span from `service:my-service` are indexed. Assuming traces have 100 spans in average and 5 spans from `service:my-service`, configuring a trace rate indexes the remaining 95 spans of the trace, for the trace rate percentage being configured.
151+
- Configuring a span rate of `50%` ensures that approximately 50% of traces that contain spans matching `service:my-service` are selected. For selected traces, all spans matching `service:my-service` are indexed.
152+
- Configuring a trace rate of `10%` ensures that 10% of the traces selected by the span rate are fully indexed. For those traces, all spans in the trace (not just those from `service:my-service`) are indexed. Assuming traces have 100 spans on average and 5 spans from `service:my-service`, configuring a trace rate indexes the remaining 95 spans of the trace for the configured percentage of selected traces.
153+
- Span rate is evaluated first, and trace rate is applied only to traces selected by the span rate.
153154

154155
When you create a new filter or edit the retention rate of an existing filter, Datadog displays an estimate of the percentage change in global indexing volume.
155156

0 commit comments

Comments
 (0)