<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pyroscope on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/</link><description>Recent content in pyroscope on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.20/reference/components/pyroscope/index.xml" rel="self" type="application/rss+xml"/><item><title>pyroscope.ebpf</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.ebpf/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.ebpf/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopeebpf&#34;&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; configures an eBPF profiling job for the current host.
The component forwards the collected performance profiles to the receivers you list in &lt;code&gt;forward_to&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component embeds the &lt;a href=&#34;https://github.com/grafana/opentelemetry-ebpf-profiler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;grafana/opentelemetry-ebpf-profiler&lt;/code&gt;&lt;/a&gt; which is a fork of &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-ebpf-profiler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;open-telemetry/opentelemetry-ebpf-profiler&lt;/code&gt;&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;To use the &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component you must run Alloy as root and inside the host PID namespace.
On Kubernetes, the simplest option is to set &lt;code&gt;securityContext.privileged: true&lt;/code&gt;.
Users who prefer least-privilege can instead grant the &lt;a href=&#34;#required-privileges&#34;&gt;specific capabilities required&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&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 profiler requires file system storage at &lt;code&gt;/tmp/symb-cache&lt;/code&gt; to store symbol cache data. Ensure this directory is accessible and has sufficient storage space.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.ebpf&lt;/code&gt; components by giving them different labels, however it&amp;rsquo;s not recommended as it can lead to additional memory and CPU usage.&lt;/p&gt;
&lt;h2 id=&#34;required-privileges&#34;&gt;Required privileges&lt;/h2&gt;
&lt;p&gt;When running on Kubernetes without &lt;code&gt;privileged: true&lt;/code&gt;, grant the following Linux capabilities and mount the kernel filesystem paths:&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;Capability&lt;/th&gt;
              &lt;th&gt;Purpose&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;BPF&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Load and manage eBPF programs and maps.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PERFMON&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Attach performance events and read performance counters.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;SYS_PTRACE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/&lt;/code&gt; entries.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;CHECKPOINT_RESTORE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Follow magic-links in &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/map_files/*&lt;/code&gt; for ELF symbol reading (kernel 5.9&#43;; use &lt;code&gt;SYS_ADMIN&lt;/code&gt; on older kernels).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;SYS_RESOURCE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Raise &lt;code&gt;RLIMIT_MEMLOCK&lt;/code&gt; for eBPF map locking.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;DAC_READ_SEARCH&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read ELF binaries and &lt;code&gt;/proc&lt;/code&gt; entries regardless of DAC permission bits.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;SYSLOG&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read the kernel ring buffer for eBPF verifier diagnostics.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Mount &lt;code&gt;/sys/kernel/tracing&lt;/code&gt; (on older kernel versions you might need &lt;code&gt;/sys/kernel/debug&lt;/code&gt; instead) from the host as read-only volumes so the tracer can attach tracepoints.&lt;/p&gt;
&lt;h2 id=&#34;supported-languages&#34;&gt;Supported languages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Native code (C/C&#43;&#43;, Rust, Zig, Go, etc. without debug symbols on host)&lt;/li&gt;
&lt;li&gt;Broad set of high-level languages (HotSpot JVM, Python, Ruby, PHP, Node.js, V8, Perl).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.ebpf &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets    = &amp;lt;TARGET_LIST&amp;gt;
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;The component configures and starts an eBPF profiling job to collect performance profiles from the current host.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;pyroscope.ebpf&lt;/code&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;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;bpf_fs_root&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Root path of the BPF filesystem for pinned maps used in trace correlation.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/sys/fs/bpf/&amp;quot;&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;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;Deprecated (no-op), previously controlled the size of the elf file build id -&amp;gt; symbols table LRU cache.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;64&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;cache_rounds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), previously controlled the number of cache rounds.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&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;&amp;quot;15s&amp;quot;&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;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;Deprecated (no-op), previously enabled collection of kernel-space profiles.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;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;Deprecated (no-op), previously enabled collection of user-space profiles.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;comm&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How the component includes the process command name in profiles. One of &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;label&lt;/code&gt;, &lt;code&gt;stackframe&lt;/code&gt;, or &lt;code&gt;both&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;none&amp;quot;&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;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;Deprecated (no-op), previously controlled the size of the PID -&amp;gt; container ID table LRU cache.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1024&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;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; &lt;code&gt;demangle&lt;/code&gt; 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;, or &lt;code&gt;full&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;none&amp;quot;&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;dotnet_enabled&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 or disable .NET profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;go_enabled&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 or disable Go profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;go_table_fallback&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), previously enabled symbol lookup in &lt;code&gt;.sym&lt;/code&gt; / &lt;code&gt;.dynsym&lt;/code&gt; sections when &lt;code&gt;.gopclntab&lt;/code&gt; lookup failed.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;hotspot_enabled&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 or disable HotSpot profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;kernel_frames&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Include kernel-space frames in collected profiles. Set to &lt;code&gt;false&lt;/code&gt; to drop kernel frames from each stack trace.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;lazy_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable lazy mode to defer eBPF profiler startup until the component discovers targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;load_probe&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Load a generic eBPF program that you can attach to a kernel or user-space hook externally.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;no_kernel_version_check&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Skip the kernel version check for eBPF support.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;obi_process_context_enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable profile correlation with traces generated by components compatible with OpenTelemetry eBPF Instrumentation.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;off_cpu_threshold&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Probability from &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt; for recording an off-CPU event. A value of &lt;code&gt;0&lt;/code&gt; disables off-CPU profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&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;perl_enabled&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 or disable Perl profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;php_enabled&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 or disable PHP profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;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;Deprecated (no-op), previously controlled the size of the PID -&amp;gt; proc symbols table LRU cache.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;32&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;pid_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Attach the process PID to each pprof sample as a &lt;code&gt;pid&lt;/code&gt; label.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;pid_map_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), previously controlled the size of eBPF PID map.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;2048&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;probe_links&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of kernel or user-space probes from which to collect stack traces.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;python_enabled&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 or disable Python profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;ruby_enabled&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 or disable Ruby profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;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;Deprecated (no-op), previously controlled the size of the elf file -&amp;gt; symbols table LRU cache.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8&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;&lt;code&gt;19&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;symbols_map_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated (no-op), previously controlled the size of the eBPF symbols map.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;16384&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;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 process or container targets to profile.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;u_probe_links&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated. Use &lt;code&gt;probe_links&lt;/code&gt; instead.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v8_enabled&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 or disable V8 profiling.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;verbose_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable verbose logging for the eBPF profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;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;Use &lt;code&gt;no_kernel_version_check&lt;/code&gt; only when you run on an older kernel that includes backported eBPF features from a later release.
When you skip this check, the profiler can&amp;rsquo;t verify that your kernel has the eBPF features it needs, and profiling may fail or produce incomplete results.
Proceed at your own risk.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You must set the &lt;code&gt;forward_to&lt;/code&gt; argument.
Omitted fields take their default values.&lt;/p&gt;
&lt;p&gt;Several arguments carry the label &amp;ldquo;Deprecated (no-op)&amp;rdquo;. These arguments once configured cache sizes and behaviors, but they no longer have any effect. Remove these arguments from your configuration.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; doesn&amp;rsquo;t support any blocks.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; reports itself as unhealthy if you give it an invalid configuration, or if the eBPF profiling session fails to start, for example because of missing privileges or an unsupported kernel.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;elf_cache&lt;/code&gt; per build id and per same file symbol tables and their sizes in symbols count.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pid_cache&lt;/code&gt; per process elf symbol tables and their sizes in symbols count.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;targets&lt;/code&gt; the active targets the component tracks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following Prometheus metrics are exposed:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_active_targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of active targets the component tracks.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_pprofs_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of pprof profiles collected by the eBPF component, per &lt;code&gt;service_name&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_pprof_bytes_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of bytes in pprof profiles collected by the eBPF component, per &lt;code&gt;service_name&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_pprof_samples_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of samples in pprof profiles collected by the eBPF component, per &lt;code&gt;service_name&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_failing_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of profiling sessions failed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of profiling sessions started by the eBPF component.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write latency for sending to direct and indirect components.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;ebpf-profiler-internal-metrics&#34;&gt;eBPF profiler internal metrics&lt;/h3&gt;
&lt;p&gt;The component also exposes internal metrics from the embedded eBPF profiler.
The component emits these metrics only after recording each one at least once, so not all metrics appear on every host.
The metrics carry an &lt;code&gt;otel_scope_name=&amp;quot;pyroscope.ebpf&amp;quot;&lt;/code&gt; label.&lt;/p&gt;
&lt;p&gt;Notable metrics include:&lt;/p&gt;
&lt;h4 id=&#34;native-unwinding&#34;&gt;Native unwinding&lt;/h4&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindNativeAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Unwind attempts since the previous check.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindNativeFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Unwound frames since the previous check.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindNativeStackDeltaStop_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of stop stack deltas in the native unwinder (success).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindNativeSmallPC_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of times PC held a value smaller than &lt;code&gt;0x1000&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindErrStackLengthExceeded_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of times the unwinder exceeded &lt;code&gt;MAX_FRAME_UNWINDS&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;interpreter-unwinding&#34;&gt;Interpreter unwinding&lt;/h4&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPythonAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted Python unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPythonFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound Python frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindHotspotAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted HotSpot JVM unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindHotspotFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound HotSpot JVM frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindRubyAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted Ruby unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindRubyFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound Ruby frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPHPAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted PHP unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPHPFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound PHP frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPerlAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted Perl unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindPerlFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound Perl frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindV8Attempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted V8 unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindV8Frames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound V8 frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindDotnetAttempts_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of attempted .NET unwinds.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindDotnetFrames_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of unwound .NET frames.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;symbolization&#34;&gt;Symbolization&lt;/h4&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PythonSymbolizationSuccesses_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of successfully symbolized Python frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;PythonSymbolizationFailures_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of Python frames that failed symbolization.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HotspotSymbolizationSuccesses_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of successfully symbolized HotSpot frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HotspotSymbolizationFailures_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of HotSpot frames that failed symbolization.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;RubySymbolizationSuccess_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of successfully symbolized Ruby frames.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;RubySymbolizationFailure_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of Ruby frames that failed symbolization.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;process-management&#34;&gt;Process management&lt;/h4&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;NumProcNew_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of new PID events.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;NumProcExit_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of exit PID events.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;NumGenericPID_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Number of generic PID events.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h4 id=&#34;ebpf-map-state&#34;&gt;eBPF map state&lt;/h4&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;NumExeIDLoadedToEBPF&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The number of executables loaded to eBPF maps.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HashmapPidPageToMappingInfo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Current size of the &lt;code&gt;pid_page_to_mapping_info&lt;/code&gt; hash map.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;HashmapNumStackDeltaPages&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Current size of the stack delta pages hash map.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;UnwindInfoArraySize&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Current size of the unwind info array.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;a href=&#34;https://github.com/grafana/opentelemetry-ebpf-profiler/blob/main/metrics/metrics.json&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;opentelemetry-ebpf-profiler&lt;/code&gt; metrics.json&lt;/a&gt; file defines the full list of metrics.&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 19.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected into the collected profiles if you haven&amp;rsquo;t 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;__container_id__&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The container ID derived from target.&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;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 defaults to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;otel.scope.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The instrumentation scope name, set to &lt;code&gt;com.grafana.alloy/pyroscope.ebpf&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;otel.scope.version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Alloy version that produced the profile.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Alloy only sets &lt;code&gt;otel.scope.name&lt;/code&gt; and &lt;code&gt;otel.scope.version&lt;/code&gt; if they aren&amp;rsquo;t already present on the profile.
&lt;code&gt;otel.scope.version&lt;/code&gt; is only set when &lt;code&gt;otel.scope.name&lt;/code&gt; matches the default value.&lt;/p&gt;
&lt;h3 id=&#34;targets&#34;&gt;Targets&lt;/h3&gt;
&lt;p&gt;Each target in &lt;code&gt;targets&lt;/code&gt; &lt;em&gt;must&lt;/em&gt; include one of the following special labels, and the label must correspond to the container or process you profile:&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 component aggregates the stack traces per target by container ID.
If a process&amp;rsquo;s PID matches a target&amp;rsquo;s process PID label, the component aggregates the stack traces per target by process PID.
Otherwise the process isn&amp;rsquo;t profiled.&lt;/p&gt;
&lt;h3 id=&#34;service-name&#34;&gt;Service name&lt;/h3&gt;
&lt;p&gt;Every profile carries a &lt;code&gt;service_name&lt;/code&gt; label.
You can set it on the target yourself.
If you don&amp;rsquo;t, the component adds the label and infers a value, in order, from the following 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;, combined into &lt;code&gt;ebpf/&amp;lt;namespace&amp;gt;/&amp;lt;container_name&amp;gt;&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;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you don&amp;rsquo;t set &lt;code&gt;service_name&lt;/code&gt; and the component can&amp;rsquo;t infer a value, it uses &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;troubleshoot-unknown-symbols&#34;&gt;Troubleshoot unknown symbols&lt;/h2&gt;
&lt;p&gt;The component extracts symbols from several sources, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;.gopclntab&lt;/code&gt; section in Go language ELF files.&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;.symtab&lt;/code&gt; and &lt;code&gt;.dynsym&lt;/code&gt; sections in the ELF file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The search for debug files follows the &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;GNU Debugger 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 component examines the following paths:&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&amp;rsquo;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 without corresponding function names, for example, &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt;, the component couldn&amp;rsquo;t map the symbols 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 build process stripped the binary, 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 the component can&amp;rsquo;t locate it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To fix this for your binaries, ensure that they&amp;rsquo;re 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, install the debug symbols.
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 compiler might have omitted 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;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to discover profiling targets and send the resulting profiles to a Pyroscope endpoint.&lt;/p&gt;
&lt;h3 id=&#34;kubernetes-discovery&#34;&gt;Kubernetes discovery&lt;/h3&gt;
&lt;p&gt;In the following example, the component collects performance profiles from Pods on the same node, discovered using &lt;code&gt;discovery.kubernetes&lt;/code&gt;.
Pod selection relies on the &lt;code&gt;HOSTNAME&lt;/code&gt; environment variable, which is a Pod name if Alloy is used as an Alloy Helm chart.
The example sets the &lt;code&gt;service_name&lt;/code&gt; label to &lt;code&gt;ebpf/{__meta_kubernetes_namespace}/{__meta_kubernetes_pod_container_name}&lt;/code&gt; from Kubernetes meta labels.&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.kubernetes &amp;#34;all_pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
  selectors {
    field = &amp;#34;spec.nodeName=&amp;#34; &amp;#43; sys.env(&amp;#34;HOSTNAME&amp;#34;)
    role = &amp;#34;pod&amp;#34;
  }
}

discovery.relabel &amp;#34;local_pods&amp;#34; {
  targets = discovery.kubernetes.all_pods.targets
  rule {
    action = &amp;#34;drop&amp;#34;
    regex = &amp;#34;Succeeded|Failed&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_phase&amp;#34;]
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    regex = &amp;#34;(.*)@(.*)&amp;#34;
    replacement = &amp;#34;ebpf/${1}/${2}&amp;#34;
    separator = &amp;#34;@&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;, &amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label = &amp;#34;service_name&amp;#34;
  }
  rule {
    action = &amp;#34;labelmap&amp;#34;
    regex = &amp;#34;__meta_kubernetes_pod_label_(.&amp;#43;)&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;]
    target_label = &amp;#34;namespace&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_name&amp;#34;]
    target_label = &amp;#34;pod&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    target_label = &amp;#34;node&amp;#34;
  }
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_kubernetes_pod_container_name&amp;#34;]
    target_label = &amp;#34;container&amp;#34;
  }
}
pyroscope.ebpf &amp;#34;local_pods&amp;#34; {
  forward_to = [ pyroscope.write.endpoint.receiver ]
  targets = discovery.relabel.local_pods.output
}

pyroscope.write &amp;#34;endpoint&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;docker-discovery&#34;&gt;Docker discovery&lt;/h3&gt;
&lt;p&gt;The following example collects performance profiles from containers discovered by &lt;code&gt;discovery.docker&lt;/code&gt; and ignores all other profiles collected from outside any docker container.
The example sets the &lt;code&gt;service_name&lt;/code&gt; label from the &lt;code&gt;__meta_docker_container_name&lt;/code&gt; label.&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;linux&amp;#34; {
  host = &amp;#34;unix:///var/run/docker.sock&amp;#34;
}

discovery.relabel &amp;#34;local_containers&amp;#34; {
  targets = discovery.docker.linux.targets
  rule {
    action = &amp;#34;replace&amp;#34;
    source_labels = [&amp;#34;__meta_docker_container_name&amp;#34;]
    target_label = &amp;#34;service_name&amp;#34;
  }
}

pyroscope.write &amp;#34;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}

pyroscope.ebpf &amp;#34;default&amp;#34; {
  forward_to   = [ pyroscope.write.staging.receiver ]
  targets      = discovery.relabel.local_containers.output
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;collect-profiles-from-probes&#34;&gt;Collect profiles from probes&lt;/h3&gt;
&lt;p&gt;Use &lt;code&gt;probe_links&lt;/code&gt; to collect stack traces whenever something calls the kernel or user-space probes you specify.
Kernel probes use the format &lt;code&gt;&amp;lt;PROBE_TYPE&amp;gt;:&amp;lt;SYMBOL&amp;gt;&lt;/code&gt;, and user-space probes use the format &lt;code&gt;&amp;lt;PROBE_TYPE&amp;gt;:&amp;lt;EXECUTABLE_PATH&amp;gt;:&amp;lt;SYMBOL&amp;gt;&lt;/code&gt;.
Supported probe types are &lt;code&gt;kprobe&lt;/code&gt;, &lt;code&gt;kretprobe&lt;/code&gt;, &lt;code&gt;uprobe&lt;/code&gt;, and &lt;code&gt;uretprobe&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following example collects profiles when the kernel calls &lt;code&gt;do_sys_open&lt;/code&gt; or when &lt;code&gt;libc&lt;/code&gt; calls &lt;code&gt;malloc&lt;/code&gt;:&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.ebpf &amp;#34;probes&amp;#34; {
	targets     = &amp;lt;TARGET_LIST&amp;gt;
	forward_to  = &amp;lt;RECEIVER_LIST&amp;gt;
	probe_links = [
		&amp;#34;kprobe:do_sys_open&amp;#34;,
		&amp;#34;uprobe:/usr/lib/libc.so.6:malloc&amp;#34;,
	]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;TARGET_LIST&amp;gt;&lt;/code&gt;&lt;/em&gt;: The list of process or container targets to profile.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;RECEIVER_LIST&amp;gt;&lt;/code&gt;&lt;/em&gt;: The list of profile receivers to forward profiles to.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;correlate-request-profiles-with-beyla-traces-and-spans&#34;&gt;Correlate request profiles with Beyla traces and spans&lt;/h3&gt;
&lt;p&gt;When &lt;code&gt;obi_process_context_enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;pyroscope.ebpf&lt;/code&gt; uses a shared eBPF map under &lt;code&gt;bpf_fs_root&lt;/code&gt; to correlate profile samples with traces generated by components compatible with OpenTelemetry eBPF Instrumentation (OBI), such as &lt;code&gt;beyla.ebpf&lt;/code&gt;.
Correlated samples include the &lt;code&gt;trace_id&lt;/code&gt; and &lt;code&gt;span_id&lt;/code&gt; labels.
Components that share process context must use the same BPF filesystem root.&lt;/p&gt;
&lt;p&gt;The following example uses &lt;code&gt;beyla.ebpf&lt;/code&gt; to instrument requests to services listening on any port.
It also profiles local processes and forwards the profiles to Pyroscope.
Both components use their default BPF filesystem root at &lt;code&gt;/sys/fs/bpf/&lt;/code&gt;.&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;beyla.ebpf &amp;#34;autoinstrument&amp;#34; {
	discovery {
		instrument {
			open_ports = &amp;#34;1-65535&amp;#34;
		}
	}

	output {
		traces = [otelcol.processor.batch.traces.input]
	}
}

otelcol.processor.batch &amp;#34;traces&amp;#34; {
	output {
		traces = [otelcol.exporter.otlphttp.traces.input]
	}
}

otelcol.exporter.otlphttp &amp;#34;traces&amp;#34; {
	client {
		endpoint = &amp;#34;&amp;lt;OTLP_TRACES_ENDPOINT&amp;gt;&amp;#34;
	}
}

discovery.process &amp;#34;all&amp;#34; { }

discovery.relabel &amp;#34;profiled_processes&amp;#34; {
	targets = discovery.process.all.targets

	rule {
		action        = &amp;#34;replace&amp;#34;
		source_labels = [&amp;#34;__meta_process_exe&amp;#34;]
		regex         = &amp;#34;.*/([^/]&amp;#43;)$&amp;#34;
		replacement   = &amp;#34;$1&amp;#34;
		target_label  = &amp;#34;service_name&amp;#34;
	}
}

