Wiki hub
Continuous Profiling
Always-on, low-overhead sampling of exactly which code is consuming CPU, memory, or other resources in production.
Last updated
Continuous profiling samples what a program is actually doing — which function is on-CPU, which code path is allocating memory — at low overhead, all the time, in production. Instead of the one-off profiling sessions developers have historically run locally or in staging, continuous profilers run everywhere, always, and let you go back in time to see what the code was doing during any past incident.
The result is typically visualized as a flame graph: a stack of function calls where the width of each bar represents the proportion of time (or memory) spent in that function and everything it calls.
Why continuous profiling matters
- It closes the last gap. Metrics, traces, and logs can tell you a service is slow and even which request is affected, but not which line of code is the bottleneck — profiling does.
- It works in production, not just staging. Real production traffic, real data shapes, and real contention are often impossible to reproduce locally; continuous profiling captures the real thing.
- It directly reduces infrastructure cost. Because profiling shows exactly which functions consume the most CPU or memory across a fleet, it’s one of the most direct tools for cutting compute spend.
Key concepts
- Sampling profilers. Rather than instrumenting every function call (which would be far too expensive), continuous profilers sample the call stack many times per second, keeping overhead typically under 1-2%.
- Flame graphs. The standard visualization for profile data — reading a flame graph means looking for the widest bars, which represent where the most time (or memory, or another resource) is actually being spent.
- eBPF-based profiling. A newer generation of profilers (like Parca) use eBPF to capture profiles for any process on a Linux host without requiring code changes or per-language agents.
- Correlating profiles with traces. The most powerful continuous profiling setups let you jump from a single slow trace span directly to the flame graph for that exact time window and service.
Where profiling fits with the other pillars
Metrics show a CPU or latency spike, traces show which service and which request, and logs explain business-level context — but only continuous profiling shows the actual function call responsible for burning CPU or allocating memory. It’s the pillar most directly tied to code, rather than to requests or infrastructure.
Articles in this hub
How to read the width, depth, and layout of a flame graph to find the actual bottleneck instead of chasing visual noise.
eBPF-based Profiling ExplainedHow eBPF lets a profiler sample every process on a Linux host without touching application code or installing per-language agents.
CPU vs. Memory vs. Wall-clock ProfilingWhy on-CPU, allocation, and wall-clock profiling answer different questions, and how picking the wrong one hides the real bottleneck.
Profiling Overhead and Sampling RatesHow statistical sampling keeps continuous profilers cheap enough to run everywhere, and the trade-off between sampling frequency and profile accuracy.
Correlating Continuous Profiles with TracesHow span-linked profiling connects a slow trace span directly to the flame graph responsible for it, closing the gap between slow and why.
Popular profiling tools
Open source
A low-overhead sampling profiler for the JVM, commonly used as the collection agent feeding continuous profiling backends.
Grafana Labs' open-source continuous profiling backend, storing and querying flame-graph data alongside metrics, logs, and traces.
The emerging OpenTelemetry signal for profiles, aiming to standardize profile collection and correlation the way it did for traces.
An open-source, eBPF-based continuous profiler that profiles entire hosts without code changes or per-language agents.
Commercial / managed
A unified commercial observability platform covering infrastructure metrics, APM/distributed tracing, log management, and continuous profiling.
A statistical, low-overhead profiler for production workloads running on or off Google Cloud.
A managed continuous profiling platform built by the creators of Parca, focused on eBPF-based whole-system profiling.