Logs, Metrics, and Traces: What Does Each Signal Tell You?
Logs, metrics and traces answer different questions: metrics show when behaviour changed, traces show where in the service graph a request slowed or failed, and logs explain why. A worked checkout incident follows a p99 latency alert to a slow fraud-check span and then to logs filtered by trace_id, which is why structured JSON logs should carry trace_id/span_id and services should propagate the W3C traceparent header. On Railway, logs and infrastructure metrics are collected natively, while traces need OpenTelemetry exported to a third-party backend.
Related posts
- Observability as a superpower
incident.io mediumAdeptDistributed tracing with OpenTelemetry lets incident.io engineers spot bugs before customers report them, by showing each request's route as a tree of timed spans that exposes slow steps, N+1 queries and duplicate calls. The team gets spans for free from instrumented database and HTTP clients, follows a consistent span naming convention, and tags spans with metadata such as table names, row counts, query fingerprints and org IDs. In Go, an internal library plus a defer-with-named-return pattern records errors on spans automatically. Traces go to Cloud Trace locally and to Grafana Tempo in production, where TraceQL queries power debugging. Trace URLs are threaded into logs, Sentry errors and response headers, with a caution that span and attribute volume drives storage cost.
- Why (and how) GitHub is adopting OpenTelemetry
GitHub Engineering mediumAdeptGitHub is standardizing on OpenTelemetry to replace a patchwork of statsd dialects, syslog-format logs and OpenTracing traces that made cross-signal correlation hard and forced repeated instrumentation work. The initial focus is tracing as the root signal, from which metrics, logs and exception reports can be derived and correlated via trace IDs injected into log lines. Opinionated internal helper libraries and community auto-instrumentation for Rails, PG, ActiveJob and HTTP clients give quick wins. Ruby config examples show a no-op span exporter for tests and a few `c.use` lines that surface slow database calls.
- Tracing Notifications
Slack Engineering mediumAdeptSlack models every notification as its own distributed trace, using the notification_id as the trace_id and span links back to the sender's message trace, so notification flows can be sampled at 100% while ordinary backend requests stay at 1%. A shared span spec (trigger, notify, sent, received, opened, read in app) gives backend services and iOS, Android, Desktop and web clients one data format with built-in sessionization and SpanID-based dedup. That design depends on SlackTrace decoupling trace context propagation from request context. The traces feed ElasticSearch/Grafana and the data warehouse, cutting customer-experience triage time for notification tickets by 30% and doubling as the source for product funnel analytics.
- Zero-config Debugging with Deno and OpenTelemetry
Deno mediumAdeptDeno's built-in OpenTelemetry support (enabled with --unstable-otel) automatically correlates console.log output with trace IDs, creates spans for incoming and outgoing HTTP requests, propagates W3C tracecontext headers across services, and records request-count and latency metrics by status code, all without code changes. The walkthrough shows why interleaved logs need request correlation and how spans and parent span IDs build a trace. It provides a withSpan helper around startActiveSpan for adding custom spans such as database calls, and contrasts automatic propagation with manually injecting traceparent headers.
- Should you use a log or a metric?
Sentry mediumAdeptLogs record what was true at a decision point so you can reconstruct an event while debugging. Metrics are questions you commit to in advance and track over time even when nothing is wrong. Using a signup flow in the Sentry JavaScript SDK, the post shows when traces suffice (timing, but sampled), when to log (per-user failures, email delivery status) and when to emit counters, gauges or distributions (signup trends, funnels, queue depth, time-to-verify across requests). Practical rules: set shared attributes and user on the scope once, use the same names and keys on logs and metrics, count existing logs for ad-hoc debugging but don't build dashboards on them, and filter what reaches Sentry with beforeSendLog or level lists.