AI Operations

OpenTelemetry profiling brought performance closer to the main stack

2 min read

Performance investigations get harder when their evidence lives somewhere else.

A trace may show that a request spent 900ms in a service. A metric may show CPU rising. A log may record the timeout. None of those, by themselves, tells you which code path consumed the time. That is the job of a profile: connect the expensive outcome to the stack that paid for it.

OpenTelemetry profiling is interesting because it puts that answer closer to the rest of the observability workflow.

four signals, different questions

  • logs: what happened
  • metrics: how much or how often
  • traces: where the request went
  • profiles: which code did the work

The distinction is useful during an incident. Serialization, regular expressions, compression, allocation churn, or an unexpected dependency call can all hide behind the same high-level symptom: a slow route. The trace locates the service. The profile narrows the search inside it.

sampling is the operating constraint

A production profiler has to be inexpensive enough to leave available, or simple enough to enable when an incident starts. Sampling helps by collecting stacks at intervals instead of requiring a separate debugging session for every performance question.

It also leaves real gaps. Short-lived behavior can be missed. Symbolization can add friction. Native stacks and stripped binaries are not magically easy. The trade still looks better when the resulting data can travel through the same telemetry path as traces, metrics, and logs.

context turns a profile into evidence

A profile without its resource context invites guessing. Service version, region, host, deployment, tenant class, and feature flags can explain why two apparently similar requests have different costs.

The slowdown might exist only on the newest version. It might affect one node class or one customer segment. It might follow a deploy that changed input size. Those are not details to reconstruct later; they are part of the performance story.

The practical promise is modest and useful: a slow request should lead to the service, the hot stack, and the change that made the stack expensive. Profiling becomes less of a side investigation when it shares the same coordinates as the rest of the system.

Jeremy London

About Jeremy London

Engineering leader and builder in Denver. I write about AI platforms, agents, security, reliability, homelab infrastructure, and the parts of engineering work that have to survive production.