<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Set up profiling with eBPF with Grafana Alloy on Grafana Labs</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/</link><description>Recent content in Set up profiling with eBPF with Grafana Alloy on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/index.xml" rel="self" type="application/rss+xml"/><item><title>Setup eBPF Profiling on Kubernetes</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-kubernetes/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-kubernetes/</guid><content><![CDATA[&lt;h1 id=&#34;setup-ebpf-profiling-on-kubernetes&#34;&gt;Setup eBPF Profiling on Kubernetes&lt;/h1&gt;
&lt;p&gt;To set up eBPF profiling with Grafana Alloy on Kubernetes, you need to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that your cluster meets the prerequisites.&lt;/li&gt;
&lt;li&gt;Add the Grafana helm repository.&lt;/li&gt;
&lt;li&gt;Create an Alloy configuration file. For more information, refer to &lt;a href=&#34;../configuration/&#34;&gt;Configuration reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install Alloy, refer to the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/set-up/install/kubernetes/&#34;&gt;installation instructions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Verify that profiles are received.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://helm.sh/docs/intro/install/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm&lt;/a&gt; and &lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/install-kubectl/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kubectl&lt;/a&gt; installed with access to your Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;A Pyroscope server where Alloy can send profiling data.&lt;/li&gt;
&lt;li&gt;Access to Grafana with the 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt; provisioned.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you don&amp;rsquo;t have a Grafana or a Pyroscope server, you can use the [Grafana Cloud][gcloud] free plan to get started.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;verify-that-your-cluster-meets-the-requirements&#34;&gt;Verify that your cluster meets the requirements&lt;/h2&gt;
&lt;p&gt;The eBPF profiler requires a Linux kernel version &amp;gt;= 4.9 (due to &lt;a href=&#34;https://lkml.org/lkml/2016/9/1/831&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/code&gt; is a type of eBPF program that can be attached to hardware or software events, such as performance monitoring counters or tracepoints, in the Linux kernel.&lt;/p&gt;
&lt;p&gt;To print the kernel version of each node in your cluster, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;kubectl get nodes -o jsonpath=&amp;#39;{range .items[*]}{.metadata.name}{&amp;#34;\t&amp;#34;}{.status.nodeInfo.kernelVersion}{&amp;#34;\n&amp;#34;}{end}&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Make sure all nodes have a kernel version &amp;gt;= 4.9.&lt;/p&gt;
&lt;h2 id=&#34;add-the-grafana-helm-repository&#34;&gt;Add the Grafana Helm repository&lt;/h2&gt;
&lt;p&gt;Use &lt;a href=&#34;https://helm.sh/docs/intro/install/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm&lt;/a&gt; to install Alloy.
To add the Grafana Helm repository, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm repo add grafana https://grafana.github.io/helm-charts
helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Verify that the repository was added successfully by running:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm search repo grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The command returns a list of available versions of Alloy.&lt;/p&gt;
&lt;h2 id=&#34;create-an-alloy-configuration-file&#34;&gt;Create an Alloy configuration file&lt;/h2&gt;
&lt;p&gt;Create a file named &lt;code&gt;values.yaml&lt;/code&gt; with the content from the sample configuration file.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;alloy:
  configMap:
    create: true
    content: |
      discovery.kubernetes &amp;#34;local_pods&amp;#34; {
        selectors {
          field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; env(&amp;#34;HOSTNAME&amp;#34;)
          role = &amp;#34;pod&amp;#34;
        }
        role = &amp;#34;pod&amp;#34;
      }
      pyroscope.ebpf &amp;#34;instance&amp;#34; {
        forward_to = [pyroscope.write.endpoint.receiver]
        targets = discovery.kubernetes.local_pods.targets
      }
      pyroscope.write &amp;#34;endpoint&amp;#34; {
        endpoint {
          basic_auth {
            password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
            username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
          }
          url = &amp;#34;&amp;lt;URL&amp;gt;&amp;#34;
        }
      }

  securityContext:
    privileged: true
    runAsGroup: 0
    runAsUser: 0

controller:
  hostPID: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For information about configuring Alloy, refer to 
    &lt;a href=&#34;/docs/alloy/v1.18.x/configure/kubernetes/&#34;&gt;Grafana Alloy on Kubernetes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For information about the specific blocks used, refer to the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/&#34;&gt;Grafana Alloy Reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Replace the &lt;code&gt;&amp;lt;URL&amp;gt;&lt;/code&gt; placeholder with the appropriate server URL.
