MCPcopy Index your code
hub / github.com/grafana/pyroscope

github.com/grafana/pyroscope @weekly-f134.1-17da979dd sqlite

repository ↗ · DeepWiki ↗ · release weekly-f134.1-17da979dd ↗
16,731 symbols 55,499 edges 1,406 files 2,763 documented · 17% 1 cross-repo links
README

Pyroscope

ci JS Tests Status Go Report License: AGPLv3 FOSSA Status Latest release DockerHub GoDoc

🎉 Announcement: The new Explore Profiles UI is here!

We are thrilled to announce the launch of the Explore Profiles UI, a brand-new way to explore and analyze your profiling data—now available as part of the Grafana Explore Apps suite! This new app brings you a queryless, intuitive experience for visualizing your profiling data, simplifying the entire process without the need to write complex queries.

https://github.com/user-attachments/assets/4db19ec7-86f3-4701-8f5f-9b7ffcebd49c

What is Grafana Pyroscope?

Grafana Pyroscope is a continuous profiling platform designed to surface performance insights from your applications, helping you optimize resource usage such as CPU, memory, and I/O operations. With Pyroscope, you can both proactively and reactively address performance bottlenecks across your system.

The typical use cases are:

  • Proactive: Reducing resource consumption, improving application performance, or preventing latency issues.
  • Reactive: Quickly resolving incidents with line-level detail and debugging active CPU, memory, or I/O bottlenecks.

Pyroscope provides powerful tools to give you a comprehensive view of your application's behavior while allowing you to drill down into specific services for more targeted root cause analysis.

How Does Pyroscope Work?

deployment_diagram

Pyroscope consists of three main components: - Pyroscope Server: The server component that stores and processes profiling data. - Pyroscope SDKs(push) or Grafana alloy(pull) : The client-side part of Pyroscope that collects profiling data from your applications and sends it to the server. - Explore Profiles UI: A queryless, intuitive UI for visualizing and analyzing profiling data.


Pyroscope Live Demo

Pyroscope GIF Demo


Quick Start: Run Pyroscope server locally

Homebrew

brew install pyroscope-io/brew/pyroscope
brew services start pyroscope

Docker

docker run -it -p 4040:4040 grafana/pyroscope

For more documentation on how to configure Pyroscope server, see our server documentation.

Quick Start: Run Explore Profiles UI in Grafana

image

Grafana Cloud

The app UI and server are both installed and running automatically -- just start sending data!

Grafana OSS

You can run the Explore profiles UI in Grafana by installing the plugin from the Grafana Plugin Directory

For more information, check out the Explore Profiles README

Documentation

For more information on how to use Pyroscope with other programming languages, install it on Linux, or use it in production environment, check out our documentation:

Send data to server via Pyroscope agent (language specific)

For more documentation on how to add the Pyroscope agent to your code, see the agent documentation on our website or find language specific examples and documentation below:

Golang Documentation Examples Java Documentation Examples Python Documentation Examples Ruby Documentation Examples
Node.js Documentation Examples .NET Documentation Examples eBPF Documentation Examples Rust Documentation Examples

Supported Languages

Our documentation contains the most recent list of supported languages and also an overview over what profiling types are supported per language.

Let us know what other integrations you want to see in our issues or in our slack.

Credits

Pyroscope is possible thanks to the excellent work of many people, including but not limited to:

  • Brendan Gregg — inventor of Flame Graphs
  • Julia Evans — creator of rbspy — sampling profiler for Ruby
  • Vladimir Agafonkin — creator of flamebearer — fast flame graph renderer
  • Ben Frederickson — creator of py-spy — sampling profiler for Python
  • Adam Saponara — creator of phpspy — sampling profiler for PHP
  • Alexei Starovoitov, Brendan Gregg, and many others who made BPF based profiling in Linux kernel possible
  • Jamie Wong — creator of speedscope — interactive flame graph visualizer

Contributing

To start contributing, check out our Contributing Guide

Thanks to the contributors of Pyroscope!

<a href="https://g

Extension points exported contracts — how you extend this code

SchedulerForQuerierClient (Interface)
SchedulerForQuerierClient is a client for the schedulerpb.SchedulerForQuerier service. [6 implementers]
pkg/scheduler/schedulerpb/schedulerpbconnect/scheduler.connect.go
FrontendForQuerierClient (Interface)
FrontendForQuerierClient is a client for the frontendpb.FrontendForQuerier service. [6 implementers]
pkg/frontend/frontendpb/frontendpbconnect/frontend.connect.go
TimeRangeRequest (Interface)
TimeRangeRequest is a request that has a time interval. [14 implementers]
pkg/model/time.go
StringIter (Interface)
StringIter iterates over a sorted list of strings. [32 implementers]
pkg/phlaredb/tsdb/index/index.go
RaftNodeServiceClient (Interface)
RaftNodeServiceClient is a client for the raft_node.RaftNodeService service. [12 implementers]
pkg/metastore/raftnode/raftnodepb/raftnodepbconnect/raft_node.connect.go
RequestHandler (Interface)
RequestHandler for HTTP requests wrapped in protobuf messages. [6 implementers]
pkg/querier/worker/worker.go
StringIter (Interface)
StringIter iterates over a sorted list of strings. [32 implementers]
pkg/segmentwriter/memdb/index/index.go
Cloneable (Interface)
Cloneable is a config which can be cloned into a flagext.Registerer Contract: the cloned value must not mutate the origi [19 …
pkg/cfg/cfg.go

Core symbols most depended-on inside this repo

Equal
called by 1480
pkg/util/servicediscovery/dns.go
Get
called by 734
pkg/settings/store.go
Run
called by 624
pkg/pyroscope/pyroscope.go
Add
called by 566
pkg/phlaredb/tsdb/index.go
Log
called by 484
pkg/test/logger.go
Return
called by 366
pkg/test/mocks/mockobjstore/mock_bucket.go
Error
called by 314
pkg/validation/validate.go
Skip
called by 271
pkg/phlaredb/query/iters.go

Shape

Method 10,136
Function 4,045
Struct 1,817
Interface 413
TypeAlias 135
Class 124
FuncType 46
Route 13
Enum 2

Languages

Go92%
TypeScript8%
Python1%
Java1%

Modules by API surface

pkg/api/static/bootstrap-5.3.3.bundle.min.js390 symbols
cmd/profilecli/static/bootstrap-5.3.3.bundle.min.js390 symbols
api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go384 symbols
api/gen/proto/go/ingester/v1/ingester.pb.go258 symbols
api/gen/proto/go/querier/v1/querier_vtproto.pb.go245 symbols
api/gen/proto/go/query/v1/query_vtproto.pb.go228 symbols
api/gen/proto/go/query/v1/query.pb.go212 symbols
api/gen/proto/go/querier/v1/querier.pb.go203 symbols
api/gen/proto/go/vcs/v1/vcs_vtproto.pb.go166 symbols
api/gen/proto/go/types/v1/types.pb.go154 symbols
api/gen/proto/go/types/v1/types_vtproto.pb.go153 symbols
api/gen/proto/go/metastore/v1/raft_log/raft_log_vtproto.pb.go153 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

cel.dev/exprv0.23.0 · 1×
cloud.google.com/gov0.120.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.7.0 · 1×
cloud.google.com/go/monitoringv1.24.2 · 1×
cloud.google.com/go/storagev1.50.0 · 1×
connectrpc.com/connectv1.18.1 · 1×
connectrpc.com/grpchealthv1.3.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azcorev1.18.1 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azidentityv1.10.1 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add pyroscope \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact