Grafana Pyroscope — Continuous Profiling Backend
Open-source continuous profiling backend from Grafana Labs that ingests pprof and eBPF profiles, supports label-based queries, and links traces to flamegraphs.
What it is
Grafana Pyroscope is a continuous profiling backend that records CPU, memory, goroutine, and lock profiles from production services. After joining Grafana Labs, it was merged with Phlare into a single Grafana-integrated backend that supports both pull (pprof-scrape) and push (agent SDK) ingestion.
It is designed for backend engineers and SREs who need to understand where their services spend time and memory in production, not just in local benchmarks.
How it saves time or tokens
Continuous profiling eliminates the guesswork of performance debugging. Instead of adding ad-hoc profiling code and redeploying, Pyroscope records profiles continuously with low overhead. The diff mode lets you compare two time ranges or deployments instantly, pinpointing which function calls regressed.
How to use
- Run the all-in-one binary:
docker run -d --name pyroscope -p 4040:4040 grafana/pyroscope:latest - Instrument your service with the Pyroscope SDK (Go, Java, Python, Ruby, .NET, Node.js, Rust)
- View flamegraphs at
http://localhost:4040or in Grafana with the Pyroscope data source
Example
package main
import (
"github.com/grafana/pyroscope-go"
)
func main() {
pyroscope.Start(pyroscope.Config{
ApplicationName: "my.service",
ServerAddress: "http://pyroscope:4040",
ProfileTypes: []pyroscope.ProfileType{
pyroscope.ProfileCPU,
pyroscope.ProfileAllocObjects,
pyroscope.ProfileAllocSpace,
pyroscope.ProfileInuseObjects,
pyroscope.ProfileInuseSpace,
},
})
defer pyroscope.Stop()
// Your application code here
}
# Run Pyroscope locally
docker run -d --name pyroscope -p 4040:4040 grafana/pyroscope:latest
# Open the UI
open http://localhost:4040
Related on TokRepo
- AI Tools for Monitoring -- Observability and monitoring tools
- AI Tools for DevOps -- Infrastructure and operations tooling
Common pitfalls
- CPU profiling overhead is typically under 2%, but memory profiling with high allocation rates can add noticeable overhead
- The pull mode requires your service to expose a pprof endpoint, which may need firewall rules in production
- Grafana integration requires configuring the Pyroscope data source; it does not appear automatically
Frequently Asked Questions
Pyroscope supports Go, Java, Python, Ruby, .NET, Node.js, and Rust through native SDKs. It also supports eBPF-based profiling for any language running on Linux without code changes.
CPU profiling typically adds less than 2% overhead. Memory profiling overhead depends on allocation rate. The pull mode (scraping pprof endpoints) has even lower overhead since it samples periodically rather than continuously.
Add Pyroscope as a data source in Grafana, then create dashboard panels that display flamegraphs alongside your metrics, logs, and traces. Span profiles link individual trace spans to their corresponding flamegraph frames.
Yes. The diff mode lets you select two time ranges and view a differential flamegraph showing which functions got faster or slower. This is useful for validating performance improvements or catching regressions after deploys.
Pyroscope and Phlare were merged after Grafana Labs acquired Pyroscope. The combined project is now called Grafana Pyroscope and is the recommended continuous profiling solution in the Grafana ecosystem.
Citations (3)
- Pyroscope GitHub— Pyroscope is a continuous profiling backend from Grafana Labs
- Pyroscope Documentation— Supports pprof, eBPF, and native SDKs for Go, Java, Python, Ruby, .NET, Node.js,…
- Grafana Blog— Merged with Phlare into a single Grafana-integrated backend
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.