This could be the Grafana Cloud URL or your own custom Pyroscope server URL.&lt;/p&gt;
&lt;p&gt;If you need to send data to Grafana Cloud, you&amp;rsquo;ll have to configure HTTP Basic authentication.
Replace &lt;code&gt;&amp;lt;User&amp;gt;&lt;/code&gt; with your Grafana Cloud stack user and &lt;code&gt;&amp;lt;Password&amp;gt;&lt;/code&gt; with your Grafana Cloud API key.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/configure-pyroscope-data-source/&#34;&gt;Configure the Grafana Pyroscope data source documentation&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you&amp;rsquo;re using your own Pyroscope server, you can remove the &lt;code&gt;basic_auth&lt;/code&gt; section altogether.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;install-alloy&#34;&gt;Install Alloy&lt;/h2&gt;
&lt;p&gt;To install Alloy, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm install pyroscope-ebpf grafana/alloy -f values.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Once configured, Alloy starts collecting eBPF profiles and sends them to the Pyroscope server.&lt;/p&gt;
&lt;h2 id=&#34;verify-profiles-are-received&#34;&gt;Verify profiles are received&lt;/h2&gt;
&lt;p&gt;To verify that the profiles are received by the Pyroscope server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the Pyroscope UI or 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Select a profile type and a service from the drop-down menu.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;considerations-for-profiling-applications-in-containers&#34;&gt;Considerations for profiling applications in containers&lt;/h2&gt;
&lt;p&gt;When profiling Python applications running in containers using the &lt;code&gt;pyroscope.ebpf&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/pyroscope/pyroscope.ebpf/&#34;&gt;component in Alloy&lt;/a&gt;, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Kernel version&lt;/strong&gt;: Ensure that the host system&amp;rsquo;s kernel version is &amp;gt;= 4.9, as required by eBPF. This is crucial for the profiler to function correctly&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Container privileges&lt;/strong&gt;: The eBPF profiler requires certain privileges to access kernel features. Ensure that the container running the profiler has the necessary permissions. This typically involves setting the container to run in privileged mode or adjusting security contexts&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Host PID namespace&lt;/strong&gt;: The profiler may need access to the host&amp;rsquo;s PID namespace to correctly attach to processes. Ensure that the &lt;code&gt;hostPID&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt; in your Kubernetes configuration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Network access&lt;/strong&gt;: Ensure that the container has network access to send profiling data to the Pyroscope server. This may involve configuring network policies or service accounts&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="setup-ebpf-profiling-on-kubernetes">Setup eBPF Profiling on Kubernetes&lt;/h1>
&lt;p>To set up eBPF profiling with Grafana Alloy on Kubernetes, you need to:&lt;/p>
&lt;ul>
&lt;li>Verify that your cluster meets the prerequisites.&lt;/li>
&lt;li>Add the Grafana helm repository.&lt;/li>
&lt;li>Create an Alloy configuration file. For more information, refer to &lt;a href="../configuration/">Configuration reference&lt;/a>.&lt;/li>
&lt;li>Install Alloy, refer to the
&lt;a href="/docs/alloy/v1.18.x/set-up/install/kubernetes/">installation instructions&lt;/a>&lt;/li>
&lt;li>Verify that profiles are received.&lt;/li>
&lt;/ul>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>Before you begin, you need:&lt;/p></description></item><item><title>Set up eBPF profiling on Linux</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-linux/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-linux/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-ebpf-profiling-on-linux&#34;&gt;Set up eBPF profiling on Linux&lt;/h1&gt;
&lt;p&gt;To set up eBPF profiling with Grafana Alloy on Linux, you need to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that your system meets the requirements.&lt;/li&gt;
&lt;li&gt;Install 
    &lt;a href=&#34;/docs/alloy/v1.18.x/set-up/install/linux/&#34;&gt;Alloy&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create an 
    &lt;a href=&#34;/docs/alloy/v1.18.x/configure/linux/&#34;&gt;Alloy configuration file&lt;/a&gt;. For more information, refer to 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/&#34;&gt;Configuration reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run Alloy.&lt;/li&gt;
&lt;li&gt;Finally, verify that profiles are received.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Pyroscope server where Alloy can send profiling data.&lt;/li&gt;
&lt;li&gt;Access to Grafana with the 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt; provisioned.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you don&amp;rsquo;t have a Grafana or a Pyroscope server, you can use the &lt;a href=&#34;/auth/sign-up/create-user?pg=pricing&amp;amp;plcmt=free&amp;amp;cta=create-free-account&#34;&gt;Grafana Cloud&lt;/a&gt; free plan to get started.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;verify-system-meets-the-requirements&#34;&gt;Verify system meets the requirements&lt;/h2&gt;
&lt;p&gt;The eBPF profiler requires a Linux kernel version &amp;gt;= 4.9 (due to &lt;a href=&#34;https://lkml.org/lkml/2016/9/1/831&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/code&gt; is a type of eBPF program that can be attached to hardware or software events, such as performance monitoring counters or tracepoints, in the Linux kernel.&lt;/p&gt;
&lt;p&gt;To print the kernel version of machine, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;uname -r&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Make sure you have a kernel version &amp;gt;= 4.9.&lt;/p&gt;
&lt;h2 id=&#34;install-alloy&#34;&gt;Install Alloy&lt;/h2&gt;
&lt;p&gt;Follow the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/set-up/install/linux/&#34;&gt;installation instructions&lt;/a&gt; to download and install Alloy for your current Linux distribution.&lt;/p&gt;
&lt;h2 id=&#34;configure-alloy&#34;&gt;Configure Alloy&lt;/h2&gt;
&lt;p&gt;To configure the Alloy eBPF profiler to profile local processes, use 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.process/&#34;&gt;discovery.process component&lt;/a&gt; and add a default target in the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/pyroscope/pyroscope.ebpf/&#34;&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; component&lt;/a&gt;.
All processes are profiled and grouped under the default target.&lt;/p&gt;
&lt;p&gt;Create a file named &lt;code&gt;alloy.config&lt;/code&gt; with the following content:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.process &amp;#34;all&amp;#34; {

}

discovery.relabel &amp;#34;alloy&amp;#34; {
    targets = discovery.process.all.targets
    // Filter needed processes
    rule {
        source_labels = [&amp;#34;__meta_process_exe&amp;#34;]
        regex = &amp;#34;.*/alloy&amp;#34;
        action = &amp;#34;keep&amp;#34;
    }
}

pyroscope.ebpf &amp;#34;instance&amp;#34; {
 forward_to     = [pyroscope.write.endpoint.receiver]
 targets = discovery.relabel.alloy.output
}

pyroscope.scrape &amp;#34;local&amp;#34; {
  forward_to     = [pyroscope.write.endpoint.receiver]
  targets    = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;grafana/alloy&amp;#34;},
  ]
}

pyroscope.write &amp;#34;endpoint&amp;#34; {
 endpoint {
  basic_auth {
   password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
   username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
  }
  url = &amp;#34;&amp;lt;URL&amp;gt;&amp;#34;
 }
 external_labels = {
  &amp;#34;env&amp;#34;      = &amp;#34;prod&amp;#34;,
  &amp;#34;instance&amp;#34; = env(&amp;#34;HOSTNAME&amp;#34;),
 }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For information about configuring Alloy, refer to 
    &lt;a href=&#34;/docs/alloy/v1.18.x/configure/kubernetes/&#34;&gt;Grafana Alloy on Kubernetes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For information about the specific blocks used, refer to the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/&#34;&gt;Grafana Alloy Reference&lt;/a&gt; and 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.process/&#34;&gt;&lt;code&gt;discovery.process&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Replace the &lt;code&gt;&amp;lt;URL&amp;gt;&lt;/code&gt; placeholder with the appropriate server URL. This could be the Grafana Cloud URL or your own custom Pyroscope server URL.&lt;/p&gt;