pyroscope.ebpf &amp;#34;request_profiles&amp;#34; {
	targets                     = discovery.relabel.profiled_processes.output
	forward_to                  = [pyroscope.write.profiles.receiver]
	bpf_fs_root                 = &amp;#34;/sys/fs/bpf/&amp;#34;
	obi_process_context_enabled = true
}

pyroscope.write &amp;#34;profiles&amp;#34; {
	endpoint {
		url = &amp;#34;&amp;lt;PYROSCOPE_URL&amp;gt;&amp;#34;
	}
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;OTLP_TRACES_ENDPOINT&amp;gt;&lt;/code&gt;&lt;/em&gt;: The OTLP HTTP endpoint to send traces to.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PYROSCOPE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: The URL of the Pyroscope server to send profiles to.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.ebpf&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopeebpf">&lt;code>pyroscope.ebpf&lt;/code>&lt;/h1>
&lt;p>&lt;code>pyroscope.ebpf&lt;/code> configures an eBPF profiling job for the current host.
The component forwards the collected performance profiles to the receivers you list in &lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>pyroscope.enrich</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.enrich/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.enrich/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopeenrich&#34;&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt;&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; enriches profiles with additional labels from service discovery targets.
It matches a label from incoming profiles against a label from discovered targets, and copies specified labels from the matched target to the profile.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.enrich&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.enrich &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets = &amp;lt;DISCOVERY_COMPONENT&amp;gt;.targets
  target_match_label = &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34;
  forward_to = [&amp;lt;RECEIVER_LIST&amp;gt;]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;pyroscope.enrich&lt;/code&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;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 enriched 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;target_match_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label from discovered targets to match against.&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;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 from a discovery component.&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;labels_to_copy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of labels to copy from discovered targets to profiles. If empty, &lt;code&gt;pyroscope.enrich&lt;/code&gt; copies all labels.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles_match_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The label from incoming profiles to match against discovered targets.&lt;/td&gt;
              &lt;td&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;p&gt;If &lt;code&gt;profiles_match_label&lt;/code&gt; isn&amp;rsquo;t provided, the component uses &lt;code&gt;target_match_label&lt;/code&gt; for matching profile labels.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; doesn&amp;rsquo;t support any blocks.
You can configure this component with arguments.&lt;/p&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The receiver for profiles.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example enriches profiles received over HTTP with metadata from Kubernetes service discovery:&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;// Discover Kubernetes pods
discovery.kubernetes &amp;#34;pods&amp;#34; {
  role = &amp;#34;pod&amp;#34;
}

// Add custom labels from Kubernetes metadata
discovery.relabel &amp;#34;pods&amp;#34; {
  targets = discovery.kubernetes.pods.targets

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_namespace&amp;#34;]
    target_label  = &amp;#34;namespace&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_node_name&amp;#34;]
    target_label  = &amp;#34;node&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_label_app&amp;#34;]
    target_label  = &amp;#34;app&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_label_environment&amp;#34;]
    target_label  = &amp;#34;environment&amp;#34;
  }

  rule {
    source_labels = [&amp;#34;__meta_kubernetes_pod_ip&amp;#34;]
    target_label  = &amp;#34;pod_ip&amp;#34;
  }
}

// Receive profiles over HTTP
pyroscope.receive_http &amp;#34;default&amp;#34; {
  http {
    listen_address = &amp;#34;0.0.0.0&amp;#34;
    listen_port    = 4040
  }
  forward_to = [pyroscope.enrich.metadata.receiver]
}

// Enrich profiles with Kubernetes metadata
pyroscope.enrich &amp;#34;metadata&amp;#34; {
  targets               = discovery.relabel.pods.output
  target_match_label    = &amp;#34;pod_ip&amp;#34;
  profiles_match_label  = &amp;#34;service_name&amp;#34;
  labels_to_copy        = [&amp;#34;namespace&amp;#34;, &amp;#34;node&amp;#34;, &amp;#34;app&amp;#34;, &amp;#34;environment&amp;#34;]
  forward_to            = [pyroscope.write.default.receiver]
}

// Write profiles to Pyroscope
pyroscope.write &amp;#34;default&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;component-behavior&#34;&gt;Component behavior&lt;/h2&gt;
&lt;p&gt;The component matches profiles to discovered targets and enriches them with additional labels:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;For each profile, it looks up the value of &lt;code&gt;profiles_match_label&lt;/code&gt; from the profile&amp;rsquo;s labels, or &lt;code&gt;target_match_label&lt;/code&gt; if &lt;code&gt;profiles_match_label&lt;/code&gt; isn&amp;rsquo;t specified.&lt;/li&gt;
&lt;li&gt;It matches this value against the &lt;code&gt;target_match_label&lt;/code&gt; in discovered targets.&lt;/li&gt;
&lt;li&gt;When it finds a match, it copies the requested &lt;code&gt;labels_to_copy&lt;/code&gt; from the discovered target to the profile. If &lt;code&gt;labels_to_copy&lt;/code&gt; is empty, it copies all labels.&lt;/li&gt;
&lt;li&gt;The component forwards the profile, enriched or unchanged, to the configured receivers.&lt;/li&gt;
&lt;/ol&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;By default, &lt;code&gt;pyroscope.enrich&lt;/code&gt; is ready as it starts, even if discovery doesn&amp;rsquo;t find targets.
If you send profiles to this component before the metadata synchronizes, the component passes them through as-is, without enrichment.
This is most likely to impact &lt;code&gt;pyroscope.enrich&lt;/code&gt; on startup for a short time before discovery components send a list of targets.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;pyroscope.enrich&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-consumers&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopeenrich">&lt;code>pyroscope.enrich&lt;/code>&lt;/h1>
&lt;div data-shared="stability/experimental.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> component.
Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental component, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.20/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item><item><title>pyroscope.java</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.java/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.java/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopejava&#34;&gt;&lt;code&gt;pyroscope.java&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; continuously profiles Java processes running on the local Linux OS using &lt;a href=&#34;https://github.com/async-profiler/async-profiler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;async-profiler&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;To use the  &lt;code&gt;pyroscope.java&lt;/code&gt; component you must run Alloy as root and inside host PID namespace.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.java&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.java &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets    = &amp;lt;TARGET_LIST&amp;gt;
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;target-jvm-configuration&#34;&gt;Target JVM configuration&lt;/h2&gt;
&lt;p&gt;When you use &lt;code&gt;pyroscope.java&lt;/code&gt; to profile Java applications, you can configure the target JVMs with some command line flags that ensure accurate profiling, especially for inlined methods.
Add the following flags to your Java application&amp;rsquo;s startup command:&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;java&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-java&#34;&gt;-XX:&amp;#43;UnlockDiagnosticVMOptions -XX:&amp;#43;DebugNonSafepoints&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more details, refer to &lt;a href=&#34;https://github.com/async-profiler/async-profiler?tab=readme-ov-file#restrictionslimitations&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Restrictions/Limitations&lt;/a&gt; in the async-profiler documentation.&lt;/p&gt;
&lt;h2 id=&#34;additional-configuration-for-linux-capabilities&#34;&gt;Additional configuration for Linux capabilities&lt;/h2&gt;
&lt;p&gt;If your Kubernetes environment has Linux capabilities enabled, configure the following in your Helm values to ensure &lt;code&gt;pyroscope.java&lt;/code&gt; functions properly:&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:
  securityContext:
    runAsUser: 0
    runAsNonRoot: false
    capabilities:
      add:
        - PERFMON
        - SYS_PTRACE
        - SYS_RESOURCE
        - SYS_ADMIN&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These capabilities enable Alloy to access performance monitoring subsystems, trace processes, override resource limits, and perform necessary system administration tasks for profiling.&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;Adjust capabilities based on your specific security requirements and environment, following the principle of least privilege.
