← All insightsObservability

The three pillars of observability, wired together

CodeWizard Engineering · 2 July 2025 · 3 min read · Intermediate

Monitoring tells you something is wrong; observability lets you ask why without shipping new code. The three pillars - metrics, logs and traces - each answer a different question, and the magic is in connecting them.

Metrics: is it wrong, and how badly?

promql
sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))

Traces: where in the request did it break?

python
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("charge_card") as span:
    span.set_attribute("order.id", order_id)
    charge(order_id)

Logs: what exactly happened?

logql
{app="web"} | json | trace_id="4bf92f3577b34da6"   # jump from a trace straight to its logs

The payoff is correlation: an alert (metric) links to the slow trace, and the trace_id links to the exact log lines. You go from 'error rate is up' to the offending line in three clicks.

Buy or build whatever you like - just make sure a metric can lead you to a trace, and a trace to its logs.

Standardize on OpenTelemetry for instrumentation and keep a shared trace_id across pillars; that single convention is what turns three tools into one investigation.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult