Pcornel
Technology Comparisons

Metrics vs Logs

Compare numeric time series with event records for monitoring and troubleshooting.

DimensionMetricsLogsWhat it means in practice
Data shapeNumbers with labels sampled over time.Timestamped text or structured events.Metrics are aggregates; logs keep individual events.
Cost driverNumber of series (cardinality).Volume of bytes ingested and retained.Put per-request detail in logs, not metric labels.
Best forAlerting, trends, dashboards, SLOs.Investigating specific events and errors.Alert on metrics, then use logs to explain.
Query stylePromQL-style aggregation over time.Search and filter, then aggregate.Log-based metrics can bridge the two.
RetentionLong retention is cheap after downsampling.Long retention is expensive.Keep high-value logs (audit, security) longer than debug logs.
CorrelationExemplars and labels such as service.trace_id and service fields.Shared labels let you pivot between signals.

← All comparisons

Confirmation

Confirm action

Continue?