# Errors, traces, logs, metrics: when to reach for what

[Sentry](https://yomu.fyi/company/sentry) · Sergiy Dybskiy · Jun 5, 2026

**Type:** Explainer

## Summary

Modern application telemetry relies on four overlapping signals: errors, traces, logs, and metrics. Each telemetry type addresses distinct engineering questions and powers specific debugging workflows. Errors track grouped, actionable application crashes, whereas traces map timing and execution paths across dependency waterfalls. Metrics aggregate numerical measurements across historical deployments, and logs preserve complete state and decision-making context at specific moments in execution. Emitting telemetry directly into the format needed for a given workflow proves superior to relying on a single wide event, as tools like AI coding agents require structured spans to optimize execution paths while human debuggers rely on unsampled logs and metrics to pinpoint silent failures.

## Context

Developers and automated coding agents frequently struggle to decide whether to emit an error, trace, log, or metric when instrumenting application code due to functional overlap across telemetry types.

## Approach / What changed

Map each telemetry type to a distinct operational question and retention strategy, emitting structured data into the dedicated signal format required by target workflows such as error tracking, dependency tracing, or metrics aggregation.

## Takeaways

- Traces suit sampled representation because percentage data adequately reveals latency bottlenecks, whereas logs and metrics should remain unsampled to isolate rare failures and track accurate aggregate trends.
- AI coding agents like Codex can directly analyze structured trace dependency trees with span timing to parallelize async operations without reconstructing call graphs from raw log lines.
- Emitting a single wide event is insufficient for diverse operational workflows because raw columnar events cannot natively deduplicate into issues, build waterfalls, or trigger real-time threshold alerts.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [Monitoring](https://yomu.fyi/topic/monitoring), [Observability](https://yomu.fyi/topic/observability), [Reliability](https://yomu.fyi/topic/reliability)

[Read original post](https://blog.sentry.io/errors-traces-logs-metrics-when-to-reach-for-what)