The capability behavior depends on Container Runtime Interface (CRI) settings.
For example, Docker drops capabilities that aren&amp;rsquo;t on the allowlist by default.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;pyroscope.java&lt;/code&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;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;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 java process targets to profile.&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;tmp_dir&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Temporary directory to store async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/tmp&amp;quot;&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;p&gt;After component startup, &lt;code&gt;pyroscope.java&lt;/code&gt; creates a temporary directory under the &lt;code&gt;tmp_dir&lt;/code&gt; argument and extracts the async-profiler binaries for both &lt;code&gt;glibc&lt;/code&gt; and &lt;code&gt;musl&lt;/code&gt; into the directory with the following layout.&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;text&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-text&#34;&gt;/tmp/alloy-asprof-glibc-{SHA1}/bin/asprof
/tmp/alloy-asprof-glibc-{SHA1}/lib/libasyncProfiler.so
/tmp/alloy-asprof-musl-{SHA1}/bin/asprof
/tmp/alloy-asprof-musl-{SHA1}/lib/libasyncProfiler.so&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After process profiling startup, the component detects &lt;code&gt;libc&lt;/code&gt; type and copies the matching &lt;code&gt;libasyncProfiler.so&lt;/code&gt; into the target process&amp;rsquo;s file system at the exact same path.&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;The &lt;code&gt;asprof&lt;/code&gt; binary runs with root permissions.
If you change the &lt;code&gt;tmp_dir&lt;/code&gt; argument to something other than &lt;code&gt;/tmp&lt;/code&gt;, then you must ensure that the directory is only writable by root.&lt;/p&gt;
&lt;p&gt;The filesystem mounted at &lt;code&gt;tmp_dir&lt;/code&gt; in the Alloy and target containers must allow file execution.
A mount option such as &lt;code&gt;noexec&lt;/code&gt; prevents this.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Each target in the &lt;code&gt;targets&lt;/code&gt; argument must always include the special &lt;code&gt;__process_pid__&lt;/code&gt; label, which corresponds to the process PID that&amp;rsquo;s used for profiling.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; doesn&amp;rsquo;t fail or report unhealthy if a target is missing the &lt;code&gt;__process_pid__&lt;/code&gt; label.
It logs an error and silently skips profiling that target instead.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The component treats labels that start with a double underscore as &lt;em&gt;internal&lt;/em&gt; and removes them before scraping.&lt;/p&gt;
&lt;p&gt;Every profile carries a &lt;code&gt;service_name&lt;/code&gt; label.
You can set it on the target yourself.
If you don&amp;rsquo;t, &lt;code&gt;pyroscope.java&lt;/code&gt; adds the label and infers a value from the following sources, in this order:&lt;/p&gt;
&lt;ol&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;, combined into &lt;code&gt;java/&amp;lt;namespace&amp;gt;/&amp;lt;container_name&amp;gt;&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; or &lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you don&amp;rsquo;t set &lt;code&gt;service_name&lt;/code&gt; and the component can&amp;rsquo;t infer a value, it uses &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;injected-labels&#34;&gt;Injected labels&lt;/h3&gt;
&lt;p&gt;Independently of the &lt;code&gt;targets&lt;/code&gt; argument, &lt;code&gt;pyroscope.java&lt;/code&gt; automatically injects the following labels into collected profiles if you haven&amp;rsquo;t already defined them:&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;otel.scope.name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The instrumentation scope name, set to &lt;code&gt;com.grafana.alloy/pyroscope.java&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;otel.scope.version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Alloy version that produced the profile.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Alloy only sets &lt;code&gt;otel.scope.name&lt;/code&gt; and &lt;code&gt;otel.scope.version&lt;/code&gt; if they aren&amp;rsquo;t already present on the profile.
&lt;code&gt;otel.scope.version&lt;/code&gt; is only set when &lt;code&gt;otel.scope.name&lt;/code&gt; matches the default value.&lt;/p&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;pyroscope.java&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 1;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#profiling_config\&amp;#34;\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eDescribes java profiling configuration.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&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;a href=&#34;#profiling_config&#34;&gt;&lt;code&gt;profiling_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Describes java profiling configuration.&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;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;profiling_config&#34;&gt;&lt;code&gt;profiling_config&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profiling_config&lt;/code&gt; block describes how the component invokes async-profiler.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profiling_config&lt;/code&gt; block:&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;alloc&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Allocation profiling sampling configuration. It&amp;rsquo;s passed as an &lt;code&gt;--alloc&lt;/code&gt; argument to async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;512k&amp;quot;&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;cpu&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 CPU profiling, using &lt;code&gt;itimer&lt;/code&gt; async-profiler event by default.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;custom_arguments&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sends raw args to async-profiler, skipping all Alloy arguments except &lt;code&gt;interval&lt;/code&gt;. Refer to &lt;a href=&#34;#custom_arguments&#34;&gt;&lt;code&gt;custom_arguments&lt;/code&gt;&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]&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;event&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets the CPU profiling event. Refer to &lt;a href=&#34;#event&#34;&gt;&lt;code&gt;event&lt;/code&gt;&lt;/a&gt; for supported values.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;itimer&amp;quot;&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;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 from the targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&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;lock&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Lock profiling sampling configuration. It&amp;rsquo;s passed as an &lt;code&gt;--lock&lt;/code&gt; argument to async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10ms&amp;quot;&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;log_level&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets the log level in async profiler. One of &lt;code&gt;TRACE&lt;/code&gt;, &lt;code&gt;DEBUG&lt;/code&gt;, &lt;code&gt;INFO&lt;/code&gt;, &lt;code&gt;WARN&lt;/code&gt;, &lt;code&gt;ERROR&lt;/code&gt;, or &lt;code&gt;NONE&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;INFO&amp;quot;&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;per_thread&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets per thread mode on async profiler. It&amp;rsquo;s passed as an &lt;code&gt;-t&lt;/code&gt; argument to async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;quiet&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;If set, suppresses the &lt;code&gt;Profiling started/stopped&lt;/code&gt; log message.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;CPU profiling sample rate. It&amp;rsquo;s converted from Hz to interval and passed as an &lt;code&gt;-i&lt;/code&gt; argument to async-profiler.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;100&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;tlab&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables TLAB-based allocation events. Passed as &lt;code&gt;--tlab&lt;/code&gt; to async-profiler. Requires &lt;code&gt;alloc&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;p&gt;Refer to &lt;a href=&#34;https://github.com/async-profiler/async-profiler?tab=readme-ov-file#profiler-options&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;profiler-options&lt;/a&gt; for more information about async-profiler configuration.&lt;/p&gt;
&lt;h3 id=&#34;custom_arguments&#34;&gt;&lt;code&gt;custom_arguments&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;custom_arguments&lt;/code&gt; passes async-profiler &lt;code&gt;start&lt;/code&gt; flags directly.&lt;/p&gt;
&lt;p&gt;When you set &lt;code&gt;custom_arguments&lt;/code&gt;, Alloy skips these options from this block:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cpu&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt;, &lt;code&gt;per_thread&lt;/code&gt;, &lt;code&gt;sample_rate&lt;/code&gt;, &lt;code&gt;alloc&lt;/code&gt;, &lt;code&gt;lock&lt;/code&gt;, &lt;code&gt;log_level&lt;/code&gt;, &lt;code&gt;tlab&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For example, this configuration enables multi-event profiling for &lt;code&gt;cpu&lt;/code&gt;, &lt;code&gt;alloc&lt;/code&gt;, and &lt;code&gt;lock&lt;/code&gt; with custom thresholds:&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.java &amp;#34;java&amp;#34; {
  targets    = discovery.relabel.java.output
  forward_to = [pyroscope.write.staging.receiver]

  profiling_config {
    interval = &amp;#34;60s&amp;#34;
    custom_arguments = [&amp;#34;-e&amp;#34;, &amp;#34;cpu,alloc,lock&amp;#34;, &amp;#34;--alloc&amp;#34;, &amp;#34;2m&amp;#34;, &amp;#34;--lock&amp;#34;, &amp;#34;10ms&amp;#34;]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Refer to &lt;a href=&#34;https://github.com/async-profiler/async-profiler/blob/master/docs/ProfilingModes.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Profiling modes&lt;/a&gt; and &lt;a href=&#34;https://github.com/async-profiler/async-profiler?tab=readme-ov-file#profiler-options&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;profiler-options&lt;/a&gt; for the complete async-profiler option list.&lt;/p&gt;
&lt;h3 id=&#34;event&#34;&gt;&lt;code&gt;event&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;event&lt;/code&gt; argument configures the profiling mode used by async-profiler.
async-profiler supports various profiling modes including CPU profiling, wall-clock profiling, and hardware performance monitoring events.
For a complete overview of all available profiling modes and their use cases, refer to &lt;a href=&#34;https://github.com/async-profiler/async-profiler/blob/master/docs/ProfilingModes.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Profiling modes&lt;/a&gt; in the async-profiler documentation.&lt;/p&gt;
&lt;h3 id=&#34;per_thread&#34;&gt;&lt;code&gt;per_thread&lt;/code&gt;&lt;/h3&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;The &lt;code&gt;per_thread&lt;/code&gt; option doesn&amp;rsquo;t apply when using JFR output format.
Since &lt;code&gt;pyroscope.java&lt;/code&gt; uses JFR format exclusively, this option has no effect.
For more details, refer to &lt;a href=&#34;https://github.com/async-profiler/async-profiler/blob/master/docs/ProfilerOptions.md#options-applicable-to-any-output-format-except-jfr&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Options applicable to any output format except JFR&lt;/a&gt; in the async-profiler documentation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug metrics.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example profiles every Java process on the current host:&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;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://localhost:4040&amp;#34;
  }
}

discovery.process &amp;#34;all&amp;#34; {
  refresh_interval = &amp;#34;60s&amp;#34;
  discover_config {
    cwd = true
    exe = true
    commandline = true
    username = true
    uid = true
    container_id = true
  }
}

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

pyroscope.java &amp;#34;java&amp;#34; {
  targets = discovery.relabel.java.output
  forward_to = [pyroscope.write.staging.receiver]
  profiling_config {
    interval = &amp;#34;60s&amp;#34;
    alloc = &amp;#34;512k&amp;#34;
    cpu = true
    sample_rate = 100
    lock = &amp;#34;1ms&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.java&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopejava">&lt;code>pyroscope.java&lt;/code>&lt;/h1>
&lt;p>&lt;code>pyroscope.java&lt;/code> continuously profiles Java processes running on the local Linux OS using &lt;a href="https://github.com/async-profiler/async-profiler" target="_blank" rel="noopener noreferrer">async-profiler&lt;/a>.&lt;/p>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>To use the &lt;code>pyroscope.java&lt;/code> component you must run Alloy as root and inside host PID namespace.&lt;/p></description></item><item><title>pyroscope.receive_http</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.receive_http/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.receive_http/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopereceive_http&#34;&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt; receives profiles over HTTP and forwards them to &lt;code&gt;pyroscope.*&lt;/code&gt; components capable of receiving profiles.&lt;/p&gt;
&lt;p&gt;The HTTP API exposed is compatible with both the Pyroscope &lt;a href=&#34;/docs/pyroscope/latest/reference-server-api/&#34;&gt;HTTP ingest API&lt;/a&gt; and the &lt;a href=&#34;https://github.com/grafana/pyroscope/blob/main/api/push/v1/push.proto&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pushv1.PusherService&lt;/a&gt; Connect API.
This allows &lt;code&gt;pyroscope.receive_http&lt;/code&gt; to act as a proxy for Pyroscope profiles, enabling flexible routing and distribution of profile data.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.receive_http&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.receive_http &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  http {
    listen_address = &amp;#34;&amp;lt;LISTEN_ADDRESS&amp;gt;&amp;#34;
    listen_port = &amp;#34;&amp;lt;PORT&amp;gt;&amp;#34;
  }
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component starts an HTTP server supporting the following endpoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;POST /ingest&lt;/code&gt;: Send profiles to the component, which forwards them to the receivers configured in the &lt;code&gt;forward_to&lt;/code&gt; argument.
The request format must match the format of the Pyroscope ingest API.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /push.v1.PusherService/Push&lt;/code&gt;: Send profiles to the component, which forwards them to the receivers configured in the &lt;code&gt;forward_to&lt;/code&gt; argument.
The request format must match the format of the Pyroscope pushv1.PusherService Connect API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following argument with &lt;code&gt;pyroscope.receive_http&lt;/code&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;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 profiles to.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;pyroscope.receive_http&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 2;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#http\&amp;#34;\u003e\u003ccode\u003ehttp\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures the HTTP server that receives requests.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003ehttp\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls\&amp;#34;\u003e\u003ccode\u003etls\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigures TLS for the HTTP server.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&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;a href=&#34;#http&#34;&gt;&lt;code&gt;http&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures the HTTP server that receives requests.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls&#34;&gt;&lt;code&gt;tls&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configures TLS for the HTTP server.&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;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;http&#34;&gt;&lt;code&gt;http&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/server-http.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;http&lt;/code&gt; block configures the HTTP server.&lt;/p&gt;
&lt;p&gt;You can use the following arguments to configure the &lt;code&gt;http&lt;/code&gt; block. Any omitted fields take their default values.&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;conn_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of simultaneous HTTP connections. Defaults to no limit.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&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;listen_address&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Network address on which the server listens for new connections. Defaults to accepting all incoming connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;listen_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Port number on which the server listens for new connections.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;8080&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;server_idle_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Idle timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;120s&amp;quot;&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;server_read_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Read timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&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;server_write_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write timeout for HTTP server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;30s&amp;quot;&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;/div&gt;

        
&lt;h3 id=&#34;tls&#34;&gt;&lt;code&gt;tls&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tls&lt;/code&gt; block configures TLS for the HTTP server.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/server-tls-config-block.md&#34;&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;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the server TLS certificate.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the server TLS certificate on disk.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;client_auth_type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Client authentication to use.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;NoClientCert&amp;quot;&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;client_ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the client CA file on disk to validate requests against.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;client_ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the client CA to validate requests against.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to the server TLS key on disk.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;PEM data of the server TLS key.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&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;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using &lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;) must be provided.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt; doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following Prometheus metrics are exposed:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Current number of accepted TCP connections.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections_limit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of TCP connections that the component can accept. A value of &lt;code&gt;0&lt;/code&gt; means no limit.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;troubleshoot&#34;&gt;Troubleshoot&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/pyroscope-troubleshooting.md&#34;&gt;
            &lt;h3 id=&#34;connection-limit-errors&#34;&gt;Connection limit errors&lt;/h3&gt;
&lt;p&gt;When using &lt;code&gt;pyroscope.write&lt;/code&gt; to push profiles to a &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component, you may encounter errors like:&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;text&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-text&#34;&gt;&amp;#34;failed to push to endpoint&amp;#34; err=&amp;#34;deadline_exceeded: context deadline exceeded&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This typically indicates that the receiving component has reached its TCP connection limit.&lt;/p&gt;
&lt;p&gt;To resolve connection limit errors, first diagnose the issue, then apply one of the solutions.&lt;/p&gt;
&lt;h4 id=&#34;diagnose-connection-limit-issues&#34;&gt;Diagnose connection limit issues&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check the connection metrics on the &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections&lt;/code&gt;: Current number of accepted TCP connections&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections_limit&lt;/code&gt;: Maximum number of TCP connections allowed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the current connections are approaching or at the limit, you need to take action.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;solution-1-increase-the-connection-limit&#34;&gt;Solution 1: Increase the connection limit&lt;/h4&gt;
&lt;p&gt;To increase the connection limit, increase the &lt;code&gt;conn_limit&lt;/code&gt; parameter in the &lt;code&gt;pyroscope.receive_http&lt;/code&gt; configuration:&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.receive_http &amp;#34;example&amp;#34; {
  http {
    conn_limit = 32768  // Increase from default 16384
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;solution-2-horizontal-scaling&#34;&gt;Solution 2: Horizontal scaling&lt;/h4&gt;
&lt;p&gt;To distribute the connection load across multiple receivers, deploy multiple instances of &lt;code&gt;pyroscope.receive_http&lt;/code&gt; behind a load balancer.&lt;/p&gt;
&lt;h3 id=&#34;timeout-chain-issues&#34;&gt;Timeout chain issues&lt;/h3&gt;
&lt;p&gt;When chaining multiple Pyroscope components such as &lt;code&gt;pyroscope.write&lt;/code&gt; to &lt;code&gt;pyroscope.receive_http&lt;/code&gt; to another &lt;code&gt;pyroscope.write&lt;/code&gt;, you may encounter timeout issues that prevent retries:&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;text&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-text&#34;&gt;&amp;#34;failed to push to endpoint&amp;#34; err=&amp;#34;deadline_exceeded: context deadline exceeded&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;understand-the-problem&#34;&gt;Understand the problem&lt;/h4&gt;
&lt;p&gt;This issue occurs when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The first &lt;code&gt;pyroscope.write&lt;/code&gt; component sends profiles to &lt;code&gt;pyroscope.receive_http&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component forwards profiles to another &lt;code&gt;pyroscope.write&lt;/code&gt; component.&lt;/li&gt;
&lt;li&gt;Both &lt;code&gt;pyroscope.write&lt;/code&gt; components have the same default &lt;code&gt;remote_timeout&lt;/code&gt; of 10 seconds.&lt;/li&gt;
&lt;li&gt;The request context passes from the first &lt;code&gt;pyroscope.write&lt;/code&gt; through &lt;code&gt;pyroscope.receive_http&lt;/code&gt; to the second &lt;code&gt;pyroscope.write&lt;/code&gt;, maintaining the original 10-second deadline.&lt;/li&gt;
&lt;li&gt;If the second &lt;code&gt;pyroscope.write&lt;/code&gt; component&amp;rsquo;s downstream request takes the full 10 seconds due to a broken TCP idle connection, there&amp;rsquo;s no time left for retries.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To resolve timeout chain issues, apply one of the following solutions.&lt;/p&gt;
&lt;h4 id=&#34;solution-1-increase-timeout-on-the-first-pyroscopewrite&#34;&gt;Solution 1: Increase timeout on the first pyroscope.write&lt;/h4&gt;
&lt;p&gt;To provide buffer time for retries, increase the &lt;code&gt;remote_timeout&lt;/code&gt; on the initial &lt;code&gt;pyroscope.write&lt;/code&gt; component:&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;w1&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-receiver:8080&amp;#34;
    remote_timeout = &amp;#34;30s&amp;#34;  // Increased from default 10s
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;solution-2-decrease-timeout-on-the-downstream-pyroscopewrite&#34;&gt;Solution 2: Decrease timeout on the downstream pyroscope.write&lt;/h4&gt;
&lt;p&gt;To ensure faster failures and allow time for retries, reduce the &lt;code&gt;remote_timeout&lt;/code&gt; on the downstream &lt;code&gt;pyroscope.write&lt;/code&gt; component:&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;w2&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-backend:4040&amp;#34;
    remote_timeout = &amp;#34;3s&amp;#34;  // Reduced from default 10s
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;important-considerations&#34;&gt;Important considerations&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Normal latency&lt;/strong&gt;: Pyroscope servers with the new architecture typically have 500-1000ms average latency for requests&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timeout buffer&lt;/strong&gt;: Always leave sufficient buffer time for retries when chaining components&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retry configuration&lt;/strong&gt;: Consider adjusting &lt;code&gt;max_backoff_retries&lt;/code&gt; and backoff periods alongside timeout values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;: Monitor the &lt;code&gt;pyroscope_write_latency&lt;/code&gt; metric to understand actual request latencies and adjust timeouts accordingly&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;This example creates a &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component, which starts an HTTP server listening on &lt;code&gt;0.0.0.0&lt;/code&gt; and port &lt;code&gt;9999&lt;/code&gt;.
The server receives profiles and forwards them to multiple &lt;code&gt;pyroscope.write&lt;/code&gt; components, which write these profiles to different HTTP endpoints.&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;// Receives profiles over HTTP
pyroscope.receive_http &amp;#34;default&amp;#34; {
  http {
    listen_address = &amp;#34;0.0.0.0&amp;#34;
    listen_port = 9999
  }
  forward_to = [pyroscope.write.staging.receiver, pyroscope.write.production.receiver]
}

// Send profiles to a staging Pyroscope instance
pyroscope.write &amp;#34;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-staging:4040&amp;#34;
  }
}

// Send profiles to a production Pyroscope instance
pyroscope.write &amp;#34;production&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-production:4040&amp;#34;
  }
}&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;This example demonstrates forwarding to multiple &lt;code&gt;pyroscope.write&lt;/code&gt; components.
This configuration duplicates the received profiles and sends a copy to each configured &lt;code&gt;pyroscope.write&lt;/code&gt; component.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;You can also create multiple &lt;code&gt;pyroscope.receive_http&lt;/code&gt; components with different configurations to listen on different addresses or ports as needed.
This flexibility allows you to design a setup that best fits your infrastructure and profile routing requirements.&lt;/p&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.receive_http&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopereceive_http">&lt;code>pyroscope.receive_http&lt;/code>&lt;/h1>
&lt;p>&lt;code>pyroscope.receive_http&lt;/code> receives profiles over HTTP and forwards them to &lt;code>pyroscope.*&lt;/code> components capable of receiving profiles.&lt;/p>
&lt;p>The HTTP API exposed is compatible with both the Pyroscope &lt;a href="/docs/pyroscope/latest/reference-server-api/">HTTP ingest API&lt;/a> and the &lt;a href="https://github.com/grafana/pyroscope/blob/main/api/push/v1/push.proto" target="_blank" rel="noopener noreferrer">pushv1.PusherService&lt;/a> Connect API.
This allows &lt;code>pyroscope.receive_http&lt;/code> to act as a proxy for Pyroscope profiles, enabling flexible routing and distribution of profile data.&lt;/p></description></item><item><title>pyroscope.relabel</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.relabel/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.relabel/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscoperelabel&#34;&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.relabel&lt;/code&gt; component rewrites the external label set of each profile passed to its receiver by applying one or more relabeling rules and forwards the results to the list of receivers.&lt;/p&gt;
&lt;p&gt;When no rules apply to a profile, the component forwards that profile as-is to each receiver in its arguments.
The component drops the profile when no external labels remain after it applies the rules.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt; only rewrites labels that aren&amp;rsquo;t embedded in the profile itself, such as labels inferred by &lt;code&gt;pyroscope.scrape&lt;/code&gt; or labels provided through the &lt;code&gt;/ingest?name=...&lt;/code&gt; query parameter.
It doesn&amp;rsquo;t parse or modify labels embedded inside profile payloads like pprof sample labels.&lt;/p&gt;
&lt;p&gt;The most common use of &lt;code&gt;pyroscope.relabel&lt;/code&gt; is to filter profiles or standardize external labels passed to one or more downstream receivers.
The component applies each &lt;code&gt;rule&lt;/code&gt; block to the label set of every profile in the order the blocks appear in your configuration file.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.relabel&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.relabel &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
    forward_to = &amp;lt;RECEIVER_LIST&amp;gt;

    rule {
        ...
    }

    ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;pyroscope.relabel&lt;/code&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;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 forward profiles to after relabeling&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;max_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of entries in the label cache&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10000&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;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following block with &lt;code&gt;pyroscope.relabel&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 1;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#rule\&amp;#34;\u003e\u003ccode\u003erule\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eRelabeling rules to apply to received profile entries.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&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;a href=&#34;#rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Relabeling rules to apply to received profile entries.&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;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;rule&#34;&gt;&lt;code&gt;rule&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/rule-block.md&#34;&gt;
            &lt;p&gt;The &lt;code&gt;rule&lt;/code&gt; block contains the definition of any relabeling rules that can be applied to an input metric.
If more than one &lt;code&gt;rule&lt;/code&gt; block is defined, the transformations are applied in top-down order.&lt;/p&gt;
&lt;p&gt;The following arguments can be used to configure a &lt;code&gt;rule&lt;/code&gt;.
All arguments are optional. Omitted fields take their default values.&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;action&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The relabeling action to perform.&lt;/td&gt;
              &lt;td&gt;replace&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;modulus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;uint&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A positive integer used to calculate the modulus of the hashed source label values.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;regex&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A valid RE2 expression with support for parenthesized capture groups. Used to match the extracted value from the combination of the &lt;code&gt;source_label&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt; fields or filter labels during the &lt;code&gt;labelkeep/labeldrop/labelmap&lt;/code&gt; actions.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;(.*)&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;replacement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value against which a regular expression replace is performed, if the regular expression matches the extracted value. Supports previously captured groups.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;$1&amp;quot;&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;separator&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The separator used to concatenate the values present in &lt;code&gt;source_labels&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;source_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of labels whose values are to be selected. Their content is concatenated using the &lt;code&gt;separator&lt;/code&gt; and matched against &lt;code&gt;regex&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;target_label&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Label to which the resulting value will be written to.&lt;/td&gt;
              &lt;td&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;p&gt;You can use the following actions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;drop&lt;/code&gt;      - Drops metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dropequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; do match &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hashmod&lt;/code&gt;   - Hashes the concatenated labels, calculates its modulo &lt;code&gt;modulus&lt;/code&gt; and writes the result to the &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keep&lt;/code&gt;      - Keeps metrics where &lt;code&gt;regex&lt;/code&gt; matches the string extracted using the &lt;code&gt;source_labels&lt;/code&gt; and &lt;code&gt;separator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;keepequal&lt;/code&gt; - Drop targets for which the concatenated &lt;code&gt;source_labels&lt;/code&gt; don&amp;rsquo;t match &lt;code&gt;target_label&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labeldrop&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelkeep&lt;/code&gt; - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that don&amp;rsquo;t match are removed from the metric&amp;rsquo;s label set.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;labelmap&lt;/code&gt;  - Matches &lt;code&gt;regex&lt;/code&gt; against all label names. Any labels that match are renamed according to the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lowercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the lowercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;replace&lt;/code&gt;   - Matches &lt;code&gt;regex&lt;/code&gt; to the concatenated labels. If there&amp;rsquo;s a match, it replaces the content of the &lt;code&gt;target_label&lt;/code&gt; using the contents of the &lt;code&gt;replacement&lt;/code&gt; field.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;uppercase&lt;/code&gt; - Sets &lt;code&gt;target_label&lt;/code&gt; to the uppercase form of the concatenated &lt;code&gt;source_labels&lt;/code&gt;.&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;The regular expression capture groups can be referred to using either the &lt;code&gt;$CAPTURE_GROUP_NUMBER&lt;/code&gt; or &lt;code&gt;${CAPTURE_GROUP_NUMBER}&lt;/code&gt; notation.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A receiver that accepts profiles for relabeling.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;RelabelRules&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The list of relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following Prometheus metrics are exposed:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_cache_hits&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of cache hits.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_cache_misses&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of cache misses.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gauge&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total size of relabel cache.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_profiles_dropped&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of profiles dropped by relabeling rules.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_profiles_processed&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of profiles processed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_relabel_profiles_written&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of profiles forwarded.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write latency for sending to direct and indirect components.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_forwarded_entries_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of samples sent to downstream components.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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.receive_http &amp;#34;default&amp;#34; {
    forward_to = [pyroscope.relabel.filter_profiles.receiver]

    http {
        listen_address = &amp;#34;0.0.0.0&amp;#34;
        listen_port = 9999
    }
}

