It usually starts with a message from finance: "Why did monitoring cost more than the servers it monitors?"
Nobody did anything wrong. A developer added a customer_id tag to a metric to debug one customer. Someone turned on debug logging during an incident and never turned it off. The cluster scaled out for a load test and stayed that way for a week. Each change was small and sensible. Together, they doubled the bill.
The good news is that this is very fixable. In most cases you do not need to rip Datadog out. You need to know exactly what you are paying for, cut the waste, and only then decide whether open source should take over some or all of the work.
Here is how we approach it with clients, step by step.
Where the bill comes from
Datadog prices each product separately. These are the parts that usually grow fastest. Check Datadog's pricing page and your contract for the current rates.
| Product | How it is billed | Why it grows |
|---|---|---|
| Infrastructure | Per host. Host counts are measured every hour, and the month is billed at about the 99th percentile | Autoscaling that stays scaled out for days, or short-lived hosts that never get cleaned up |
| Containers | An allotment per host, then billed beyond it | Dense Kubernetes nodes running many small containers |
| Custom metrics | An allotment per host (100 on Pro, 200 on Enterprise, pooled across the account), then billed per extra metric | Every unique combination of metric name and tag values counts as one metric |
| Percentiles | Each percentile aggregation of a distribution metric is billed as custom metrics | Turning on p50, p75, p90, p95 and p99 multiplies the count by five |
| Logs | Two meters: ingestion per gigabyte, and indexing per million events, priced by retention | Debug logs, health checks and access logs indexed with long retention |
| APM | Per APM host, plus indexed spans | Every service traced, with retention filters left at their defaults |
Two patterns cause most bill shocks. One is tag cardinality. A metric tagged with customer_id, pod_name or url can turn one metric into tens of thousands of billable ones. The other is log indexing, which usually costs more than log ingestion, so indexing everything "just in case" is expensive.
Step 1: Find out what you actually pay for
Spend a day on this before you change anything.
- Plan and Usage page. See which product grew, and when.
- Usage attribution by tag (team, service, env). Find out which teams and services drive the cost.
- Metrics Summary. Sort custom metrics by volume and look at their tags. Usually a handful of metrics make up most of the count.
- Log indexes. For each index, check volume, retention and how often anyone queries it.
- APM. Check which services are traced and how many spans are indexed.
The output is a short list of the five to ten items behind most of the bill.
Step 2: Cut the bill inside Datadog
These changes need no migration:
- Remove high-cardinality tags from custom metrics. Use Metrics without Limits to keep only the tags people actually query, and drop request IDs, user IDs and full URLs from metric tags.
- Drop percentiles nobody uses. Keep p95 or p99 where an alert or SLO depends on it.
- Add exclusion filters to log indexes. Ingest everything if you need it, but index only what people search: errors, warnings, audit events. Sample the rest.
- Shorten retention on high-volume indexes, and use Flex Logs or archives with rehydration for logs you only need for investigations.
- Set APM retention filters. Keep errors and slow traces, and sample normal traffic.
- Clean up hosts. Remove the agent from hosts that do not need full monitoring, and check that autoscaling groups scale back in.
- Review the contract. Committed annual usage is cheaper than on-demand, and renewal is the moment to negotiate.
Teams that do this carefully often see a clear drop in the next invoice. If that is enough, stop here.
Step 3: Stay, go hybrid, or leave
| Option | When it fits | What it looks like |
|---|---|---|
| Stay on Datadog | The bill is acceptable after step 2, and the team relies on many Datadog features | Keep tuning cardinality, logs and APM every quarter |
| Hybrid | Logs or infrastructure metrics drive most of the cost | Logs move to Loki, infrastructure and Kubernetes metrics to Prometheus, all shown in Grafana. Datadog stays for APM on key services |
| Move to open source | Large telemetry volume, data that must stay in your infrastructure, on-prem or air-gapped sites, or a goal of no per-unit pricing | OpenTelemetry for instrumentation; Prometheus or Mimir, Loki, Tempo and Grafana on your own servers or Kubernetes |
Hybrid is underrated. Logs and high-cardinality metrics are where per-gigabyte and per-metric pricing hurts most, and they are also the easiest signals to move.
Step 4: How to move without losing visibility
- Instrument with OpenTelemetry. The Datadog Agent accepts OTLP, so you can switch your instrumentation to an open standard while still sending data to Datadog. From then on, the backend is a configuration choice.
- Send the same data to both. An OpenTelemetry Collector can export to Datadog and to Prometheus, Loki and Tempo at the same time. Grafana Alloy can also receive Datadog-format metrics, which helps with existing DogStatsD custom metrics.
- Rebuild only what people use. Dashboard and monitor usage tells you which ones matter. In most organisations it is a small share of what exists.
- Translate monitors into alert rules, and use the move to clean them up: alert on symptoms users feel, with an owner and a runbook for each alert.
- Run both in parallel for a few weeks. Compare dashboards and alerts during real incidents.
- Switch off service by service, starting with logs and infrastructure metrics, and finishing with APM.
Our guide to building an on-prem observability stack with Prometheus, Grafana, Loki and OpenTelemetry covers the target architecture and a working collector configuration.
Count the full cost honestly
Open source removes licence and per-unit fees. It does not remove work. A production stack needs high availability, upgrades, capacity planning, backups and someone on call for the monitoring system itself. For a small environment with modest telemetry, Datadog after step 2 can be the cheaper option once engineering time is counted.
The savings are largest when:
- custom metric or log volume is high
- data location rules out SaaS
- you already run Kubernetes and object storage
- someone, internal or a partner, owns the stack
InfraCloud, for example, published a case where a client with about a million custom metrics moved to a Prometheus-based stack and cut monitoring costs by nearly 75%.
Compare like with like: the current bill against infrastructure plus the people or managed service that run the new stack, over two or three years.
Frequently asked questions
Why is my Datadog bill so high? Usually because of custom metrics with high-cardinality tags, logs indexed with long retention, APM spans kept by default, or host counts that stay high after scaling. The usage pages in Datadog show which one it is.
What is the best open-source alternative to Datadog? For most teams, a combination: OpenTelemetry for instrumentation, Prometheus or Mimir for metrics, Loki for logs, Tempo for traces, and Grafana for dashboards and alerts. Zabbix is a strong addition for network devices and classic servers.
Can we keep Datadog for some things? Yes. Keeping Datadog APM for critical services while moving logs and infrastructure metrics to open source is a common and sensible setup.
How long does a migration take? A hybrid move of logs and infrastructure metrics typically takes a few weeks to a couple of months, including a parallel run. A full move including APM depends on the number of services and dashboards.
Will we lose our dashboards and history? Dashboards and monitors need to be rebuilt, which is a good moment to drop unused ones. Historical data usually stays in Datadog until its retention ends, while the new stack builds its own history during the parallel run.
We review Datadog bills, cut them where it makes sense, and design, build and run open-source observability stacks for teams that decide to move. See monitoring and observability for how we work.
