This is documentation for the next version of Grafana Pyroscope documentation. For the latest stable release, go to the latest version.
Set up profiling with eBPF with Grafana Alloy
eBPF is an advanced technology embedded into the Linux kernel. It stands for enhanced Berkeley Packet Filter and revolutionizes the capability to run sandboxed code safely within the kernel space. This technology serves multiple use cases, such as networking, security, and performance monitoring without the need to alter kernel code or load additional modules.

Benefits and tradeoffs of using eBPF for continuous profiling
When it comes to application profiling, eBPF offers high efficiency and minimal performance overhead. eBPF enables the dynamic insertion of powerful monitoring code into live production systems. By leveraging eBPF, developers can gain insights into application behavior, track resource usage, and detect bottlenecks in a way that traditional profiling tools cannot match. eBPF’s low overhead and fine-grained data collection make it an ideal choice for continuous, real-time profiling in performance-sensitive environments.
However, eBPF has some limitations that make it unsuitable for certain use cases:
- It isn’t a good fit for profiling applications that arn’t written in a supported language.
- It can’t be used to profile applications that aren’t running on Linux.
- It doesn’t support all profile types such as memory and contention/lock profiling.
- eBPF requires root access to the host machine, which can be a problem in some environments.
Supported languages
The eBPF profiler collects CPU profiles.
Natively compiled languages like C/C++, Go, Rust, and Zig are supported. Frame pointers are not required — the profiler uses .eh_frame data for unwinding.
Refer to Troubleshooting unknown symbols for additional requirements and information.
The following high-level languages are also supported: Java (Hotspot JVM), .NET, Python, Ruby, PHP, Node.js, and Perl. Each high-level language can be individually enabled or disabled in the pyroscope.ebpf Alloy component configuration.
eBPF using Alloy
Grafana Alloy is a lightweight, all-in-one collector that can collect, transform, and ship observability data. For profiling, you can configure Alloy to collect eBPF profiles and send them to Pyroscope.
This section contains instructions for installing and configuring Alloy to collect eBPF profiles. For more information about Alloy itself, refer to the Alloy documentation.


