TiloBox
Back to directory
Pyroscope project preview

Pyroscope

Continuous profiling platform for performance optimization and debugging and alternative to Datadog Continuous Profiler.

LicenseAGPL-3.0
GitHub stars11.6k
Last commit1 weeks ago
Tags6 topics
ObservabilityProfilingPerformanceSelf HostedFlamegraphGolang
Overview

Why consider Pyroscope?

Pyroscope is an open-source continuous profiling platform by Grafana Labs. It pinpoints CPU, memory, and I/O performance bottlenecks down to the exact line of code.

Guided learning

Learn Pyroscope by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

3 min read 11 sections
In this guide11 sections

What is Pyroscope?

Pyroscope is an open-source, continuous profiling platform developed by Grafana Labs. It operates as a high-efficiency, on-premises alternative to proprietary cloud profiling services like Datadog Continuous Profiler and Google Cloud Profiler.

Pyroscope continuously records and aggregates application profiling data—CPU utilization, memory allocations, goroutine/thread states, mutex lock contention, and disk I/O—across production workloads with minimal runtime overhead (typically < 1%). It renders interactive Flame Graphs that let developers pinpoint the exact functions and lines of source code consuming resources.

Who Is It For?

  • Backend & Systems Engineers: Pinpointing memory leaks, excessive garbage collection, and CPU bottlenecks in production services.
  • Platform & Infrastructure Teams: Optimizing compute infrastructure costs by identifying inefficient microservice code paths.
  • Performance Architects: Comparing flame graph profiles between application versions to verify performance optimizations.

Key Features

  • Multi-language continuous profiling: Native SDK agents for Go, Python, Java, Node.js, Ruby, Rust, .NET, and eBPF (kernel level).
  • Interactive Flame Graph visualizer: Zoom, search, filter, and inspect hierarchical stack traces with millisecond precision.
  • Differential flame graphs: Compare two profiling time ranges or software releases side-by-side to highlight regressions.
  • Seamless Grafana integration: Query and embed Pyroscope flame graphs directly in Grafana dashboards.
  • Ultra-low overhead profiling engine with scalable, multi-tenant distributed object storage (S3/GCS/MinIO).

Deploying Pyroscope with Docker Compose

yaml
1version: '3.7'
2
3services:
4 pyroscope:
5 image: grafana/pyroscope:latest
6 container_name: pyroscope
7 restart: unless-stopped
8 ports:
9 - "4040:4040"
10 volumes:
11 - ./data:/var/lib/pyroscope

Start the container:

bash
1docker compose up -d

Open http://localhost:4040 in your browser to view the interactive Pyroscope continuous profiling dashboard.

Instrumenting a Python Application

bash
1pip install pyroscope-io

Initialize Pyroscope in your application entrypoint:

python
1import pyroscope
2
3pyroscope.configure(
4 application_name = "my-backend-service",
5 server_address = "http://localhost:4040"
6)

Practical Use Cases

1. Production Memory Leak Identification

An engineering team detects a slow memory leak in a Python worker; Pyroscope heap allocation flame graphs immediately highlight a caching dictionary that never purges expired keys.

2. Side-by-Side Release Regression Analysis

A team compares flame graphs before and after a major software release, discovering that a new JSON serialization library increased CPU usage by 35%.

3. Kernel-Level eBPF Profiling Without Code Changes

An SRE deploys the Pyroscope eBPF agent on a Kubernetes cluster, profiling all running containers without modifying application source code.

Troubleshooting and Limitations

  • Symbolication for Compiled Binaries: For C++, Rust, or Go binaries, compile with debug symbols enabled (-g) to ensure function names appear correctly in flame graphs.
  • Storage Retention: Pyroscope compresses profile trees efficiently; configure chunk retention policies in pyroscope.yaml to manage long-term storage growth.

Official Resources

Related tools

More options with a similar category or technology profile.

Pyroscope FAQs

Pyroscope is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository and official website for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

Pyroscope is listed under the AGPL-3.0 license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

Pyroscope is listed as an alternative to Google Cloud Profiler. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.