Cette page est affichée en anglais. Une traduction française est en cours.
SkillsApr 15, 2026·3 min de lecture

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.

Prêt pour agents

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.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Community
Point d'entrée
Grafana Pyroscope
Commande d'installation directe
npx -y tokrepo@latest install 138e4edf-38d7-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

TL;DR
Pyroscope records CPU, memory, and lock profiles from production services and exposes them as label-queryable flamegraphs.
§01

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.

§02

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.

§03

How to use

  1. Run the all-in-one binary: docker run -d --name pyroscope -p 4040:4040 grafana/pyroscope:latest
  2. Instrument your service with the Pyroscope SDK (Go, Java, Python, Ruby, .NET, Node.js, Rust)
  3. View flamegraphs at http://localhost:4040 or in Grafana with the Pyroscope data source
§04

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
§05

Related on TokRepo

§06

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

What languages does Pyroscope support?+

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.

How much overhead does continuous profiling add?+

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.

How does Pyroscope integrate with Grafana?+

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.

Can I compare performance between deployments?+

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.

Is Pyroscope the same as Phlare?+

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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires