Prompt
Datadog Logs is getting too costly as our volume grows
Latest observation
That’s a common pain point with Datadog Logs. The fastest way to cut cost is usually not “use a cheaper vendor,” but to reduce what you ingest, retain, and rehydrate.
Here’s a practical way to tackle it:
1) Find the biggest cost drivers
Break logs cost into:
- Ingested volume: raw bytes/day coming in
- Indexed logs: logs stored for fast search
- Retention: how long you keep them
- Rehydration / archives: when you search cold storage
- High-cardinality fields: can increase payload size and noise
In Datadog, usually the biggest wins come from reducing ingestion and indexing.
2) Cut noise at the source
Common high-volume, low-value logs to drop or sample:
- Health checks / readiness probes
- Debug logs in production
- Repeated “success” messages
- Polling / heartbeat logs
- Known noisy third-party library logs
Use:
- Log pipelines / exclusion filters
- Sampling
- Level-based filtering at the app/logger config
3) Reduce what you send
Trim oversized payloads:
- Remove stack traces from non-errors
- Avoid logging full request/response bodies
- Don’t serialize large objects by default
- Drop unnecessary metadata fields
- Keep tags/attributes only if they’re used for search, dashboards, or alerts
4) Split logs into tiers
A good pattern:
- Tier 1 (indexed): only actionable logs, short retention
- Tier 2 (archived): everything else in cheap object storage
- Tier 3 (metrics): turn repetitive logs into metrics instead of storing each event
This way you can still investigate incidents without paying to index everything.
5) Convert repetitive logs into metrics
If a log is mainly used for counts/alerts, it may be better as a metric:
- Error counts by service
- Retry counts
- Latency buckets
- Queue depth
- Rate-limit events
Metrics are usually much cheaper than logging every event.
6) Tighten retention policies
Ask:
- Do you really need 30/60/90 days of indexed logs?
- Can most services use 7–14 days indexed, with longer archive retention?
- Are compliance-driven logs separated from operational logs?
7) Watch cardinality and tagging
Too many unique values in attributes can make logs harder to query and more expensive to manage:
- User IDs, request IDs, session IDs, UUIDs
- Dynamic URLs
- Free-form text fields
Keep these when needed for debugging, but avoid indexing them broadly.
8) Measure before and after
Set up a simple weekly review:
- top services by log volume
- top pipelines by ingest
- index usage by source
- % of logs actually searched
- error logs vs info/debug logs
This helps you target the real offenders instead of blanket-dropping useful logs.
A recommended rollout plan
Week 1
- Identify top 5 log sources by volume/cost
- Disable obvious noise
- Lower verbose log levels in prod
Week 2
- Add exclusion filters for health checks and repetitive messages
- Remove unnecessary fields from JSON logs
- Shorten indexed retention where possible
Week 3
- Move low-value logs to archive-only
- Convert repetitive events into metrics
- Review app logging patterns with engineering teams
If you want a bigger structural fix
Consider a logging architecture like:
- App emits logs to OpenTelemetry / Fluent Bit / Vector
- Router applies sampling/filtering
- Critical logs go to Datadog indexed
- Bulk logs go to S3/GCS/Azure Blob
- Searchable via archive/replay when needed
That gives you much more control over cost.
If you want, I can help you with either:
- a Datadog-specific cost reduction checklist,
- a log filtering policy, or
- a migration design to cheaper log storage.