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.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install 138e4edf-38d7-11f1-9bc6-00163e2b0d79 --target codexÀ exécuter après confirmation du plan en dry-run.
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
Questions fréquentes
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.
Sources citées (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
En lien sur TokRepo
Fil de discussion
Actifs similaires
Grafana Tempo — Massively Scalable Distributed Tracing Backend
Grafana Tempo is a high-volume, minimal-dependency distributed tracing backend that ingests OpenTelemetry, Jaeger, and Zipkin spans into cheap object storage and integrates natively with Grafana for trace exploration.
Parca — Continuous Profiling for Infrastructure Optimization
Parca is an open-source continuous profiling platform that collects CPU, memory, and other profiles from production applications with minimal overhead, helping teams identify performance bottlenecks and reduce infrastructure costs.
Grafana OnCall — Open Source Incident Response and On-Call Management
Manage on-call schedules and incident routing with Grafana OnCall. Integrates natively with Grafana alerting for automated escalations, multi-channel notifications, and team rotation management.
Grafana — Open Source Data Visualization & Observability
Grafana is the leading open-source platform for monitoring and observability. Visualize metrics, logs, and traces from Prometheus, Loki, Elasticsearch, and 100+ data sources.