pyroscope.relabel &amp;#34;filter_profiles&amp;#34; {
    forward_to = [pyroscope.write.staging.receiver]

    // This creates a consistent hash value (0 or 1) for each unique combination of labels
    // Using multiple source labels provides better sampling distribution across your profiles
    rule {
        source_labels = [&amp;#34;env&amp;#34;]
        target_label = &amp;#34;__tmp_hash&amp;#34;
        action = &amp;#34;hashmod&amp;#34;
        modulus = 2
    }

    // This effectively samples ~50% of profile series
    // The same combination of source label values will always hash to the same number,
    // ensuring consistent sampling
    rule {
        source_labels = [&amp;#34;__tmp_hash&amp;#34;]
        action       = &amp;#34;drop&amp;#34;
        regex        = &amp;#34;^1$&amp;#34;
    }
}

pyroscope.write &amp;#34;staging&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-staging:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;pyroscope.relabel&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-consumers&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscoperelabel">&lt;code>pyroscope.relabel&lt;/code>&lt;/h1>
&lt;p>The &lt;code>pyroscope.relabel&lt;/code> component rewrites the external label set of each profile passed to its receiver by applying one or more relabeling rules and forwards the results to the list of receivers.&lt;/p></description></item><item><title>pyroscope.scrape</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.scrape/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.scrape/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopescrape&#34;&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; collects &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; performance profiles for a given set of HTTP &lt;code&gt;targets&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; mimics the scraping behavior of &lt;code&gt;prometheus.scrape&lt;/code&gt;.
Similarly to how Prometheus scrapes metrics via HTTP, &lt;code&gt;pyroscope.scrape&lt;/code&gt; collects profiles via HTTP requests.&lt;/p&gt;
&lt;p&gt;Unlike Prometheus, which usually only scrapes one &lt;code&gt;/metrics&lt;/code&gt; endpoint per target, &lt;code&gt;pyroscope.scrape&lt;/code&gt; may need to scrape multiple endpoints for the same target.
This is because the component scrapes different profile types from different endpoints.
For example, the component may scrape mutex profiles from a &lt;code&gt;/debug/pprof/delta_mutex&lt;/code&gt; HTTP endpoint, and memory consumption from a &lt;code&gt;/debug/pprof/allocs&lt;/code&gt; HTTP endpoint.&lt;/p&gt;
&lt;p&gt;You can configure the profile paths, protocol scheme, scrape interval, scrape timeout, query parameters, and any other settings within &lt;code&gt;pyroscope.scrape&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.scrape&lt;/code&gt; component regards a scrape as successful if it responded with an HTTP &lt;code&gt;200 OK&lt;/code&gt; status code and returned the body of a valid &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; profile.&lt;/p&gt;
&lt;p&gt;If a scrape request fails, the &lt;a href=&#34;../../../../troubleshoot/debug/&#34;&gt;debug UI&lt;/a&gt; for &lt;code&gt;pyroscope.scrape&lt;/code&gt; shows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Detailed information about the failure.&lt;/li&gt;
&lt;li&gt;The time of the last successful scrape.&lt;/li&gt;
&lt;li&gt;The labels last used for scraping.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component can forward the scraped performance profiles to components such as &lt;code&gt;pyroscope.write&lt;/code&gt; through the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.scrape&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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.scrape &amp;#34;&amp;lt;LABEL&amp;gt;&amp;#34; {
  targets    = &amp;lt;TARGET_LIST&amp;gt;
  forward_to = &amp;lt;RECEIVER_LIST&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; starts a scrape job to scrape all of the input targets.
The component can start multiple scrape jobs for a single input target when it scrapes multiple profile types.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with &lt;code&gt;pyroscope.scrape&lt;/code&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;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 scraped 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;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 scrape.&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;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;delta_profiling_duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;How long to scrape a delta profile. Must be larger than 1 second.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;14s&amp;quot;&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;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to support HTTP2 for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to follow redirects from the server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to send with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;job_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The job name to override the job label with.&lt;/td&gt;
              &lt;td&gt;component name&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A set of query parameters to send when scraping the target.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to send requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The URL scheme with which to fetch profiles from targets.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;http&amp;quot;&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;scrape_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 scrape the targets of this scrape configuration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;15s&amp;quot;&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;scrape_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The timeout for scraping targets of this configuration.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&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;p&gt;You can provide at most one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#arguments&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Any omitted arguments take on their default values.
If you pass conflicting arguments, for example, configuring both &lt;code&gt;bearer_token&lt;/code&gt; and &lt;code&gt;bearer_token_file&lt;/code&gt;, then &lt;code&gt;pyroscope.scrape&lt;/code&gt; fails to start and reports an error.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain names can contain port numbers.
&lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof).
Requests use the proxy from the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;h3 id=&#34;job_name&#34;&gt;&lt;code&gt;job_name&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;job_name&lt;/code&gt; argument defaults to the component&amp;rsquo;s unique identifier.&lt;/p&gt;
&lt;p&gt;For example, the &lt;code&gt;job_name&lt;/code&gt; of &lt;code&gt;pyroscope.scrape &amp;quot;local&amp;quot; { ... }&lt;/code&gt; is &lt;code&gt;&amp;quot;pyroscope.scrape.local&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;targets&#34;&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;You can define the list of &lt;code&gt;targets&lt;/code&gt; &lt;a href=&#34;#default-endpoints-of-static-targets&#34;&gt;statically&lt;/a&gt;, &lt;a href=&#34;#default-endpoints-of-dynamic-targets&#34;&gt;dynamically&lt;/a&gt;, or as a &lt;a href=&#34;#default-endpoints-of-static-and-dynamic-targets&#34;&gt;combination of both&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following special labels can change the behavior of &lt;code&gt;pyroscope.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__address__&lt;/code&gt; is the special label that &lt;em&gt;must always&lt;/em&gt; be present and corresponds to the &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; that&amp;rsquo;s used for the scrape request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt; is the special label that indicates which profile type the component collects.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__profile_path__&lt;/code&gt; is the special label that holds the path to the profile endpoint on the target (for example, &amp;ldquo;/debug/pprof/allocs&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__profile_path_prefix__&lt;/code&gt; is the special label that holds an optional prefix to prepend to the profile path (for example, &lt;code&gt;&amp;quot;/mimir-prometheus&amp;quot;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service_name&lt;/code&gt; is a required label that identifies the service you profile.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component treats labels that start with a double underscore as &lt;em&gt;internal&lt;/em&gt; and removes them before scraping.&lt;/p&gt;
&lt;p&gt;Every profile carries a &lt;code&gt;service_name&lt;/code&gt; label.
You can set it on the target yourself.
If you don&amp;rsquo;t, &lt;code&gt;pyroscope.scrape&lt;/code&gt; adds the label and infers a value from the following sources, in this order:&lt;/p&gt;
&lt;ol&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; or &lt;code&gt;__meta_dockerswarm_service_name&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you don&amp;rsquo;t set &lt;code&gt;service_name&lt;/code&gt; and the component can&amp;rsquo;t infer a value, it uses &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The component injects the following labels into the scraped profiles so that you can link them to a scrape 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;&amp;quot;job&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;job_name&lt;/code&gt; that the target belongs to.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;instance&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The &lt;code&gt;__address__&lt;/code&gt; or &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt; of the scrape target&amp;rsquo;s URL.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;service_name&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The inferred Pyroscope service name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otel.scope.name&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The instrumentation scope name, set to &lt;code&gt;com.grafana.alloy/pyroscope.scrape&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;otel.scope.version&amp;quot;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The Alloy version that produced the profile.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Alloy only sets &lt;code&gt;otel.scope.name&lt;/code&gt; and &lt;code&gt;otel.scope.version&lt;/code&gt; if they aren&amp;rsquo;t already present on the scraped profile.
&lt;code&gt;otel.scope.version&lt;/code&gt; is only set when &lt;code&gt;otel.scope.name&lt;/code&gt; matches the default value.&lt;/p&gt;
&lt;h4 id=&#34;scrape_interval&#34;&gt;&lt;code&gt;scrape_interval&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;scrape_interval&lt;/code&gt; typically refers to the frequency with which Alloy collects performance profiles from the monitored targets.
It represents the time interval between consecutive scrapes or data collection events.
This parameter is important for controlling the trade-off between resource usage and the freshness of the collected data.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;scrape_interval&lt;/code&gt; is short:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advantages:
&lt;ul&gt;
&lt;li&gt;The component loses fewer profiles if the scraped application crashes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disadvantages:
&lt;ul&gt;
&lt;li&gt;Greater consumption of CPU, memory, and network resources during scrapes and remote writes.&lt;/li&gt;
&lt;li&gt;The backend database (Pyroscope) consumes more storage space.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If &lt;code&gt;scrape_interval&lt;/code&gt; is long:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advantages:
&lt;ul&gt;
&lt;li&gt;Lower resource consumption.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disadvantages:
&lt;ul&gt;
&lt;li&gt;The component loses more profiles if the scraped application crashes.&lt;/li&gt;
&lt;li&gt;If you set the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; to &lt;code&gt;true&lt;/code&gt;, the batch size of each remote write to Pyroscope may be bigger.
You may need to tune the Pyroscope database with higher limits.&lt;/li&gt;
&lt;li&gt;If you set the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; to &lt;code&gt;true&lt;/code&gt;, you run a larger risk of reaching the HTTP server timeouts of the scraped application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, consider this situation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You configure &lt;code&gt;pyroscope.scrape&lt;/code&gt; with a &lt;code&gt;scrape_interval&lt;/code&gt; of &lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The scraped application runs an HTTP server with a timeout of 30 seconds.&lt;/li&gt;
&lt;li&gt;Any scrape HTTP requests where you set the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; to &lt;code&gt;true&lt;/code&gt; fail, because they attempt to run for 59 seconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;pyroscope.scrape&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 17;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#clustering\&amp;#34;\u003e\u003ccode\u003eclustering\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure the component for when Alloy is running in clustered mode.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to targets via OAuth2.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#profiling_config\&amp;#34;\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure profiling settings for the scrape job.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profileblock\&amp;#34;\u003e\u003ccode\u003eprofile.block\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect profiles on blocks.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilecustom\&amp;#34;\u003e\u003ccode\u003eprofile.custom\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect custom profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilefgprof\&amp;#34;\u003e\u003ccode\u003eprofile.fgprof\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect \u003ca href=\&amp;#34;https://github.com/felixge/fgprof\&amp;#34; target=\&amp;#34;_blank\&amp;#34; rel=\&amp;#34;noopener noreferrer\&amp;#34;\u003e\u003ccode\u003efgprof\u003c/code\u003e\u003c/a\u003e profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilegodeltaprof_block\&amp;#34;\u003e\u003ccode\u003eprofile.godeltaprof_block\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect \u003ca href=\&amp;#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof\&amp;#34; target=\&amp;#34;_blank\&amp;#34; rel=\&amp;#34;noopener noreferrer\&amp;#34;\u003e\u003ccode\u003egodeltaprof\u003c/code\u003e\u003c/a\u003e block profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilegodeltaprof_memory\&amp;#34;\u003e\u003ccode\u003eprofile.godeltaprof_memory\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect \u003ca href=\&amp;#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof\&amp;#34; target=\&amp;#34;_blank\&amp;#34; rel=\&amp;#34;noopener noreferrer\&amp;#34;\u003e\u003ccode\u003egodeltaprof\u003c/code\u003e\u003c/a\u003e memory profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilegodeltaprof_mutex\&amp;#34;\u003e\u003ccode\u003eprofile.godeltaprof_mutex\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect \u003ca href=\&amp;#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof\&amp;#34; target=\&amp;#34;_blank\&amp;#34; rel=\&amp;#34;noopener noreferrer\&amp;#34;\u003e\u003ccode\u003egodeltaprof\u003c/code\u003e\u003c/a\u003e mutex profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilegoroutine\&amp;#34;\u003e\u003ccode\u003eprofile.goroutine\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect goroutine profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilememory\&amp;#34;\u003e\u003ccode\u003eprofile.memory\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect memory profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profilemutex\&amp;#34;\u003e\u003ccode\u003eprofile.mutex\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect mutex profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eprofiling_config\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#profileprocess_cpu\&amp;#34;\u003e\u003ccode\u003eprofile.process_cpu\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eCollect CPU profiles.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to targets.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&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;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure the component for when Alloy is running in clustered mode.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to targets.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets via OAuth2.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#profiling_config&#34;&gt;&lt;code&gt;profiling_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure profiling settings for the scrape job.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profileblock&#34;&gt;&lt;code&gt;profile.block&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect profiles on blocks.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilecustom&#34;&gt;&lt;code&gt;profile.custom&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect custom profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilefgprof&#34;&gt;&lt;code&gt;profile.fgprof&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/felixge/fgprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;fgprof&lt;/code&gt;&lt;/a&gt; profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilegodeltaprof_block&#34;&gt;&lt;code&gt;profile.godeltaprof_block&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;godeltaprof&lt;/code&gt;&lt;/a&gt; block profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilegodeltaprof_memory&#34;&gt;&lt;code&gt;profile.godeltaprof_memory&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;godeltaprof&lt;/code&gt;&lt;/a&gt; memory profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilegodeltaprof_mutex&#34;&gt;&lt;code&gt;profile.godeltaprof_mutex&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;godeltaprof&lt;/code&gt;&lt;/a&gt; mutex profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilegoroutine&#34;&gt;&lt;code&gt;profile.goroutine&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect goroutine profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilememory&#34;&gt;&lt;code&gt;profile.memory&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect memory profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profilemutex&#34;&gt;&lt;code&gt;profile.mutex&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect mutex profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiling_config&lt;/code&gt; &amp;gt; &lt;a href=&#34;#profileprocess_cpu&#34;&gt;&lt;code&gt;profile.process_cpu&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Collect CPU profiles.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to targets.&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;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;p&gt;Any omitted blocks take on their default values.
For example, if you don&amp;rsquo;t specify &lt;code&gt;profile.mutex&lt;/code&gt; in the configuration, the component uses the defaults documented in &lt;a href=&#34;#profilemutex&#34;&gt;profile.mutex&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/authorization-block.md&#34;&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;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&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;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/basic-auth-block.md&#34;&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;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to a file that contains the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&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;p&gt;When you use &lt;code&gt;password_file&lt;/code&gt;, the file is read on every outgoing request that uses basic authentication.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside a &lt;code&gt;basic_auth&lt;/code&gt; block.&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;High scrape or write rates create repeated file reads when you use &lt;code&gt;password_file&lt;/code&gt;.
You can use the 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/components/local/local.file/&#34;&gt;&lt;code&gt;local.file&lt;/code&gt;&lt;/a&gt; component to read the password file and provide the content to the &lt;code&gt;password&lt;/code&gt; attribute.
This avoids repeated file reads because &lt;code&gt;local.file&lt;/code&gt; monitors the file and reads when it changes.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;clustering&#34;&gt;&lt;code&gt;clustering&lt;/code&gt;&lt;/h3&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enables sharing targets with other cluster nodes.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When Alloy is &lt;a href=&#34;../../../../get-started/clustering/&#34;&gt;using clustering&lt;/a&gt;, and you set &lt;code&gt;enabled&lt;/code&gt; to true, this &lt;code&gt;pyroscope.scrape&lt;/code&gt; component instance opts in to participating in the cluster to distribute scrape load between all cluster nodes.&lt;/p&gt;
&lt;p&gt;Clustering causes the set of targets to be locally filtered down to a unique subset per node, where each node is roughly assigned the same number of targets.
If the state of the cluster changes, such as when a node joins, the cluster recalculates the subset of targets to scrape per node.&lt;/p&gt;
&lt;p&gt;When you enable clustering mode, all Alloy instances participating in the cluster must use the same configuration file and have access to the same service discovery APIs.&lt;/p&gt;
&lt;p&gt;If Alloy is &lt;em&gt;not&lt;/em&gt; running in clustered mode, this block is a no-op.&lt;/p&gt;
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/oauth2-block.md&#34;&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;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to send requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&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;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain names can contain port numbers.
&lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof).
Requests use the proxy from the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        
&lt;h3 id=&#34;profiling_config&#34;&gt;&lt;code&gt;profiling_config&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profiling_config&lt;/code&gt; block configures the profiling settings when scraping targets.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profiling_config&lt;/code&gt; block:&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;path_prefix&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path prefix to use when scraping targets.&lt;/td&gt;
              &lt;td&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;h3 id=&#34;profileblock&#34;&gt;&lt;code&gt;profile.block&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.block&lt;/code&gt; block collects profiles on process blocking.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.block&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/block&amp;quot;&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;p&gt;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&lt;/p&gt;