&lt;p&gt;If you need to send data to Grafana Cloud, you&amp;rsquo;ll have to configure HTTP Basic authentication. Replace &lt;code&gt;&amp;lt;User&amp;gt;&lt;/code&gt; with your Grafana Cloud stack user and &lt;code&gt;&amp;lt;Password&amp;gt;&lt;/code&gt; with your Grafana Cloud API key.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/configure-pyroscope-data-source/&#34;&gt;Configure the Grafana Pyroscope data source documentation&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you&amp;rsquo;re using your own Pyroscope server, you can remove the &lt;code&gt;basic_auth&lt;/code&gt; section altogether.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;start-alloy&#34;&gt;Start Alloy&lt;/h2&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The eBPF profiler requires root privileges.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To start the Alloy, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;alloy run alloy.config&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you see the following error:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;level=error msg=&amp;#34;component exited with error&amp;#34; component=pyroscope.ebpf.local_pods err=&amp;#34;ebpf profiling session start: load bpf objects: field DisassociateCtty: program disassociate_ctty: map events: map create: operation not permitted (MEMLOCK may be too low, consider rlimit.RemoveMemlock)&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Make sure you&amp;rsquo;re running Alloy with root privileges which are required for the eBPF profiler to work.&lt;/p&gt;
&lt;h2 id=&#34;verify-profiles-are-received&#34;&gt;Verify profiles are received&lt;/h2&gt;
&lt;p&gt;To verify that the profiles are received by the Pyroscope server, go to the Pyroscope UI or 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt;. Select a profile type and a service from the drop-down menu.&lt;/p&gt;
]]></content><description>&lt;h1 id="set-up-ebpf-profiling-on-linux">Set up eBPF profiling on Linux&lt;/h1>
&lt;p>To set up eBPF profiling with Grafana Alloy on Linux, you need to:&lt;/p>
&lt;ul>
&lt;li>Verify that your system meets the requirements.&lt;/li>
&lt;li>Install
&lt;a href="/docs/alloy/v1.18.x/set-up/install/linux/">Alloy&lt;/a>.&lt;/li>
&lt;li>Create an
&lt;a href="/docs/alloy/v1.18.x/configure/linux/">Alloy configuration file&lt;/a>. For more information, refer to
&lt;a href="/docs/alloy/v1.18.x/reference/">Configuration reference&lt;/a>.&lt;/li>
&lt;li>Run Alloy.&lt;/li>
&lt;li>Finally, verify that profiles are received.&lt;/li>
&lt;/ul>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>Before you begin, you need:&lt;/p></description></item><item><title>Setup eBPF Profiling on Docker</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-docker/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/setup-docker/</guid><content><![CDATA[&lt;h1 id=&#34;setup-ebpf-profiling-on-docker&#34;&gt;Setup eBPF Profiling on Docker&lt;/h1&gt;
&lt;p&gt;To set up eBPF profiling with Grafana Alloy on Linux, you need to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that your system meets the requirements.&lt;/li&gt;
&lt;li&gt;Create an Alloy configuration file. For more information, refer to the &lt;a href=&#34;../configuration/&#34;&gt;Configuration reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run Alloy.&lt;/li&gt;
&lt;li&gt;Verify that profiles are received.&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;agent-deprecation.md&#34;&gt;
            

&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Grafana Alloy is the new name for our distribution of the OTel collector.
Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025.
Read more about why we recommend migrating to &lt;a href=&#34;/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/&#34;&gt;Grafana Alloy&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before you begin, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Pyroscope server where Alloy can send profiling data.&lt;/li&gt;
&lt;li&gt;Access to Grafana with the 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt; provisioned.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.docker.com/engine/install/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Docker Engine&lt;/a&gt; installed.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you don&amp;rsquo;t have a Grafana or a Pyroscope server, you can use the [Grafana Cloud][gcloud] free plan to get started.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;verify-system-requirements&#34;&gt;Verify system requirements&lt;/h2&gt;
&lt;p&gt;The eBPF profiler requires a Linux kernel version &amp;gt;= 4.9 due to &lt;a href=&#34;https://lkml.org/lkml/2016/9/1/831&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;BPF_PROG_TYPE_PERF_EVENT&lt;/code&gt; is a type of eBPF program that can be attached to hardware or software events, such as performance monitoring counters or tracepoints, in the Linux kernel.&lt;/p&gt;
&lt;p&gt;To print the kernel version of your docker host, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;docker info | grep Kernel&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The kernel version must be 4.9 or later.&lt;/p&gt;
&lt;h2 id=&#34;configure-alloy&#34;&gt;Configure Alloy&lt;/h2&gt;
&lt;p&gt;You can configure Alloy eBPF profiler to profile local containers.
To do so, use the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.docker/&#34;&gt;&lt;code&gt;discovery.docker&lt;/code&gt; component&lt;/a&gt; to discover local containers and the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/pyroscope/pyroscope.ebpf/&#34;&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; component&lt;/a&gt; to profile them&lt;/p&gt;
&lt;p&gt;For more information about the Alloy configuration, refer to the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/&#34;&gt;Alloy Components reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Create a file named &lt;code&gt;alloy.config&lt;/code&gt; with the following content:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;discovery.docker &amp;#34;local_containers&amp;#34; {
 host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
}

pyroscope.ebpf &amp;#34;instance&amp;#34; {
 forward_to     = [pyroscope.write.endpoint.receiver]
 targets = discovery.docker.local_containers.targets
}

