Tools / Datadog Interview questions
When should you use APM trace retention filters versus sampling rules?
Sampling rules operate earlier, at the client/Agent level, determining what percentage of traces are even generated and sent to Datadog in the first place - they control ingestion volume and cost, and also affect the trace-based metrics computed from what's sampled.
Retention filters operate later, after ingestion, deciding which already-ingested traces get indexed (kept searchable) for the full 15-day retention window - Datadog's built-in Intelligent Retention Filter already keeps a representative, error/latency-biased sample by default, and custom retention filters let you guarantee specific business-critical traces stay searchable regardless of that default.
In practice, tune sampling rules when you need to control the raw volume and cost of what's captured at all, and add custom retention filters when you need to guarantee that specific, already-ingested traces - for a critical endpoint, say - remain searchable for the full window rather than relying only on the default intelligent selection.
More Related questions...