&lt;h3 id=&#34;profilecustom&#34;&gt;&lt;code&gt;profile.custom&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.custom&lt;/code&gt; block collects profiles from custom endpoints.
You must give each block a label:&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;profile.custom &amp;#34;&amp;lt;PROFILE_TYPE&amp;gt;&amp;#34; {
  enabled = true
  path    = &amp;#34;&amp;lt;PROFILE_PATH&amp;gt;&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;profile.custom&lt;/code&gt; blocks.
Labels assigned to &lt;code&gt;profile.custom&lt;/code&gt; blocks must be unique across the component.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.custom&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;, a &lt;code&gt;seconds&lt;/code&gt; query parameter is automatically added to requests.
The &lt;code&gt;seconds&lt;/code&gt; used is equal to &lt;code&gt;scrape_interval - 1&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;profilefgprof&#34;&gt;&lt;code&gt;profile.fgprof&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.fgprof&lt;/code&gt; block collects profiles from an &lt;a href=&#34;https://github.com/felixge/fgprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;fgprof&lt;/a&gt; endpoint.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.fgprof&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/fgprof&amp;quot;&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;p&gt;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&lt;/p&gt;
&lt;h3 id=&#34;profilegodeltaprof_block&#34;&gt;&lt;code&gt;profile.godeltaprof_block&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_block&lt;/code&gt; block collects profiles from the &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; block endpoint. The target computes the delta.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.godeltaprof_block&lt;/code&gt; block:&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/delta_block&amp;quot;&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;h3 id=&#34;profilegodeltaprof_memory&#34;&gt;&lt;code&gt;profile.godeltaprof_memory&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_memory&lt;/code&gt; block collects profiles from the &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; memory endpoint. The target computes the delta.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.godeltaprof_memory&lt;/code&gt; block:&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/delta_heap&amp;quot;&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;h3 id=&#34;profilegodeltaprof_mutex&#34;&gt;&lt;code&gt;profile.godeltaprof_mutex&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.godeltaprof_mutex&lt;/code&gt; block collects profiles from the &lt;a href=&#34;https://github.com/grafana/pyroscope-go/tree/main/godeltaprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;godeltaprof&lt;/a&gt; mutex endpoint.
The target computes the delta.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.godeltaprof_mutex&lt;/code&gt; block:&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/delta_mutex&amp;quot;&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;h3 id=&#34;profilegoroutine&#34;&gt;&lt;code&gt;profile.goroutine&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.goroutine&lt;/code&gt; block collects profiles on the number of goroutines.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.goroutine&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/goroutine&amp;quot;&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;p&gt;Refer to &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; for more information about the &lt;code&gt;delta&lt;/code&gt; argument.&lt;/p&gt;
&lt;h3 id=&#34;profilememory&#34;&gt;&lt;code&gt;profile.memory&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.memory&lt;/code&gt; block collects profiles on memory consumption.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.memory&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/allocs&amp;quot;&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;p&gt;Refer to &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; for more information about the &lt;code&gt;delta&lt;/code&gt; argument.&lt;/p&gt;
&lt;h3 id=&#34;profilemutex&#34;&gt;&lt;code&gt;profile.mutex&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.mutex&lt;/code&gt; block collects profiles on mutexes.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.mutex&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/mutex&amp;quot;&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;p&gt;Refer to &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; for more information about the &lt;code&gt;delta&lt;/code&gt; argument.&lt;/p&gt;
&lt;h3 id=&#34;profileprocess_cpu&#34;&gt;&lt;code&gt;profile.process_cpu&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;profile.process_cpu&lt;/code&gt; block collects profiles on CPU consumption for the process.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;profile.process_cpu&lt;/code&gt; block:&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;delta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile as a delta.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;boolean&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable scraping for this profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to the profile type on the target.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;/debug/pprof/profile&amp;quot;&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;p&gt;For more information about the &lt;code&gt;delta&lt;/code&gt; argument, see the &lt;a href=&#34;#delta-argument&#34;&gt;delta argument&lt;/a&gt; section.&lt;/p&gt;
&lt;h3 id=&#34;tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/tls-config-block.md&#34;&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&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;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using &lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;) must be provided.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&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;If you set &lt;code&gt;insecure_skip_verify&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, you disable verification of the server&amp;rsquo;s certificate chain and hostname.
Alloy accepts any certificate the server presents, including expired, self-signed, or invalid certificates.&lt;/p&gt;
&lt;p&gt;You can use &lt;code&gt;insecure_skip_verify&lt;/code&gt; for local development, self-signed certificates, or endpoints that use a private CA outside the system trust store.
If the hostname doesn&amp;rsquo;t match the certificate, set &lt;code&gt;server_name&lt;/code&gt; instead of &lt;code&gt;insecure_skip_verify&lt;/code&gt;.
In production, use &lt;code&gt;ca_file&lt;/code&gt; or &lt;code&gt;ca_pem&lt;/code&gt; to trust a private CA instead of &lt;code&gt;insecure_skip_verify&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Set &lt;code&gt;insecure_skip_verify&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; only in isolated development or testing environments where you don&amp;rsquo;t transmit sensitive data.
Remove the setting before you deploy to production.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;common-configuration&#34;&gt;Common configuration&lt;/h2&gt;
&lt;p&gt;The following configuration applies across the profile types described in &lt;a href=&#34;#blocks&#34;&gt;Blocks&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;delta-argument&#34;&gt;&lt;code&gt;delta&lt;/code&gt; argument&lt;/h3&gt;
&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;false&lt;/code&gt;, the &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; HTTP query is instantaneous.&lt;/p&gt;
&lt;p&gt;When the &lt;code&gt;delta&lt;/code&gt; argument is &lt;code&gt;true&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href=&#34;https://github.com/google/pprof/blob/main/doc/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; HTTP query runs for a certain amount of time.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;seconds&lt;/code&gt; parameter is automatically added to the HTTP request.&lt;/li&gt;
&lt;li&gt;The default value for the &lt;code&gt;seconds&lt;/code&gt; query parameter is &lt;code&gt;scrape_interval - 1&lt;/code&gt;.
If you set &lt;code&gt;delta_profiling_duration&lt;/code&gt;, then &lt;code&gt;seconds&lt;/code&gt; takes the same value as &lt;code&gt;delta_profiling_duration&lt;/code&gt;.
However, the &lt;code&gt;delta_profiling_duration&lt;/code&gt; can&amp;rsquo;t be larger than &lt;code&gt;scrape_interval&lt;/code&gt;.
For example, if you set &lt;code&gt;scrape_interval&lt;/code&gt; to &lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt;, then &lt;code&gt;seconds&lt;/code&gt; defaults to &lt;code&gt;14s&lt;/code&gt;
If you set &lt;code&gt;delta_profiling_duration&lt;/code&gt; to &lt;code&gt;16s&lt;/code&gt;, then you must set &lt;code&gt;scrape_interval&lt;/code&gt; to at least &lt;code&gt;17s&lt;/code&gt;.
If the HTTP endpoint is &lt;code&gt;/debug/pprof/profile&lt;/code&gt;, then the HTTP query becomes &lt;code&gt;/debug/pprof/profile?seconds=14&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; doesn&amp;rsquo;t export any fields.&lt;/p&gt;
&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; reports the status of the last scrape for each configured scrape job on the component&amp;rsquo;s debug endpoint.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following Prometheus metrics are exposed:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write latency for sending to direct and indirect components.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_forwarded_entries_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of samples sent to downstream components.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to scrape profiles from static and dynamically discovered targets, and how to enable and disable specific profile types.&lt;/p&gt;
&lt;h3 id=&#34;default-endpoints-of-static-targets&#34;&gt;Default endpoints of static targets&lt;/h3&gt;
&lt;p&gt;The following example sets up a scrape job of a statically configured list of targets - Alloy itself and Pyroscope.
The component sends the scraped profiles to &lt;code&gt;pyroscope.write&lt;/code&gt;, which remote writes them to a Pyroscope database.&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.scrape &amp;#34;local&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:4040&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;alloy&amp;#34;},
  ]

  forward_to = [pyroscope.write.local.receiver]
}

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component scrapes these endpoints every 15 seconds:&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;text&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-text&#34;&gt;http://localhost:4040/debug/pprof/allocs
http://localhost:4040/debug/pprof/block
http://localhost:4040/debug/pprof/goroutine
http://localhost:4040/debug/pprof/mutex
http://localhost:4040/debug/pprof/profile?seconds=14

http://localhost:12345/debug/pprof/allocs
http://localhost:12345/debug/pprof/block
http://localhost:12345/debug/pprof/goroutine
http://localhost:12345/debug/pprof/mutex
http://localhost:12345/debug/pprof/profile?seconds=14&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component adds &lt;code&gt;seconds=14&lt;/code&gt; to the &lt;code&gt;/debug/pprof/profile&lt;/code&gt; endpoint, because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;delta&lt;/code&gt; argument of the &lt;code&gt;profile.process_cpu&lt;/code&gt; block is &lt;code&gt;true&lt;/code&gt; by default.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scrape_interval&lt;/code&gt; is &lt;code&gt;&amp;quot;15s&amp;quot;&lt;/code&gt; by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The component doesn&amp;rsquo;t scrape the &lt;code&gt;/debug/fgprof&lt;/code&gt; endpoint, because the &lt;code&gt;enabled&lt;/code&gt; argument of the &lt;code&gt;profile.fgprof&lt;/code&gt; block is &lt;code&gt;false&lt;/code&gt; by default.&lt;/p&gt;
&lt;h3 id=&#34;default-endpoints-of-dynamic-targets&#34;&gt;Default endpoints of dynamic targets&lt;/h3&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.http &amp;#34;dynamic_targets&amp;#34; {
  url = &amp;#34;https://example.com/scrape_targets&amp;#34;
  refresh_interval = &amp;#34;15s&amp;#34;
}

pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = [discovery.http.dynamic_targets.targets]

  forward_to = [pyroscope.write.local.receiver]
}

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;default-endpoints-of-static-and-dynamic-targets&#34;&gt;Default endpoints of static and dynamic targets&lt;/h3&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.http &amp;#34;dynamic_targets&amp;#34; {
  url = &amp;#34;https://example.com/scrape_targets&amp;#34;
  refresh_interval = &amp;#34;15s&amp;#34;
}

pyroscope.scrape &amp;#34;local&amp;#34; {
  targets = array.concat([
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:4040&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;alloy&amp;#34;},
  ], discovery.http.dynamic_targets.targets)

  forward_to = [pyroscope.write.local.receiver]
}