pyroscope.write &amp;#34;endpoint&amp;#34; {
 endpoint {
  basic_auth {
   password = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
   username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
  }
  url = &amp;#34;&amp;lt;URL&amp;gt;&amp;#34;
 }
 external_labels = {
  &amp;#34;env&amp;#34;      = &amp;#34;testing&amp;#34;,
  &amp;#34;instance&amp;#34; = env(&amp;#34;HOSTNAME&amp;#34;),
 }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the &lt;code&gt;&amp;lt;URL&amp;gt;&lt;/code&gt; placeholder with the appropriate server URL.
This could be the Grafana Cloud URL or your own custom Pyroscope server URL.&lt;/p&gt;
&lt;p&gt;If you need to send data to Grafana Cloud, you&amp;rsquo;ll have to configure HTTP Basic authentication.
Replace &lt;code&gt;&amp;lt;User&amp;gt;&lt;/code&gt; with your Grafana Cloud stack user and &lt;code&gt;&amp;lt;Password&amp;gt;&lt;/code&gt; with your Grafana Cloud API key.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/configure-pyroscope-data-source/&#34;&gt;Configure the Grafana Pyroscope data source documentation&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you&amp;rsquo;re using your own Pyroscope server, you can remove the &lt;code&gt;basic_auth&lt;/code&gt; section altogether.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;start-alloy&#34;&gt;Start Alloy&lt;/h2&gt;
&lt;p&gt;To start Alloy with Docker, run:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;docker run \
  -v $PWD/alloy.config:/etc/alloy/alloy.config \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --pid=host \
  --privileged \
  -p 12345:12345 \
  grafana/alloy:latest \
    run --server.http.listen-addr=0.0.0.0:12345 /etc/alloy/alloy.config&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The &lt;code&gt;--pid=host&lt;/code&gt; and &lt;code&gt;--privileged&lt;/code&gt; flags are required to profile local containers with eBPF.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;verify-profiles-are-received&#34;&gt;Verify profiles are received&lt;/h2&gt;
