Posted on Sep 7, 2026 · Updated Sep 7, 2026 · 9 min read

Logging Cost Optimization: 9 Ways to Cut Your Bill (2026)

Most logging bills are driven by one habit: indexing every log line at full retention, forever, whether or not anyone will ever query it. Fix that before you touch a vendor's price list. Cut ingestion volume with log-level tuning and sampling, tier retention so only recent and actively-queried logs sit in expensive hot storage, and route the rest somewhere cheaper — and most teams cut logging spend 40–70% without switching platforms or losing the data they actually need.

Logging has become one of the fastest-growing lines on an infrastructure bill. Dynatrace's 2026 State of Log Management report found that log tooling now consumes 45% of the average observability budget, log and telemetry volume grew 93% year over year, and 67% of respondents said the cost of their existing log tools now outweighs the value. None of that is because CloudWatch, Datadog, Splunk, or Elastic suddenly got greedy — it's because applications log more, retain it longer, and index it by default. This guide covers how logging pricing actually works across the major platforms and the specific changes that bring the bill back down. If you're specifically on AWS, our CloudWatch costs deep dive covers the ingestion math and custom-metrics traps in more detail.

TL;DR — logging cost optimization (2026)

  • CloudWatch Logs: $0.50/GB ingest (Standard), $0.25/GB (Infrequent Access)
  • Datadog: $0.10/GB ingest + $1.70–$2.55 per million events indexed
  • Splunk Cloud: list ingest pricing around $150–$200/GB/day; most customers now on workload-based pricing instead
  • Elastic Cloud Serverless: $0.07–$0.09/GB ingested + $0.017–$0.019/GB/month retained
  • New Relic: 100 GB/month free, then $0.30–$0.60/GB
  • Biggest levers: log-level tuning, sampling, exclusion filters, retention tiering, and routing cold logs to S3 + Athena instead of hot indexes
Code editor and terminal output on a screen representing application log data

Why logging bills balloon

Every logging platform charges on some combination of three meters: how much data you send in (ingestion), how much of it you make searchable (indexing), and how long you keep it (retention). None of those knobs are visible at write time. A developer adds a debug line, a retry loop logs every attempt, a health check pings every five seconds and each ping gets logged — and none of it shows up as a cost until the invoice arrives weeks later, aggregated across the whole organization.

Three forces compound the problem in 2026 specifically. First, log volume is genuinely growing: Dynatrace's survey puts average year-over-year growth at 93%, with one in five organizations seeing growth above 150%, driven largely by AI workloads and increasingly granular microservice tracing. Second, most teams still default to indexing everything they ingest, because turning off indexing on a log group feels like losing visibility — even though the majority of logs are never queried after the first 24–48 hours. Third, retention defaults are almost always "keep forever" unless someone explicitly changes them, which means storage costs accumulate quietly on data nobody is looking at.

The fix isn't a smarter vendor. It's treating ingestion volume, indexing scope, and retention length as three separate decisions instead of one default setting.

How the major logging platforms price it

Pricing models differ enough between vendors that a direct per-GB comparison needs caveats, but the table below gives a representative 2026 picture based on published list pricing (AWS, Datadog, and Elastic pricing pages). Splunk and New Relic figures come from published rate cards and typical customer ranges since enterprise deals vary widely.

PlatformIngestionIndexing / retention
AWS CloudWatch Logs$0.50/GB (Standard), $0.25/GB (Infrequent Access)$0.03/GB/month storage until logs expire
Datadog Log Management$0.10/GB ingested or scanned$1.70–$2.55 per million events indexed (15-day retention); $0.05/million events on Flex Storage
Splunk Cloud~$150–$200/GB/day list price (legacy ingest licensing)Workload-based pricing (Splunk Virtual Compute) now standard for new customers; discounts of 40–70% off list are routine
Elastic Cloud Serverless$0.07/GB (Logs Essentials), $0.09/GB (Complete)$0.017–$0.019/GB/month retained; hosted tiers start at $99/month
New Relic100 GB/month free, then $0.30–$0.40/GB (Original), $0.60/GB (Data Plus)30-day retention on Original Data, 120-day on Data Plus; +$0.05/GB for EU region

The headline numbers aren't directly comparable — Datadog and Elastic separate ingestion from indexing, Splunk has largely moved off per-GB metering entirely, and CloudWatch bundles a simpler two-tier model. What matters for cost control is the same regardless of vendor: ingestion volume and indexed/retained volume are billed independently, and cutting either one moves the bill.

Nine techniques to cut logging costs