pyroscope.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;enable-and-disable-profiles&#34;&gt;Enable and disable profiles&lt;/h3&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.scrape &amp;#34;local&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;localhost:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;alloy&amp;#34;},
  ]

  profiling_config {
    profile.fgprof {
      enabled = true
    }
    profile.block {
      enabled = false
    }
    profile.mutex {
      enabled = false
    }
  }

  forward_to = [pyroscope.write.local.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The component scrapes these endpoints every 15 seconds:&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;text&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-text&#34;&gt;http://localhost:12345/debug/pprof/allocs
http://localhost:12345/debug/pprof/goroutine
http://localhost:12345/debug/pprof/profile?seconds=14
http://localhost:12345/debug/fgprof?seconds=14&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These endpoints are &lt;strong&gt;NOT&lt;/strong&gt; scraped because they&amp;rsquo;re explicitly disabled:&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;text&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-text&#34;&gt;http://localhost:12345/debug/pprof/block
http://localhost:12345/debug/pprof/mutex&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.scrape&lt;/code&gt; can accept arguments from the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#targets-exporters&#34;&gt;Targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Components that export &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-exporters&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopescrape">&lt;code>pyroscope.scrape&lt;/code>&lt;/h1>
&lt;p>&lt;code>pyroscope.scrape&lt;/code> collects &lt;a href="https://github.com/google/pprof/blob/main/doc/README.md" target="_blank" rel="noopener noreferrer">pprof&lt;/a> performance profiles for a given set of HTTP &lt;code>targets&lt;/code>.&lt;/p>
&lt;p>&lt;code>pyroscope.scrape&lt;/code> mimics the scraping behavior of &lt;code>prometheus.scrape&lt;/code>.
Similarly to how Prometheus scrapes metrics via HTTP, &lt;code>pyroscope.scrape&lt;/code> collects profiles via HTTP requests.&lt;/p></description></item><item><title>pyroscope.write</title><link>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.write/</link><pubDate>Wed, 07 Oct 2026 16:23:35 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/reference/components/pyroscope/pyroscope.write/</guid><content><![CDATA[&lt;h1 id=&#34;pyroscopewrite&#34;&gt;&lt;code&gt;pyroscope.write&lt;/code&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; receives performance profiles from other components and forwards them to a series of user-supplied endpoints.
When &lt;code&gt;pyroscope.write&lt;/code&gt; forwards profiles, it drops all labels that start with a double underscore, with the following exceptions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt;, because it identifies the profile type.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__delta__&lt;/code&gt;, because delta profiles require it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can specify multiple &lt;code&gt;pyroscope.write&lt;/code&gt; components by giving them different labels.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&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;&amp;lt;LABEL&amp;gt;&amp;#34; {
  endpoint {
    url = &amp;#34;&amp;lt;PYROSCOPE_URL&amp;gt;&amp;#34;

    ...
  }

  ...
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;p&gt;You can use the following argument with &lt;code&gt;pyroscope.write&lt;/code&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;external_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Labels to add to profiles sent over the network.&lt;/td&gt;
              &lt;td&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;blocks&#34;&gt;Blocks&lt;/h2&gt;
&lt;p&gt;You can use the following blocks with &lt;code&gt;pyroscope.write&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;config-app&#34; style=&#34;--config-tree-row-count: 6;&#34; x3-data=&#34;configVisualizer(&amp;#34;\u003csection class=\&amp;#34;expand-table-wrapper\&amp;#34;\u003e\u003cdiv class=\&amp;#34;button-div\&amp;#34;\u003e\n      \u003cbutton class=\&amp;#34;expand-table-btn\&amp;#34;\u003eExpand table\u003c/button\u003e\n    \u003c/div\u003e\u003cdiv class=\&amp;#34;responsive-table-wrapper\&amp;#34;\u003e\n    \u003ctable\u003e\n      \u003cthead\u003e\n          \u003ctr\u003e\n              \u003cth\u003eBlock\u003c/th\u003e\n              \u003cth\u003eDescription\u003c/th\u003e\n              \u003cth\u003eRequired\u003c/th\u003e\n          \u003c/tr\u003e\n      \u003c/thead\u003e\n      \u003ctbody\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ca href=\&amp;#34;#endpoint\&amp;#34;\u003e\u003ccode\u003eendpoint\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eLocation to send profiles to.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#authorization\&amp;#34;\u003e\u003ccode\u003eauthorization\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure generic authorization to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#basic_auth\&amp;#34;\u003e\u003ccode\u003ebasic_auth\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure \u003ccode\u003ebasic_auth\u003c/code\u003e for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#oauth2\&amp;#34;\u003e\u003ccode\u003eoauth2\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure OAuth 2.0 for authenticating to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ccode\u003eoauth2\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n          \u003ctr\u003e\n              \u003ctd\u003e\u003ccode\u003eendpoint\u003c/code\u003e \u0026gt; \u003ca href=\&amp;#34;#tls_config\&amp;#34;\u003e\u003ccode\u003etls_config\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n              \u003ctd\u003eConfigure TLS settings for connecting to the endpoint.\u003c/td\u003e\n              \u003ctd\u003eno\u003c/td\u003e\n          \u003c/tr\u003e\n      \u003c/tbody\u003e\n    \u003c/table\u003e\n  \u003c/div\u003e\n\u003c/section\u003e&amp;#34;)&#34;&gt;
  &lt;noscript&gt;
    &lt;div class=&#34;config-app__noscript&#34;&gt;&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Block&lt;/th&gt;
              &lt;th&gt;Description&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;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Location to send profiles to.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure generic authorization to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure &lt;code&gt;basic_auth&lt;/code&gt; for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure OAuth 2.0 for authenticating to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;code&gt;oauth2&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt; &amp;gt; &lt;a href=&#34;#tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure TLS settings for connecting to the endpoint.&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;/div&gt;
  &lt;/noscript&gt;
  &lt;main class=&#34;config-app__main&#34;&gt;
    &lt;template x3-if=&#34;flatBlocks.length === 0&#34;&gt;
      &lt;div class=&#34;empty-state&#34;&gt;
        &lt;div class=&#34;empty-state__icon&#34; x3-html=&#34;icons.AlertCircle&#34;&gt;&lt;/div&gt;
        &lt;p&gt;No valid configuration blocks found.&lt;/p&gt;
      &lt;/div&gt;
    &lt;/template&gt;

    &lt;template x3-if=&#34;flatBlocks.length &gt; 0&#34;&gt;
      &lt;div class=&#34;config-tree&#34;&gt;
        &lt;div class=&#34;config-tree__toolbar&#34;&gt;
          &lt;div class=&#34;config-tree__title&#34;&gt;&lt;/div&gt;
          &lt;button
            class=&#34;tree-explorer__button w-130 text-right&#34;
            x3-on:click=&#34;toggleExpandAll&#34;
            x3-bind:title=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;
          &gt;
            &lt;span x3-text=&#34;allExpanded ? &#39;Collapse all&#39; : &#39;Expand all&#39;&#34;&gt;&lt;/span&gt;
            &lt;svg class=&#34;api-icon&#34; viewBox=&#34;0 0 24 24&#34;&gt;
              &lt;path x3-show=&#34;!allExpanded&#34; d=&#34;m6 9 6 6 6-6&#34; /&gt;
              &lt;path x3-show=&#34;allExpanded&#34; d=&#34;m18 15-6-6-6 6&#34; /&gt;
            &lt;/svg&gt;
          &lt;/button&gt;
        &lt;/div&gt;

        &lt;div class=&#34;nodes-container&#34;&gt;
          &lt;template x3-for=&#34;block in flatBlocks&#34; x3-bind:key=&#34;block.id&#34;&gt;
            &lt;div class=&#34;node&#34; x3-bind:class=&#34;isNodeVisible(block) ? &#39;node--visible&#39; : &#39;node--hidden&#39;&#34;&gt;
              &lt;div
                class=&#34;node__row&#34;
                x3-bind:class=&#34;getRowClass(block)&#34;
                x3-bind:style=&#34;`padding-left: ${block.level * 24 &#43; 16}px`&#34;
                x3-on:click=&#34;toggleNode(block.id)&#34;
              &gt;
                &lt;div class=&#34;node__left&#34;&gt;
                  &lt;div class=&#34;node__indicator&#34;&gt;
                    &lt;template x3-if=&#34;block.hasChildren&#34;&gt;
                      &lt;button type=&#34;button&#34; class=&#34;node__toggle&#34; x3-on:click.stop=&#34;toggleNode(block.id)&#34;&gt;
                        &lt;div
                          class=&#34;node__toggle-icon&#34;
                          x3-bind:class=&#34;block.expanded ? &#39;node__toggle-icon--expanded&#39; : &#39;&#39;&#34;
                          x3-html=&#34;icons.ChevronDown&#34;
                        &gt;&lt;/div&gt;
                      &lt;/button&gt;
                    &lt;/template&gt;
                    &lt;template x3-if=&#34;!block.hasChildren&#34;&gt;
                      &lt;div class=&#34;node__toggle-spacer&#34;&gt;&lt;/div&gt;
                    &lt;/template&gt;
                  &lt;/div&gt;

                  &lt;div class=&#34;node__content&#34;&gt;
                    &lt;div
                      class=&#34;node__title prose&#34;
                      x3-bind:class=&#34;block.level === 0 ? &#39;node__title--root&#39; : &#39;node__title--nested&#39;&#34;
                      x3-html=&#34;block.displayName&#34;
                    &gt;&lt;/div&gt;
                    &lt;div class=&#34;node__description body-xsmall&#34; x3-html=&#34;block.description&#34;&gt;&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;

                &lt;div class=&#34;node__meta&#34;&gt;
                  &lt;span
                    class=&#34;badge&#34;
                    x3-bind:class=&#34;block.required ? &#39;badge--required&#39; : &#39;badge--optional&#39;&#34;
                    x3-text=&#34;block.required ? &#39;Required&#39; : &#39;Optional&#39;&#34;
                  &gt;&lt;/span&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/template&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/template&gt;
  &lt;/main&gt;
&lt;/div&gt;

&lt;h3 id=&#34;endpoint&#34;&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;endpoint&lt;/code&gt; block describes a single location to send profiles to.
You can provide multiple &lt;code&gt;endpoint&lt;/code&gt; blocks to send profiles to multiple locations.&lt;/p&gt;
&lt;p&gt;You can use the following arguments with the &lt;code&gt;endpoint&lt;/code&gt; block:&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;url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Full URL to send 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;bearer_token&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing a bearer token to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_http2&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to support HTTP2 for requests.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;follow_redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to follow redirects from the server.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Extra headers to deliver with the request.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Custom HTTP headers to send with each request. The map key is the header name.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_backoff_period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum backoff time between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;5m&amp;quot;&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;max_backoff_retries&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum number of retries. 0 to retry infinitely.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&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;min_backoff_period&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Initial backoff time between retries.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;500ms&amp;quot;&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;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional name to identify the endpoint in metrics.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to send requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;remote_timeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for requests made to the URL.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;10s&amp;quot;&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;retry_on_http_429&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Retry when the server returns an HTTP 429 status code.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&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;p&gt;You can provide at most one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;bearer_token_file&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#endpoint&#34;&gt;&lt;code&gt;bearer_token&lt;/code&gt;&lt;/a&gt; argument&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/a&gt; block&lt;/li&gt;
&lt;/ul&gt;


&lt;div data-shared=&#34;reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain names can contain port numbers.
&lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof).
Requests use the proxy from the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;p&gt;When you provide multiple &lt;code&gt;endpoint&lt;/code&gt; blocks, profiles are concurrently forwarded to all configured locations.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;retry_on_http_429&lt;/code&gt; argument controls whether the component treats &lt;code&gt;HTTP 429&lt;/code&gt; responses as recoverable errors.
Other &lt;code&gt;HTTP 4xx&lt;/code&gt; status code responses are never considered recoverable errors, with the exception of &lt;code&gt;HTTP 408 Request Timeout&lt;/code&gt;, which is always retried.
When you enable &lt;code&gt;retry_on_http_429&lt;/code&gt;, the &lt;code&gt;min_backoff_period&lt;/code&gt;, &lt;code&gt;max_backoff_period&lt;/code&gt;, and &lt;code&gt;max_backoff_retries&lt;/code&gt; arguments control the retry backoff.&lt;/p&gt;
&lt;h3 id=&#34;authorization&#34;&gt;&lt;code&gt;authorization&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/authorization-block.md&#34;&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;credentials_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;credentials&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Secret value.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Authorization type, for example, &amp;ldquo;Bearer&amp;rdquo;.&lt;/td&gt;
              &lt;td&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;p&gt;&lt;code&gt;credential&lt;/code&gt; and &lt;code&gt;credentials_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside an &lt;code&gt;authorization&lt;/code&gt; block.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Using &lt;code&gt;credentials_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;credentials&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;basic_auth&#34;&gt;&lt;code&gt;basic_auth&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/basic-auth-block.md&#34;&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;password_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Path to a file that contains the basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;password&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth password.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;username&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Basic auth username.&lt;/td&gt;
              &lt;td&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;p&gt;When you use &lt;code&gt;password_file&lt;/code&gt;, the file is read on every outgoing request that uses basic authentication.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;password&lt;/code&gt; and &lt;code&gt;password_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside a &lt;code&gt;basic_auth&lt;/code&gt; block.&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;High scrape or write rates create repeated file reads when you use &lt;code&gt;password_file&lt;/code&gt;.
You can use the 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/components/local/local.file/&#34;&gt;&lt;code&gt;local.file&lt;/code&gt;&lt;/a&gt; component to read the password file and provide the content to the &lt;code&gt;password&lt;/code&gt; attribute.
This avoids repeated file reads because &lt;code&gt;local.file&lt;/code&gt; monitors the file and reads when it changes.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h3 id=&#34;oauth2&#34;&gt;&lt;code&gt;oauth2&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/oauth2-block.md&#34;&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;client_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;File containing the OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;client_secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;OAuth2 client secret.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint_params&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Optional parameters to append to the token URL.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;no_proxy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Comma-separated list of IP addresses, CIDR notations, and domain names to exclude from proxying.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;map(list(secret))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies headers to send to proxies during CONNECT requests.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Use the proxy URL indicated by environment variables.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&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;proxy_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;HTTP proxy to send requests through.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;scopes&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(string)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of scopes to authenticate with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;token_url&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL to fetch the token from.&lt;/td&gt;
              &lt;td&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;p&gt;&lt;code&gt;client_secret&lt;/code&gt; and &lt;code&gt;client_secret_file&lt;/code&gt; are mutually exclusive, and only one can be provided inside an &lt;code&gt;oauth2&lt;/code&gt; block.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Using &lt;code&gt;client_secret_file&lt;/code&gt; causes the file to be read on every outgoing request.
Use the &lt;code&gt;local.file&lt;/code&gt; component with the &lt;code&gt;client_secret&lt;/code&gt; attribute instead to avoid unnecessary reads.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;oauth2&lt;/code&gt; block may also contain a separate &lt;code&gt;tls_config&lt;/code&gt; sub-block.&lt;/p&gt;


&lt;div data-shared=&#34;reference/components/http-client-proxy-config-description.md&#34;&gt;
            &lt;p&gt;&lt;code&gt;no_proxy&lt;/code&gt; can contain IPs, CIDR notations, and domain names. IP and domain names can contain port numbers.
&lt;code&gt;proxy_url&lt;/code&gt; must be configured if &lt;code&gt;no_proxy&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_from_environment&lt;/code&gt; uses the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof).
Requests use the proxy from the environment variable matching their scheme, unless excluded by NO_PROXY.
&lt;code&gt;proxy_url&lt;/code&gt; and &lt;code&gt;no_proxy&lt;/code&gt; must not be configured if &lt;code&gt;proxy_from_environment&lt;/code&gt; is configured.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;proxy_connect_header&lt;/code&gt; should only be configured if &lt;code&gt;proxy_url&lt;/code&gt; or &lt;code&gt;proxy_from_environment&lt;/code&gt; are configured.&lt;/p&gt;
&lt;/div&gt;

        
&lt;/div&gt;

        
&lt;h3 id=&#34;tls_config&#34;&gt;&lt;code&gt;tls_config&lt;/code&gt;&lt;/h3&gt;


&lt;div data-shared=&#34;reference/components/tls-config-block.md&#34;&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;ca_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA PEM-encoded text to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ca_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate to validate the server with.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate PEM-encoded text for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cert_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Certificate file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables validation of the server certificate.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_file&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key file for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;key_pem&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;secret&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Key PEM-encoded text for client authentication.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;min_version&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Minimum acceptable TLS version.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;no&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;server_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;ServerName extension to indicate the name of the server.&lt;/td&gt;
              &lt;td&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;p&gt;The following pairs of arguments are mutually exclusive and can&amp;rsquo;t both be set simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ca_pem&lt;/code&gt; and &lt;code&gt;ca_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cert_pem&lt;/code&gt; and &lt;code&gt;cert_file&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;key_pem&lt;/code&gt; and &lt;code&gt;key_file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When configuring client authentication, both the client certificate (using &lt;code&gt;cert_pem&lt;/code&gt; or &lt;code&gt;cert_file&lt;/code&gt;) and the client key (using &lt;code&gt;key_pem&lt;/code&gt; or &lt;code&gt;key_file&lt;/code&gt;) must be provided.&lt;/p&gt;
&lt;p&gt;When &lt;code&gt;min_version&lt;/code&gt; isn&amp;rsquo;t provided, the minimum acceptable TLS version is inherited from Go&amp;rsquo;s default minimum version, TLS 1.2.
If &lt;code&gt;min_version&lt;/code&gt; is provided, it must be set to one of the following strings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS10&amp;quot;&lt;/code&gt; (TLS 1.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS11&amp;quot;&lt;/code&gt; (TLS 1.1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS12&amp;quot;&lt;/code&gt; (TLS 1.2)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;TLS13&amp;quot;&lt;/code&gt; (TLS 1.3)&lt;/li&gt;
&lt;/ul&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;If you set &lt;code&gt;insecure_skip_verify&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;, you disable verification of the server&amp;rsquo;s certificate chain and hostname.
Alloy accepts any certificate the server presents, including expired, self-signed, or invalid certificates.&lt;/p&gt;
&lt;p&gt;You can use &lt;code&gt;insecure_skip_verify&lt;/code&gt; for local development, self-signed certificates, or endpoints that use a private CA outside the system trust store.
If the hostname doesn&amp;rsquo;t match the certificate, set &lt;code&gt;server_name&lt;/code&gt; instead of &lt;code&gt;insecure_skip_verify&lt;/code&gt;.
In production, use &lt;code&gt;ca_file&lt;/code&gt; or &lt;code&gt;ca_pem&lt;/code&gt; to trust a private CA instead of &lt;code&gt;insecure_skip_verify&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Set &lt;code&gt;insecure_skip_verify&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; only in isolated development or testing environments where you don&amp;rsquo;t transmit sensitive data.
Remove the setting before you deploy to production.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;

        
&lt;h2 id=&#34;exported-fields&#34;&gt;Exported fields&lt;/h2&gt;
&lt;p&gt;The following fields are exported and can be referenced by other components:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;receiver&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A value that other components can use to send profiles to.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;component-health&#34;&gt;Component health&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; is only reported as unhealthy if given an invalid configuration.
In those cases, exported fields retain their last healthy values.&lt;/p&gt;
&lt;h2 id=&#34;debug-information&#34;&gt;Debug information&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; doesn&amp;rsquo;t expose any component-specific debug information.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;The following Prometheus metrics are exposed:&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;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_sent_bytes_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of compressed bytes sent to Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_dropped_bytes_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of compressed bytes dropped by Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_sent_profiles_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of profiles sent to Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_dropped_profiles_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of profiles dropped by Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_retries_total&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;counter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total number of retries to Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;pyroscope_write_latency&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Write latency for sending profiles to Pyroscope endpoints.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;All metrics include an &lt;code&gt;endpoint&lt;/code&gt; label identifying the specific endpoint URL.
The &lt;code&gt;pyroscope_write_latency&lt;/code&gt; metric includes an additional &lt;code&gt;type&lt;/code&gt; label with the following values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;push_total&lt;/code&gt;: Total latency for push operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;push_endpoint&lt;/code&gt;: Per-endpoint latency for push operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;push_downstream&lt;/code&gt;: Downstream request latency for push operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ingest_total&lt;/code&gt;: Total latency for ingest operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ingest_endpoint&lt;/code&gt;: Per-endpoint latency for ingest operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ingest_downstream&lt;/code&gt;: Downstream request latency for ingest operations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the &lt;code&gt;push_total&lt;/code&gt; and &lt;code&gt;ingest_total&lt;/code&gt; types, the &lt;code&gt;endpoint&lt;/code&gt; label is &lt;code&gt;-&lt;/code&gt; because these series aggregate across all endpoints rather than identifying a single one.&lt;/p&gt;
&lt;h2 id=&#34;troubleshoot&#34;&gt;Troubleshoot&lt;/h2&gt;


&lt;div data-shared=&#34;reference/components/pyroscope-troubleshooting.md&#34;&gt;
            &lt;h3 id=&#34;connection-limit-errors&#34;&gt;Connection limit errors&lt;/h3&gt;
&lt;p&gt;When using &lt;code&gt;pyroscope.write&lt;/code&gt; to push profiles to a &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component, you may encounter errors like:&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;text&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-text&#34;&gt;&amp;#34;failed to push to endpoint&amp;#34; err=&amp;#34;deadline_exceeded: context deadline exceeded&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This typically indicates that the receiving component has reached its TCP connection limit.&lt;/p&gt;
&lt;p&gt;To resolve connection limit errors, first diagnose the issue, then apply one of the solutions.&lt;/p&gt;
&lt;h4 id=&#34;diagnose-connection-limit-issues&#34;&gt;Diagnose connection limit issues&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check the connection metrics on the &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections&lt;/code&gt;: Current number of accepted TCP connections&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections_limit&lt;/code&gt;: Maximum number of TCP connections allowed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the current connections are approaching or at the limit, you need to take action.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;solution-1-increase-the-connection-limit&#34;&gt;Solution 1: Increase the connection limit&lt;/h4&gt;
&lt;p&gt;To increase the connection limit, increase the &lt;code&gt;conn_limit&lt;/code&gt; parameter in the &lt;code&gt;pyroscope.receive_http&lt;/code&gt; configuration:&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.receive_http &amp;#34;example&amp;#34; {
  http {
    conn_limit = 32768  // Increase from default 16384
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;solution-2-horizontal-scaling&#34;&gt;Solution 2: Horizontal scaling&lt;/h4&gt;
&lt;p&gt;To distribute the connection load across multiple receivers, deploy multiple instances of &lt;code&gt;pyroscope.receive_http&lt;/code&gt; behind a load balancer.&lt;/p&gt;
&lt;h3 id=&#34;timeout-chain-issues&#34;&gt;Timeout chain issues&lt;/h3&gt;
&lt;p&gt;When chaining multiple Pyroscope components such as &lt;code&gt;pyroscope.write&lt;/code&gt; to &lt;code&gt;pyroscope.receive_http&lt;/code&gt; to another &lt;code&gt;pyroscope.write&lt;/code&gt;, you may encounter timeout issues that prevent retries:&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;text&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-text&#34;&gt;&amp;#34;failed to push to endpoint&amp;#34; err=&amp;#34;deadline_exceeded: context deadline exceeded&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;understand-the-problem&#34;&gt;Understand the problem&lt;/h4&gt;
&lt;p&gt;This issue occurs when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The first &lt;code&gt;pyroscope.write&lt;/code&gt; component sends profiles to &lt;code&gt;pyroscope.receive_http&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;pyroscope.receive_http&lt;/code&gt; component forwards profiles to another &lt;code&gt;pyroscope.write&lt;/code&gt; component.&lt;/li&gt;
&lt;li&gt;Both &lt;code&gt;pyroscope.write&lt;/code&gt; components have the same default &lt;code&gt;remote_timeout&lt;/code&gt; of 10 seconds.&lt;/li&gt;
&lt;li&gt;The request context passes from the first &lt;code&gt;pyroscope.write&lt;/code&gt; through &lt;code&gt;pyroscope.receive_http&lt;/code&gt; to the second &lt;code&gt;pyroscope.write&lt;/code&gt;, maintaining the original 10-second deadline.&lt;/li&gt;
&lt;li&gt;If the second &lt;code&gt;pyroscope.write&lt;/code&gt; component&amp;rsquo;s downstream request takes the full 10 seconds due to a broken TCP idle connection, there&amp;rsquo;s no time left for retries.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To resolve timeout chain issues, apply one of the following solutions.&lt;/p&gt;
&lt;h4 id=&#34;solution-1-increase-timeout-on-the-first-pyroscopewrite&#34;&gt;Solution 1: Increase timeout on the first pyroscope.write&lt;/h4&gt;
&lt;p&gt;To provide buffer time for retries, increase the &lt;code&gt;remote_timeout&lt;/code&gt; on the initial &lt;code&gt;pyroscope.write&lt;/code&gt; component:&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;w1&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-receiver:8080&amp;#34;
    remote_timeout = &amp;#34;30s&amp;#34;  // Increased from default 10s
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;solution-2-decrease-timeout-on-the-downstream-pyroscopewrite&#34;&gt;Solution 2: Decrease timeout on the downstream pyroscope.write&lt;/h4&gt;
&lt;p&gt;To ensure faster failures and allow time for retries, reduce the &lt;code&gt;remote_timeout&lt;/code&gt; on the downstream &lt;code&gt;pyroscope.write&lt;/code&gt; component:&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;w2&amp;#34; {
  endpoint {
    url = &amp;#34;http://pyroscope-backend:4040&amp;#34;
    remote_timeout = &amp;#34;3s&amp;#34;  // Reduced from default 10s
    // ... other settings
  }
  // ... rest of configuration
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;important-considerations&#34;&gt;Important considerations&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Normal latency&lt;/strong&gt;: Pyroscope servers with the new architecture typically have 500-1000ms average latency for requests&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timeout buffer&lt;/strong&gt;: Always leave sufficient buffer time for retries when chaining components&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retry configuration&lt;/strong&gt;: Consider adjusting &lt;code&gt;max_backoff_retries&lt;/code&gt; and backoff periods alongside timeout values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;: Monitor the &lt;code&gt;pyroscope_write_latency&lt;/code&gt; metric to understand actual request latencies and adjust timeouts accordingly&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&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;staging&amp;#34; {
  // Send profiles to a locally running Pyroscope instance.
  endpoint {
    url = &amp;#34;http://pyroscope:4040&amp;#34;
    headers = {
      &amp;#34;X-Scope-OrgID&amp;#34; = &amp;#34;squad-1&amp;#34;,
    }
  }
  external_labels = {
    &amp;#34;env&amp;#34; = &amp;#34;staging&amp;#34;,
  }
}

pyroscope.scrape &amp;#34;default&amp;#34; {
  targets = [
    {&amp;#34;__address__&amp;#34; = &amp;#34;pyroscope:4040&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;pyroscope&amp;#34;},
    {&amp;#34;__address__&amp;#34; = &amp;#34;alloy:12345&amp;#34;, &amp;#34;service_name&amp;#34;=&amp;#34;alloy&amp;#34;},
  ]
  forward_to = [pyroscope.write.staging.receiver]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- START GENERATED COMPATIBLE COMPONENTS --&gt;
&lt;h2 id=&#34;compatible-components&#34;&gt;Compatible components&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; has exports that can be consumed by the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components that consume &lt;a href=&#34;../../../compatibility/#pyroscope-profilesreceiver-consumers&#34;&gt;Pyroscope &lt;code&gt;ProfilesReceiver&lt;/code&gt;&lt;/a&gt;&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;Connecting some components may not be sensible or components may require further configuration to make the connection work correctly.
Refer to the linked documentation for more details.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- END GENERATED COMPATIBLE COMPONENTS --&gt;
]]></content><description>&lt;h1 id="pyroscopewrite">&lt;code>pyroscope.write&lt;/code>&lt;/h1>
&lt;p>&lt;code>pyroscope.write&lt;/code> receives performance profiles from other components and forwards them to a series of user-supplied endpoints.
When &lt;code>pyroscope.write&lt;/code> forwards profiles, it drops all labels that start with a double underscore, with the following exceptions:&lt;/p></description></item></channel></rss>