Christian Lehnert — Linux, Hacking & Faith

OpenTelemetry - The Signal You Skip and the Label That Kills You

Christian Lehnert • 2026-11-07 • ~9 min read

OpenTelemetry

The Question Your Dashboards Cannot Answer

A request to your checkout endpoint takes four seconds instead of two
hundred milliseconds. Your dashboards are green-ish. CPU is fine,
memory is fine, the error rate is flat. The request passes through an
ingress, an API gateway, three services, a database, and an external
payment provider, and somewhere in that chain it lost almost four
seconds. Which hop?

Metrics cannot tell you. They aggregate, and the slow request is one
sample averaged into thousands of fast ones. Logs might, if every
service logged the right thing and you can stitch six services' logs
together by timestamp and hope. What answers the question directly is a
trace: one record of that one request, every hop as a timed span, the
slow one sitting there visibly four seconds wide.

That gap, between knowing something is wrong and knowing where, is what
OpenTelemetry exists to close. And it is exactly the part most teams
skip.

What OpenTelemetry Actually Is

The first misunderstanding is category. OpenTelemetry is not a
monitoring tool and has no dashboards. It does not store anything. It
is a specification, a set of SDKs and auto-instrumentation agents for
most languages, a wire protocol called OTLP, and the Collector, a
standalone process that receives, processes, and forwards telemetry.
The storage and the UI are whatever backend you choose: Prometheus and
Grafana, Jaeger or Tempo, Elastic, a commercial vendor.

That separation is the entire value. Before OpenTelemetry, instrumenting
your code meant instrumenting it for one vendor's agent, and changing
vendors meant re-instrumenting every service. With OpenTelemetry you
instrument once against a neutral API, and the backend becomes a
configuration choice in the Collector rather than a code dependency.
This is the same lesson as Terraform's provider model or SOPS's
pluggable key backends: decouple the thing you write from the thing you
are locked into.

As of this year, traces, metrics, and logs are all stable in the
specification. A fourth signal, continuous profiling, reached public
alpha in March 2026 and is built heavily on the eBPF techniques from the
last post. It is promising and explicitly not for critical production
yet.

Three Signals, Three Questions

The cleanest way to keep the signals straight is by the question each
one answers.

Metrics answer "is something wrong." They are cheap, aggregated numbers
over time: request rate, error rate, latency percentiles, queue depth.
They are what you alert on, because they are small and fast to query.
They are deliberately bad at individual events.

Traces answer "where is it wrong." A trace follows one request across
every service it touches, as a tree of spans with timings and
attributes. It is the only signal that shows causality across process
boundaries.

Logs answer "why is it wrong." They carry the detail: the exception,
the rejected input, the decision the code made. Their weakness has
always been that a log line from service D has no idea it belongs to the
same request as a log line from service A.

OpenTelemetry fixes that last weakness, and this is the feature that
makes the three signals more than three separate tools. When a request
is traced, every log line written during it can carry the trace ID and
span ID. Now the debugging path is a straight line: the latency metric
alerts, you pull an exemplar trace for a slow request, you find the
fat span, and you jump from that span directly to the logs written
inside it. Without correlation you have three haystacks. With it you
have one thread through all of them.

Why Everyone Skips Traces

Metrics and logs are easy to adopt because each service can do them
alone. Traces are the opposite: they only work if every hop
participates. The mechanism is context propagation. The first service
creates a trace ID and passes it downstream in a header, the W3C
traceparent standard, and every subsequent service must read it,
attach its spans to it, and pass it on. One hop that drops the header
breaks the trace into disconnected fragments.

In practice that one hop is always something you forgot about: a legacy
service nobody wants to touch, a message queue that does not carry
headers by default, an async job runner, a reverse proxy configured to
strip unknown headers. Each needs explicit attention, and until all of
them get it, your traces have holes exactly where the interesting
latency usually hides. So teams instrument a few services, see broken
traces, conclude tracing is not worth it, and fall back to grepping
logs.

It is worth it. Auto-instrumentation agents for Java, .NET, Python, and
Node cover the common frameworks and HTTP clients with no code changes,
which gets most of the chain for free. The remaining gaps are a finite
list, and closing them once turns "which of six services is slow" from
an afternoon into a click. If you adopt one signal properly this year,
make it the one you skipped.

Cardinality: The Label That Kills You

The second mistake is the one that takes down production monitoring.

Every unique combination of metric name and label values is a separate
time series. A request counter labeled by method and status has a
few dozen series. Add a user_id label and you have one series per
user per method per status. On a service with a million users, one
innocent-looking label just created millions of time series, and your
metrics backend, which keeps an index entry and in-memory state for
every one of them, slows to a crawl, runs out of memory, or presents
you with an invoice that ends the conversation.

This is a blast-radius problem in the most literal sense: one line of
instrumentation code, added by someone trying to be helpful, degrades
the monitoring for every team that shares the backend. And it usually
happens during an incident, when someone adds the label to debug a
problem and forgets to remove it.

The rule is simple and worth writing into your review checklist: metric
labels must be bounded. Method, status code, route template, region,
service version are fine. User IDs, request IDs, session IDs, email
addresses, raw URLs with IDs in the path, and anything else unbounded
do not belong in metric labels. They belong on spans and in logs, where
high cardinality is expected and costs only storage, not an index
explosion. The division of labor between the signals is not just
conceptual. It is how you keep the cheap one cheap.

Sampling, and Where It Happens

Tracing every request at volume is expensive, so you sample. There are
two places to decide.

Head sampling decides at the start of the request, typically by keeping
a fixed percentage. It is simple and cheap, and it has one fatal flaw:
the decision is made before anything interesting has happened, so it
throws away the rare slow or failing request with exactly the same
probability as the boring ones.

Tail sampling decides after the whole trace has completed, so it can
keep every trace with an error or a latency above a threshold and only
a small fraction of the healthy ones. That is what you actually want.
The catch is operational: the Collector doing tail sampling has to hold
all spans of a trace in memory until the decision, and all spans of one
trace must arrive at the same Collector instance. At scale that means a
two-tier setup with a load-balancing layer that routes by trace ID, and
a decision window long enough that slow spans do not arrive after the
verdict. It is more infrastructure, and for anything beyond a small
deployment it is worth it.

The Collector Is the Pivot

Applications can export straight to a backend. Do not let them. Run the
Collector between your services and your backend, and route everything
through it. It is where backend choice lives, where batching and retries
live, where sampling lives, and, importantly in regulated environments,
where you strip data before it leaves your network:

 1receivers:
 2  otlp:
 3    protocols:
 4      grpc:
 5      http:
 6 
 7processors:
 8  memory_limiter:
 9    check_interval: 1s
10    limit_percentage: 80
11  attributes/scrub:
12    actions:
13      - key: user.email
14        action: delete
15  batch:
16 
17exporters:
18  otlp:
19    endpoint: tracing-backend.internal:4317
20 
21service:
22  pipelines:
23    traces:
24      receivers: [otlp]
25      processors: [memory_limiter, attributes/scrub, batch]
26      exporters: [otlp]

Traces and logs are very good at collecting personal data by accident:
an email in a span attribute, a customer ID in a log message, a token in
a captured header. The Collector is the one choke point where you can
enforce removal for every service at once, instead of trusting each
team to never log the wrong field. Put memory_limiter first, so a
telemetry flood degrades the Collector gracefully instead of killing it.

The Honest Limits

OpenTelemetry standardizes how telemetry is produced and moved. It does
not give you a backend, and the backend is where most of the cost and
operational weight live. Choosing and running storage for traces and
logs is still your problem.

Auto-instrumentation is noisy. It traces everything it recognizes,
including health checks and chatty internal calls, and the first week
of output is mostly spans nobody needs. Expect to filter.

The semantic conventions, the standard attribute names, have churned.
HTTP attribute names changed during stabilization, and dashboards built
on the old names broke quietly. Pin your SDK versions and read the
changelogs.

And observability is not alerting. A beautifully instrumented system
that nobody gets paged about is just a very detailed record of an
outage you found out about from a customer. That is the same point as
the silence-is-not-success post from the other direction: telemetry
that exists but triggers nothing is decoration.

The Takeaway

Treat OpenTelemetry as plumbing, not a product: instrument once against
the neutral API, route everything through a Collector you control, and
keep the backend swappable. Use metrics to know something is wrong,
traces to know where, logs to know why, and link them with trace IDs so
you are pulling one thread instead of searching three haystacks. Do the
propagation work for traces even though it is annoying, because that is
the signal that actually answers the 2 a.m. question. Keep metric labels
bounded, put the unbounded detail on spans, sample at the tail, and
scrub at the Collector. Most teams get the first part right. The value
is in the parts they skip.

Tagged:
#devops #logging #monitoring
← Back to posts