DEV Community

Rumen Mazhdrakov
Rumen Mazhdrakov

Posted on Originally published at logcost.pages.dev

Datadog log costs, explained

Datadog bills logs on two separate meters. Almost every surprise on a Datadog log invoice comes from the second one, so it pays to understand both before you look at your volume.

Two meters: ingest and indexing

Ingest is charged per GB of uncompressed log data you send: $0.10 per GB, the same on every billing plan. It covers processing, Live Tail and forwarding to your own archive, and it applies to every log you send, whether you later keep it or not.

Indexing is what makes a log searchable, usable in dashboards and able to fire alerts. It is charged per million log events, not per GB, and the rate depends on how long the index keeps them:

Index retention Annual commitment Month-to-month On-demand
3 days $1.06 $1.27 $1.59
7 days $1.27 $1.52 $1.91
15 days $1.70 $2.04 $2.55
30 days $2.50 $3.00 $3.75

Prices per million indexed events per month, from Datadog's public list prices, checked 30 November 2026. Retention beyond 30 days is a contract conversation.

A worked example

Take a modest setup: 10 GB of logs a day, an average event of 1 KB, everything indexed for 15 days on an annual commitment.

  • 300 GB a month ingested, at $0.10: $30
  • 300 GB at 1 KB per event is 300 million events, at $1.70 per million: $510
  • Total: $540 a month

Indexing is 94% of that bill. Halving your ingest volume saves $15; halving what you index saves $255. Every cost decision below is really a decision about indexing.

See this scenario in the calculator

Why event size matters more than GB

Because indexing counts events, two teams sending the same 300 GB a month can get very different bills. What changes is how many events those gigabytes contain.

Average event size Events per month Monthly total
250 bytes 1,200M $2,070
500 bytes 600M $1,050
1 KB 300M $540
2 KB 150M $285

Same 300 GB a month, 15-day index, annual commitment.

Short, chatty lines are the expensive kind: access logs, health checks, one-line debug statements from a hot loop. Structured JSON logs that carry context in one event cost less per useful fact than the same facts spread over five lines. If you are comparing Datadog with a vendor that bills per GB, convert with your real average event size, not a guess. Your Log Management usage page shows both GB and event counts.

Retention is a price multiplier

The same 300 million events cost $318 a month at 3-day retention and $750 at 30-day retention. That 2.4× spread is the biggest single lever most teams have, and it is set per index.

Index retention Indexing 300M events per month
3 days $318
7 days $381
15 days $510
30 days $750

The billing plan is the second multiplier. The 15-day rate is $1.70 with an annual commitment and $2.55 on-demand, 50% more for the same logs. If your volume is stable enough to commit, the commitment is worth more than most tuning.

Five settings that decide the bill

1. Exclusion filters

Each index can have exclusion filters that drop matching logs from the index, or sample them at a percentage. Excluded logs are still ingested and paid for at $0.10 per GB, and they still appear in Live Tail, can still generate metrics, and are still sent to your archive. You only skip the indexing charge.

Good first candidates: load-balancer health checks, readiness probes, successful 200 access logs, and debug logs from services that are not being debugged.

2. Separate indexes per retention

Not every log needs the same retention. Datadog's own guidance is to split indexes by how long each kind of log is useful, for example errors and warnings in a 7-day index and sampled info logs in a 3-day index.

Applied to the example above, with 10% of events being warnings or errors, 60% info sampled at 50%, and the remaining 30% excluded:

  • Warnings and errors: 30 million events at the 7-day rate, $38.10
  • Sampled info: 90 million events at the 3-day rate, $95.40
  • Ingest is unchanged at $30
  • Total: $163.50 a month instead of $540, about 70% less, with every error still searchable for a week

3. Daily quotas

A daily quota caps how many events an index stores per day. Once it is hit, new logs stop being indexed until the quota resets, but stay in Live Tail and archives. It is a guardrail against a noisy deploy doubling the month's bill, not a way to save money day to day. Set it with a warning threshold so you know before it trips.

4. Metrics instead of indexed logs

If a log line only exists so you can count it (requests by status code, jobs completed), generate a metric from it at ingest and exclude the log from indexing. Log-based metrics are billed as custom metrics, so check that the metric's tag cardinality stays small.

5. Flex Logs and archives for long retention

For logs you keep for audits or rare investigations, standard indexing is the wrong tool.

  • Flex Logs store events for months at a much lower rate: Flex Storage from $0.05 per million events a month, with query compute priced separately, or Flex Logs Starter at $0.60 per million with compute included for under 2 billion events a month. Starter has a 3-month minimum retention.
  • Archives to your own S3, GCS or Azure bucket are included in the ingest price. Getting logs back costs $0.10 per compressed GB scanned for rehydration, and the rehydrated events are then billed at your indexing rate.

Flex is the better fit when you search old logs regularly; archives when you almost never do.

What this guide leaves out

APM spans, Infrastructure hosts, Sensitive Data Scanner, Cloud SIEM and log forwarding to custom destinations all have their own meters. Negotiated contracts usually come in below list price, so treat every number here as a ceiling rather than a quote.

Estimate your bill

I built a log cost calculator that models ingest, the indexed share and every retention tier above, and puts the result next to New Relic, Grafana Cloud and Better Stack at the same volume. Some links on that site are affiliate links; the numbers come from public price lists either way.

Sources

Originally published at logcost.pages.dev.

Top comments (0)