Ranked roughly by typical payoff. Most teams get meaningful savings from the first three alone before touching architecture.

  1. Right-size log levels in production. Shipping DEBUG-level logs to production is the single biggest avoidable cost on most bills. A service emitting 500 GB/month of DEBUG-level logs to Datadog costs roughly $50/month in ingestion alone before indexing. Dropping to INFO or WARN typically cuts volume 5–10x, taking that $50 down to $5–$10.
  2. Sample high-volume, low-value events. Health checks, cache hits, and successful request logs rarely need 100% capture. An OpenTelemetry Collector configured for tail sampling can keep 100% of errors and slow requests while sampling healthy traffic at 5–10%, which industry write-ups on collector-side sampling put at a 40–70% reduction in shipped volume with no loss of incident-debugging signal.
  3. Add exclusion filters at the agent or collector. Both Datadog and Splunk support dropping specific log patterns before they're billed as ingestion. Load balancer health-check pings and static-asset access logs are the most common candidates — they're high-frequency, near-zero value, and easy to pattern-match.
  4. Switch to structured (JSON) logging. A structured log line with consistent field names is typically 20–30% smaller than an equivalent free-text message with embedded values, and it lets you query specific fields instead of scanning full-text, which matters directly for platforms like Athena and Logs Insights that bill per GB scanned.
  5. Index only what you actually search. Splunk and Elastic both charge more for indexed/searchable data than for raw storage. Fields you never filter or aggregate on don't need to be indexed — keep them in the raw log body instead of promoting every field to a searchable index.
  6. Set an explicit retention policy on every log stream. The default in most platforms is indefinite retention. CloudWatch storage runs $0.03/GB/month forever unless you cap it; most teams need 7–30 days of hot, queryable retention and can move anything older to cold storage.
  7. Route cold logs to S3 or equivalent object storage. Covered in detail below — this is usually the highest-leverage architectural change for teams with compliance or audit retention requirements measured in months or years.
  8. Audit high-cardinality fields before they hit the index. A field like request ID or user ID, if indexed, multiplies the number of unique index entries the same way high-cardinality dimensions multiply CloudWatch custom metrics. Strip or hash these fields before indexing if you don't need to search on the exact value.
  9. Deduplicate repeated errors before shipping. A crash loop or retry storm can generate thousands of near-identical log lines in minutes. Batching or deduplicating repeated stack traces at the source before they leave the host keeps the signal (one incident, N occurrences) without paying to ingest N copies of the same message.
  10. Scope ad hoc queries narrowly. Logs Insights and Athena both bill per GB scanned rather than per row returned. A query without a tight time range or log group filter can scan far more data than intended — narrow the window first, then widen it only if needed.

Find where your cloud spend is going before you optimize logging in isolation

Logging is rarely the only line item worth trimming. spendark models your full AWS, Azure, or GCP spend so you can see how logging costs stack up against compute, storage, and data transfer before deciding where to spend optimization effort first.

Route cold logs to S3 + Athena instead of hot indexes

Every major logging platform charges a premium to keep data in hot, instantly-searchable storage. That premium makes sense for the last 7–30 days, when you're actively debugging incidents. It makes far less sense for the 6–12 months of logs many compliance regimes require you to retain but almost never query.

The common pattern: export logs older than your hot-retention window to Amazon S3 (or the Azure/GCP equivalent) as compressed, partitioned files, then query them on demand with Athena or a similar serverless query engine instead of paying continuous hot-storage or indexing fees. S3 Standard storage runs about $0.023/GB/month — roughly a quarter of CloudWatch's $0.03/GB/month and a small fraction of what indexed storage costs on Datadog or Splunk. Athena bills $5 per TB scanned ($0.005/GB), so an occasional compliance query against a year of archived logs costs cents to a few dollars rather than a recurring monthly index fee.

The tradeoff is query latency and convenience: Athena queries take seconds to minutes, not the sub-second response of a hot index, and you lose live tailing and real-time alerting on archived data. That tradeoff is the right one for logs you keep for audit purposes and almost never touch. It is the wrong one for logs you're actively using to debug a production incident right now — keep those in your primary platform's hot tier until the incident is resolved.

For a broader look at where this fits into overall AWS spend, see our cloud cost optimization checklist and the CloudWatch-specific numbers in our CloudWatch costs guide.

Want someone to find it for you?

Send us your billing export and we'll send back every waste item we find, each with the dollar amount it costs you per month and the exact change to make. No credentials — you export the data yourself. From $1,500, delivered in 5 business days. If we don't find at least 3× the fee in annualised savings, you pay nothing.

Frequently asked questions

What's the fastest way to cut logging costs?

Lower production log verbosity from DEBUG to INFO or WARN. This single change routinely cuts ingestion volume 5–10x because verbose debug logging is almost always the largest contributor to log volume, and it takes minutes to change in most logging frameworks with no code deploy required if log levels are configurable at runtime.

Why do logging costs increase even when traffic doesn't?

Log volume and request volume aren't the same thing. Adding a new microservice, increasing tracing granularity, turning on framework debug output during an investigation and forgetting to turn it off, or a retry loop logging every attempt can all increase log volume independent of traffic. Dynatrace's 2026 survey found average log volume growth of 93% year over year, much of it from exactly these sources rather than genuine traffic growth.

Is Splunk or Datadog cheaper for high log volume?

It depends on how much you index versus how much you only need to store. Splunk's legacy per-GB ingest pricing (list price around $150–$200/GB/day) is expensive at list rate but heavily discounted for large committed volumes, and its newer workload-based pricing removes the per-GB meter entirely. Datadog's $0.10/GB ingestion is cheaper upfront, but its per-event indexing fee ($1.70–$2.55 per million events) adds up fast if you index everything you ingest rather than routing cold data to Flex Storage.

Should I switch logging vendors to save money, or optimize what I have?

Optimize first. Migrating logging platforms is disruptive — new agents, new dashboards, retraining on-call engineers — and most of the savings available from switching vendors are also available by tuning log levels, sampling, retention, and indexing scope on your current platform. Vendor migration is worth considering only after ingestion and indexing are already optimized and the remaining cost is still out of line with peers.