&lt;p&gt;To verify that the profiles are received by the Pyroscope server, go to the Pyroscope UI or 
    &lt;a href=&#34;/docs/grafana/latest/datasources/pyroscope/&#34;&gt;Grafana Pyroscope data source&lt;/a&gt;. Then select a profile type and a service from the dropdown menu.&lt;/p&gt;
]]></content><description>&lt;h1 id="setup-ebpf-profiling-on-docker">Setup eBPF Profiling on Docker&lt;/h1>
&lt;p>To set up eBPF profiling with Grafana Alloy on Linux, you need to:&lt;/p>
&lt;ul>
&lt;li>Verify that your system meets the requirements.&lt;/li>
&lt;li>Create an Alloy configuration file. For more information, refer to the &lt;a href="../configuration/">Configuration reference&lt;/a>.&lt;/li>
&lt;li>Run Alloy.&lt;/li>
&lt;li>Verify that profiles are received.&lt;/li>
&lt;/ul>
&lt;div data-shared="agent-deprecation.md">
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p></description></item><item><title>Configuration reference</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/configuration/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/configuration/</guid><content><![CDATA[&lt;h2 id=&#34;configuration-reference&#34;&gt;Configuration reference&lt;/h2&gt;
&lt;p&gt;Grafana Alloy supports eBPF profiling.
The configuration file is written in the &lt;a href=&#34;/docs/agent/latest/flow/concepts/config-language/&#34;&gt;River&lt;/a&gt; language and is composed of components that are used to collect, transform, and send data.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component is used to collect application performance profiles via eBPF.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;ebpf.png&#34;
  alt=&#34;Pyroscope ebpf diagram&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; runs on the host machine and collects stack traces associated with a process running on the current host.&lt;/p&gt;
&lt;p&gt;Using the &lt;code&gt;targets&lt;/code&gt; argument, you can specify which processes and containers to profile on the machine. The &lt;code&gt;targets&lt;/code&gt; can be from discovery components such as &lt;code&gt;discovery.process&lt;/code&gt;, 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.kubernetes/&#34;&gt;&lt;code&gt;discovery.kubernetes&lt;/code&gt;&lt;/a&gt;, 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.docker/&#34;&gt;&lt;code&gt;discovery.docker&lt;/code&gt;&lt;/a&gt;, and 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.dockerswarm/&#34;&gt;&lt;code&gt;discovery.dockerswarm&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can use the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.relabel/&#34;&gt;&lt;code&gt;discovery.relabel&lt;/code&gt;&lt;/a&gt; component to relabel discovered targets and set your own labels.
For more information, refer to the 
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/&#34;&gt;Components&lt;/a&gt; documentation.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;forward_to&lt;/code&gt; parameter should point to a &lt;code&gt;pyroscope.write&lt;/code&gt; component to send the collected profiles to your Pyroscope Server or &lt;a href=&#34;/products/cloud/&#34;&gt;Grafana Cloud&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Required&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets to group profiles by container id&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;forward_to&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(ProfilesReceiver)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of receivers to send collected profiles to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How frequently to collect profiles&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;15s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sample_rate&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How many times per second to collect profile samples&lt;/td&gt;
              &lt;td&gt;97&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pid_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the pid -&amp;gt; proc symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;32&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;build_id_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the elf file build id -&amp;gt; symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;64&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;same_file_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the elf file -&amp;gt; symbols table LRU cache&lt;/td&gt;
              &lt;td&gt;8&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;container_id_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the pid -&amp;gt; container ID table LRU cache&lt;/td&gt;
              &lt;td&gt;1024&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_user_profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable/disable collection of userspace profiles&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;collect_kernel_profile&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A flag to enable/disable collection of kernelspace profiles&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;demangle&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;C&#43;&#43; demangle mode. Available options are: &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;simplified&lt;/code&gt;, &lt;code&gt;templates&lt;/code&gt;, &lt;code&gt;full&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;none&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;supported-languages&#34;&gt;Supported languages&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component supports the following languages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Go with frame pointers enabled (default)&lt;/li&gt;
&lt;li&gt;Rust with frame pointers enabled&lt;/li&gt;
&lt;li&gt;C/C&#43;&#43; with frame pointers enabled&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;send-data-grafana-cloud-profiles&#34;&gt;Send data Grafana Cloud Profiles&lt;/h2&gt;
&lt;p&gt;When sending to Grafana Cloud Profiles, you can use the following &lt;code&gt;pyroscope.write&lt;/code&gt; component configuration which makes uses of environment variables:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;pyroscope.write &amp;#34;endpoint&amp;#34; {
    endpoint {
        basic_auth {
            password = env(&amp;#34;GC_PASSWORD&amp;#34;)
            username = env(&amp;#34;GC_USER&amp;#34;)
        }
        url = env(&amp;#34;GC_URL&amp;#34;)
    }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Ensure that you have appropriately configured the &lt;code&gt;GC_URL&lt;/code&gt;, &lt;code&gt;GC_USER&lt;/code&gt;, and &lt;code&gt;GC_PASSWORD&lt;/code&gt; environment variables.&lt;/p&gt;
&lt;h2 id=&#34;profile-collecting-behavior&#34;&gt;Profile collecting behavior&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component collects stack traces associated with a process running on the current host.
You can use the &lt;code&gt;sample_rate&lt;/code&gt; argument to define the number of stack traces collected per second. The default is 97.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected into the collected profiles if you have not defined them. These labels
can help you pin down a profiling target.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Label&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Pyroscope service name. It&amp;rsquo;s automatically selected from discovery meta labels, if possible. Otherwise, it defaults to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__name__&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;pyroscope metric name. Defaults to &lt;code&gt;process_cpu&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;__container_id__&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The container ID derived from target.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;privileges&#34;&gt;Privileges&lt;/h3&gt;
&lt;p&gt;You are required to run the agent as root and inside host pid namespace in order to &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component to work.&lt;/p&gt;
&lt;h3 id=&#34;targets&#34;&gt;Targets&lt;/h3&gt;
&lt;p&gt;One of the following special labels &lt;em&gt;must&lt;/em&gt; be included in each target of &lt;code&gt;targets&lt;/code&gt; and the label must correspond to the container or process that is profiled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__container_id__&lt;/code&gt;: The container ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_id&lt;/code&gt;: The ID of the Docker container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_id&lt;/code&gt;: The ID of the Kubernetes pod container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__process_pid__&lt;/code&gt; : The process ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each process is then associated with a specified target from the targets list, determined by a container ID or process PID.&lt;/p&gt;
&lt;p&gt;If a process&amp;rsquo;s container ID matches a target&amp;rsquo;s container ID label, the stack traces are aggregated per target based on the container ID.
If a process&amp;rsquo;s PID matches a target&amp;rsquo;s process PID label, the stack traces are aggregated per target based on the process PID.
Otherwise, the process is not profiled.&lt;/p&gt;
&lt;h3 id=&#34;service-name&#34;&gt;Service name&lt;/h3&gt;
&lt;p&gt;The special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present. If it&amp;rsquo;s not specified, it is
attempted to be inferred from multiple sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_annotation_pyroscope_io_service_name&lt;/code&gt; which is a &lt;code&gt;pyroscope.io/service_name&lt;/code&gt; pod annotation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_namespace&lt;/code&gt; and &lt;code&gt;__meta_kubernetes_pod_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_container_label_service_name&lt;/code&gt; and &lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;service_name&lt;/code&gt; is not specified and could not be inferred, it is set to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;exposed-prometheus-metrics&#34;&gt;Exposed Prometheus metrics&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component exposes the following Prometheus metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_active_targets&lt;/code&gt; (gauge): Number of active targets the component tracks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_total&lt;/code&gt; (counter): Number of profiling sessions completed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_failing_total&lt;/code&gt; (counter): Number of profiling sessions failed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_pprofs_total&lt;/code&gt; (counter): Number of pprof profiles collected by the ebpf component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;more-information&#34;&gt;More information&lt;/h2&gt;
&lt;p&gt;Check out the following resources to learn more about eBPF profiling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pyroscope.io/blog/ebpf-profiling-pros-cons&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;The pros and cons of eBPF profiling&lt;/a&gt; blog post (for more context on flame graphs below)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://play-pyroscope.grafana.org&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Demo&lt;/a&gt; showing breakdown of our examples cluster&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/&#34;&gt;Grafana Alloy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/pyroscope/pyroscope.scrape/&#34;&gt;pyroscope.scrape&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/pyroscope/pyroscope.write/&#34;&gt;pyroscope.write&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.kubernetes/&#34;&gt;discovery.kubernetes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.docker/&#34;&gt;discovery.docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/alloy/v1.18.x/reference/components/discovery/discovery.relabel/&#34;&gt;discovery.relabel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h2 id="configuration-reference">Configuration reference&lt;/h2>
&lt;p>Grafana Alloy supports eBPF profiling.
The configuration file is written in the &lt;a href="/docs/agent/latest/flow/concepts/config-language/">River&lt;/a> language and is composed of components that are used to collect, transform, and send data.&lt;/p></description></item><item><title>Troubleshoot eBPF installation</title><link>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/troubleshooting/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/configure-client/grafana-alloy/ebpf/troubleshooting/</guid><content><![CDATA[&lt;h1 id=&#34;troubleshoot-ebpf-installation&#34;&gt;Troubleshoot eBPF installation&lt;/h1&gt;
&lt;p&gt;Learn how to troubleshoot and resolve eBPF installation issues.&lt;/p&gt;
&lt;h2 id=&#34;profile-interpreted-languages&#34;&gt;Profile interpreted languages&lt;/h2&gt;
&lt;p&gt;Profiling interpreted languages like Ruby, JavaScript, etc., isn&amp;rsquo;t ideal using this implementation.
The JIT-compiled methods in these languages are typically not in ELF file format, demanding additional steps for
profiling. For instance, using perf-map-agent and enabling frame pointers for Java.&lt;/p&gt;
&lt;p&gt;Interpreted methods display the interpreter function’s name rather than the actual function.&lt;/p&gt;
&lt;h2 id=&#34;troubleshoot-unknown-symbols&#34;&gt;Troubleshoot unknown symbols&lt;/h2&gt;
&lt;p&gt;Symbols are extracted from various sources, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;.symtab&lt;/code&gt; and &lt;code&gt;.dynsym&lt;/code&gt; sections in the ELF file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;.symtab&lt;/code&gt; and &lt;code&gt;.dynsym&lt;/code&gt; sections in the debug ELF file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;.gopclntab&lt;/code&gt; section in Go language ELF files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The search for debug files follows &lt;a href=&#34;https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gdb algorithm&lt;/a&gt;.
For example, if the profiler wants to find the debug file
for &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt;
with a &lt;code&gt;.gnu_debuglink&lt;/code&gt; set to &lt;code&gt;libc.so.6.debug&lt;/code&gt; and a build ID &lt;code&gt;0123456789abcdef&lt;/code&gt;. The following paths are examined:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/.build-id/01/0123456789abcdef.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/.debug/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deal-with-unknown-symbols&#34;&gt;Deal with unknown symbols&lt;/h3&gt;
&lt;p&gt;Unknown symbols in the profiles you’ve collected indicate that the profiler couldn&amp;rsquo;t access an ELF file associated with a given address in the trace.&lt;/p&gt;
&lt;p&gt;This can occur for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process has terminated, making the ELF file inaccessible.&lt;/li&gt;
&lt;li&gt;The ELF file is either corrupted or not recognized as an ELF file.&lt;/li&gt;
&lt;li&gt;There is no corresponding ELF file entry in &lt;code&gt;/proc/pid/maps&lt;/code&gt; for the address in the stack trace.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;address-unresolved-symbols&#34;&gt;Address unresolved symbols&lt;/h3&gt;
&lt;p&gt;If you only see module names (e.g., &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt;) without corresponding function names, this
indicates that the symbols couldn&amp;rsquo;t be mapped to their respective function names.&lt;/p&gt;
&lt;p&gt;This can occur for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The binary has been stripped, leaving no &lt;code&gt;.symtab&lt;/code&gt;, &lt;code&gt;.dynsym&lt;/code&gt;, or &lt;code&gt;.gopclntab&lt;/code&gt; sections in the ELF file.&lt;/li&gt;
&lt;li&gt;The debug file is missing or could not be located.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To fix this for your binaries, ensure that they are either not stripped or that you have separate
debug files available. You can achieve this by running:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;objcopy --only-keep-debug elf elf.debug
strip elf -o elf.stripped
objcopy --add-gnu-debuglink=elf.debug elf.stripped elf.debuglink&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For system libraries, ensure that debug symbols are installed. On Ubuntu, for example, you can install debug symbols
for &lt;code&gt;libc&lt;/code&gt; by executing:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;apt install libc6-dbg&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;understand-flat-stack-traces&#34;&gt;Understand flat stack traces&lt;/h3&gt;
&lt;p&gt;If your profiles show many shallow stack traces, typically 1-2 frames deep, your binary might have been compiled without frame pointers.&lt;/p&gt;
&lt;p&gt;To compile your code with frame pointers, include the &lt;code&gt;-fno-omit-frame-pointer&lt;/code&gt; flag in your compiler options.&lt;/p&gt;
&lt;h3 id=&#34;ensure-python-process-data-is-discoverable&#34;&gt;Ensure Python process data is discoverable&lt;/h3&gt;
&lt;p&gt;This error indicates that Pyroscope cannot locate required Python runtime symbols, potentially due to nonstandard library naming:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyperf get python process data failed: missing symbols pyRuntimeAddr autoTLSkeyAddr&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This can occur if the application build process uses custom naming for libraries, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;libpython3-custom.10.so.1.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pyroscope expects standard naming patterns like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;libpython3.10.so.1.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To resolve this, ensure Python libraries follow standard naming conventions.&lt;/p&gt;
]]></content><description>&lt;h1 id="troubleshoot-ebpf-installation">Troubleshoot eBPF installation&lt;/h1>
&lt;p>Learn how to troubleshoot and resolve eBPF installation issues.&lt;/p>
&lt;h2 id="profile-interpreted-languages">Profile interpreted languages&lt;/h2>
&lt;p>Profiling interpreted languages like Ruby, JavaScript, etc., isn&amp;rsquo;t ideal using this implementation.
The JIT-compiled methods in these languages are typically not in ELF file format, demanding additional steps for
profiling. For instance, using perf-map-agent and enabling frame pointers for Java.&lt;/p></description></item></channel></rss>