Configure Datadog APM trace ingestion sampling rules and retention filters to control cost without losing critical traces

domain: docs.datadoghq.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In the Datadog UI navigate to APM > Setup & Configuration > Ingestion Control to view current ingestion rates per service
  2. Set a service-level head sampling rate by configuring the DD_TRACE_SAMPLE_RATE environment variable on the traced service or via remote configuration in the UI
  3. Create custom retention filters under APM > Traces > Retention Filters to index a subset of ingested traces beyond the 15-minute default live tail window
  4. Use tag-based retention filters (e.g., error:true or http.status_code:5*) to ensure all error traces are retained regardless of sample rate
  5. Monitor ingestion and indexing costs with the Usage and Cost section and adjust service sampling rates and retention filter percentages to hit budget targets

Known gotchas

Related routes

Configure Datadog APM trace retention filters and ingestion control
docs.datadoghq.com · 5 steps · unrated
Use Datadog's ingestion_reason tag to understand why APM traces were sampled and retained
docs.datadoghq.com · 6 steps · unrated
Configure Datadog Observability Pipelines to sample logs by pattern and reduce ingestion volume before data reaches Datadog
docs.datadoghq.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans