How to Reduce Datadog Costs Without Losing Coverage
Datadog bills climb quietly until finance forwards the invoice. Here's the playbook we run to cut spend hard while keeping every signal that matters.
Key takeaways
- To reduce Datadog costs, fix log indexing first, then custom metric cardinality, then APM span retention.
- Exclude noisy logs from indexes while still archiving them, move high-volume logs to Flex Logs, and drop high-cardinality tags with Metrics without Limits.
- Commit to an annual contract only after cleanup, against the smaller baseline.
On this page
Most Datadog overspend sits in three places: indexed logs, custom metric cardinality, and indexed APM spans. Stop indexing logs nobody searches, strip tags like user_id from metrics, and sample healthy traces while keeping errors. Only then sign an annual commit. Done in that order, a 30 to 50 percent cut is normal and no alert goes away.
Verified against
Datadog list prices (annual and on-demand), against the Datadog pricing list and the docs for log indexes, Metrics without Limits, custom metrics and trace retention. Checked October 2026.
Custom metrics are the line item that makes teams wince. One counter tagged with user_id can mint 400,000 series, and at $5 per 100 custom metrics that is roughly $20,000 a month for a number nobody queries. Prices below are Datadog's annual list rates as of October 2026.
Find the money before you cut anything
Open Plan & Usage and rank products by spend. Guessing is how you spend a week saving forty dollars. For a script or weekly report, the estimated cost API returns the same numbers (it needs a parent-org key with usage_read and billing_read):
# Month-to-date estimated cost per product, US1 site
$ curl -s "https://api.datadoghq.com/api/v2/usage/estimated_cost?start_month=2026-10" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" | jq '.data[0].attributes.charges'
Fix the biggest line first. For the billing model itself, see how Datadog pricing works.
Logs: stop paying to index what nobody searches
Datadog bills logs twice: ingestion at $0.10 per GB and Standard indexing at $1.70 per million events (15-day retention). Indexing is where the money goes. Fifty million health-check logs a day cost about $2,550 a month to keep searchable and a small fraction of that to ingest.
Exclusion filters fix this. Datadog's docs say it directly: excluded logs "are discarded from indexes, but still flow through the Livetail and can be used to generate metrics and archived." You stop paying to search them and keep them everywhere else. In Terraform, sample_rate is the fraction excluded, so 1.0 drops every match:
# observability/logs_index.tf
resource "datadog_logs_index" "main" {
name = "main"
retention_days = 15
filter {
query = "*"
}
exclusion_filter {
name = "drop-healthchecks"
is_enabled = true
filter {
query = "@http.url_details.path:/health @http.status_code:200"
sample_rate = 1.0 # exclude 100% of matches
}
}
exclusion_filter {
name = "sample-info-logs"
is_enabled = true
filter {
query = "status:info -service:payments -service:checkout"
sample_rate = 0.95 # index 5% of matches
}
}
}
Only the first active filter that matches a log applies, so order matters. Keep -service:payments in there: never blanket-sample the paths that make money.
Three more log levers:
- Flex Logs for high-volume logs you rarely query but must keep (network, CDN, audit): $0.05 per million events stored, compute billed separately. Monitors don't run on Flex.
- Archive and rehydrate. Ship the raw stream to S3, GCS, or Azure Storage and rehydrate a window only during an incident.
- Logs to metrics. If a dashboard only counts logs, generate a metric and stop indexing them. Log-based metrics bill as custom metrics, so keep their tags lean.
Custom metrics: cardinality is the bill
A custom metric is one unique combination of metric name and tag values. Tag with user_id, request_id, pod_name, or a raw URL and the count multiplies silently. Find offenders in Metrics > Summary sorted by cardinality. Drop the tag in code if you can; if a redeploy isn't quick, Metrics without Limits picks which tag keys stay queryable:
# observability/metric_tags.tf
resource "datadog_metric_tag_configuration" "web_requests" {
metric_name = "web.requests.count"
metric_type = "count"
tags = ["service", "env", "endpoint_group", "status_class"]
}
That allowlist collapses hundreds of thousands of indexed series to a few hundred. It isn't free: a configured metric bills on both ingested and indexed volume, so fixing the source still wins.
APM: keep every error, sample the boring successes
APM splits ingestion from retention too. Control ingestion with DD_TRACE_SAMPLING_RULES per service (DD_TRACE_SAMPLE_RATE is deprecated in Java, Python, and Go). Without rules, the Agent targets 10 traces per second (DD_APM_TARGET_TPS).
# k8s/checkout-deployment.yaml (container env)
env:
- name: DD_TRACE_SAMPLING_RULES
value: '[{"service":"checkout","sample_rate":1.0},{"service":"catalog","sample_rate":0.2}]'
The bill comes from retention: indexed spans cost $1.70 per million at 15 days. Spans kept by the Intelligent Retention Filter don't count; your custom filters do. Keep Error Default, add one filter for traces above your latency SLO, and delete broad 100% filters left over from old incidents. Questioning Datadog APM itself? We compared the field in APM and observability tools.
Hosts, containers, synthetics, and RUM
Hosts. Infrastructure Pro is $15 per host and APM $31, busy or idle. Remove agents from decommissioned boxes and idle dev machines.
Containers. Pro includes 5 containers per host, Enterprise 10; the rest bill per container-hour, so sidecar-heavy nodes overshoot quietly.
Synthetics. A browser test every minute from 8 locations runs about 345,600 times a month, roughly $4,100 at $12 per 1,000 runs. Three locations every 5 minutes costs about $310.
RUM. sessionSampleRate defaults to 100. Set it to 20 or 30 in datadogRum.init on high-traffic apps and sample Session Replay separately.
Guardrails so the bill doesn't creep back
Cleanup decays. Monitor the estimated usage metrics, such as sum:datadog.estimated_usage.logs.ingested_bytes{*} by {service} and datadog.estimated_usage.metrics.custom, against a weekly baseline so a chatty deploy pages someone before month end. Tag services with team and turn on usage attribution. Owned costs get fixed.
Then negotiate. Annual rates run 17 to 33 percent below on-demand (indexing $1.70 vs $2.55, Pro hosts $15 vs $18). Commit against the post-cleanup baseline, not last quarter's peak. Cancel abandoned SKUs: the CI Visibility trial, Database Monitoring on a retired cluster, the profiler nobody opens. Still too high after all that? Compare the Datadog alternatives, or weigh Prometheus vs Datadog if metrics are most of the bill.
| Lever | Where | Typical saving | Effort | Coverage risk |
|---|---|---|---|---|
| Log exclusion filters | Logs > Indexes | 30-60% of log bill | Low | None if errors stay indexed |
| Flex Logs + archives | Logs > Indexes | High on audit/network logs | Medium | No monitors on Flex |
| Drop metric tags | Instrumentation / MwL | Up to 90% of a bad metric | Low-Med | Lose per-tag slicing |
| APM retention filters | APM > Retention | 20-50% of span bill | Low | Low with error filter kept |
| Synthetics/RUM sampling | Test settings / SDK | 50-90% of those SKUs | Low | Lower statistical detail |
| Annual commit | Contract | 17-33% unit price | Medium | Lock-in to baseline |
Questions people ask
Why is my Datadog bill so high?
Usually log indexing and custom metric cardinality, not hosts. Datadog bills each indexed log event and each unique metric-plus-tags combination, so verbose info logs and tags like user_id multiply costs unnoticed. Rank products by spend in Plan & Usage, then check Metrics Summary for high-cardinality metrics and your indexes for missing exclusion filters.
Does excluding logs from an index lose the data?
No. Excluded logs aren't searchable in that index, but still flow to Live Tail, log-based metrics, and archives, and archived logs can be rehydrated during an incident. You still pay ingestion at $0.10 per GB; only the indexing charge goes away.
Is Metrics without Limits free?
No. Configuring a metric's tags cuts its indexed count, but a configured metric bills on both ingested and indexed volume. The net saving is still large for high-cardinality metrics. Removing the tag in code removes the cost entirely, so treat the allowlist as a stopgap.
The decision, concretely
- Logs are the top line item? Exclusion filters for health checks and info noise first, then Flex for audit and network logs.
- Custom metrics exploded overnight? Allowlist tags with Metrics without Limits today, remove the tag in code this sprint.
- Spans growing faster than traffic? Drop blanket 100% retention filters.
- Renewal coming up? Clean up, measure a month, then commit to the smaller number.
The call we'd make
Attack logs and custom metrics first, because that's where most overages live. Split ingest from index, drop the cardinality tags, add usage monitors so it stays fixed, then commit against the new baseline. Chase small SKUs first and you'll spend a week saving a rounding error. Follow the dollars, not the dashboards.
Sources
Cite this article
Kiril Urbonas (2026). How to Reduce Datadog Costs Without Losing Coverage. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/how-to-reduce-datadog-costs
[How to Reduce Datadog Costs Without Losing Coverage](https://www.devopsness.com/blog/how-to-reduce-datadog-costs) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)
More from Cloud
Explore more articles in this category
.NET 8 Support Ends November 10: The Lambda and Azure Functions Checklist
.NET 8, .NET 9, the Lambda dotnet8 runtime and the Azure Functions in-process model all lose support on November 10, 2026. Inventory commands, the isolated-worker migration and a CI gate.
Google Cloud's europe-west2 Outage: One Zone Lost Power and the Region Stalled for 6 Hours
On October 20, 2026, europe-west2-b lost power when its generators never started. Cross-zone control-plane timeouts then degraded the whole London region. What happened and the gcloud audit to run now.
Lambda Python 3.10 Is Deprecated Today: Find Every Function and Move to 3.13
AWS deprecated the Lambda python3.10 runtime on October 31, 2026. Functions keep running, patches stop. The inventory commands, IaC diffs and AL2023 gotchas for moving to python3.13.
You might have missed
Evergreen posts worth revisiting.