Prompt
What is the best logging platform for messy JSON logs?
Latest observation
For messy JSON logs—meaning logs with inconsistent fields, occasional malformed records, and lots of nested structure—the “best” platform depends on whether you care most about search, schema flexibility, cost, or operational simplicity.
Strong overall picks
1) Datadog Logs
Best if you want the easiest, most polished experience.
- Very good at ingesting semi-structured JSON
- Flexible parsing pipelines
- Great search, facets, dashboards, alerting
- Handles inconsistent fields reasonably well
- Strong if you already use Datadog for infra/APM
Downside: can get expensive fast at scale.
2) Elastic / OpenSearch
Best if you want maximum flexibility and control.
- Excellent for messy, high-cardinality JSON
- Supports dynamic mapping, nested objects, custom ingest pipelines
- Powerful search and analytics
- Good choice if you have devops capability to tune mappings and parsing
Downside: more operational overhead, and schema mistakes can become painful.
3) Grafana Loki
Best if you want lower-cost log storage and already use Grafana.
- Cheap and simple for log aggregation
- Works well if you treat logs as text with labels
- Can ingest JSON, but it’s not as strong as Elasticsearch/Datadog for deeply structured querying
Downside: not ideal if you need rich ad hoc querying over messy JSON fields.
If your logs are really messy
If you mean:
- inconsistent keys
- partially broken JSON
- deeply nested payloads
- changing structure over time
then the best approach is often:
- Ingest raw logs unchanged
- Extract only a small set of stable fields at ingest time:
- timestamp
- service
- environment
- level
- request_id / trace_id / user_id if available
- Keep the original payload for full-text search and reprocessing
- Use a platform with flexible indexing/parsing
- Datadog if you want convenience
- Elastic/OpenSearch if you want control
My practical recommendation
- Small/medium team, want easiest setup: Datadog
- Need powerful JSON querying and are okay running/maintaining it: OpenSearch or Elasticsearch
- Want cheap log storage and already use Grafana: Loki
- Need cloud-native managed simplicity at hyperscale: consider Splunk or a cloud provider’s logging stack, but they’re often expensive
Short answer
If you want the best all-around platform for messy JSON logs, I’d usually pick:
Datadog for ease of use
or
OpenSearch/Elasticsearch for flexibility and control
If you want, I can also give you:
- a side-by-side comparison table
- the best choice by company size
- or a recommendation for AWS/GCP/Azure specifically.