<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.15/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.15/reference/components/pyroscope/index.xml" rel="self" type="application/rss+xml"/><item><title>pyroscope.ebpf</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/pyroscope/pyroscope.ebpf/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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 collected performance profiles are forwarded to the list of receivers passed 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.&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;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 HLLs (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 a new 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;targets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;list(map(string))&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of targets to group profiles by container ID.&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;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 kernelspace 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 userspace 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;container_id_cache_size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The size of the PID -&amp;gt; container ID table LRU cache.&lt;/td&gt;
              &lt;td&gt;&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; demangle mode. Available options are: &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;simplified&lt;/code&gt;, &lt;code&gt;templates&lt;/code&gt;, 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_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 ordisable 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;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_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;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 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;load_probe&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Enable loading uprobe dynamically during runtime.&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;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;List of user-space symbols to collect stack-trace from, e.g. &lt;code&gt;[&amp;quot;/usr/lib/libc.so.6:malloc&amp;quot;]&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;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/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;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;A flag to adjust the off-cpu profiling threshold between 0 and 1 as float.&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;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;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 targets are discovered.&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;Only the &lt;code&gt;forward_to&lt;/code&gt; and &lt;code&gt;targets&lt;/code&gt; fields are required.
Omitted fields take their default values.&lt;/p&gt;
&lt;p&gt;Several arguments are marked as &amp;ldquo;Deprecated (no-op)&amp;rdquo;. These arguments were previously used for configuring various cache sizes and behaviors, but they no longer have any effect. They are kept for backward compatibility but will be removed in a future release. It is recommended to 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 that can be referenced by other components.&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; is only reported as unhealthy if given an invalid configuration.&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; currently tracked active targets.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_active_targets&lt;/code&gt; (gauge): Number of active targets the component tracks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_pprofs_total&lt;/code&gt; (counter): Number of pprof profiles collected by the eBPF component.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_failing_total&lt;/code&gt; (counter): Number of profiling sessions failed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_ebpf_profiling_sessions_total&lt;/code&gt; (counter): Number of profiling sessions completed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;/ul&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.
These metrics are only emitted after they have been recorded 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;ul&gt;
&lt;li&gt;&lt;code&gt;UnwindNativeAttempts_total&lt;/code&gt; (counter): Unwind attempts since the previous check.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindNativeFrames_total&lt;/code&gt; (counter): Unwound frames since the previous check.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindNativeStackDeltaStop_total&lt;/code&gt; (counter): Number of stop stack deltas in the native unwinder (success).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindNativeSmallPC_total&lt;/code&gt; (counter): Number of times PC held a value smaller than 0x1000.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindErrStackLengthExceeded_total&lt;/code&gt; (counter): Number of times MAX_FRAME_UNWINDS has been exceeded.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;interpreter-unwinding&#34;&gt;Interpreter unwinding&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;UnwindPythonAttempts_total&lt;/code&gt; (counter): Number of attempted Python unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindPythonFrames_total&lt;/code&gt; (counter): Number of unwound Python frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindHotspotAttempts_total&lt;/code&gt; (counter): Number of attempted Hotspot JVM unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindHotspotFrames_total&lt;/code&gt; (counter): Number of unwound Hotspot JVM frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindRubyAttempts_total&lt;/code&gt; (counter): Number of attempted Ruby unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindRubyFrames_total&lt;/code&gt; (counter): Number of unwound Ruby frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindPHPAttempts_total&lt;/code&gt; (counter): Number of attempted PHP unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindPHPFrames_total&lt;/code&gt; (counter): Number of unwound PHP frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindPerlAttempts_total&lt;/code&gt; (counter): Number of attempted Perl unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindPerlFrames_total&lt;/code&gt; (counter): Number of unwound Perl frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindV8Attempts_total&lt;/code&gt; (counter): Number of attempted V8 unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindV8Frames_total&lt;/code&gt; (counter): Number of unwound V8 frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindDotnetAttempts_total&lt;/code&gt; (counter): Number of attempted .NET unwinds.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindDotnetFrames_total&lt;/code&gt; (counter): Number of unwound .NET frames.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;symbolization&#34;&gt;Symbolization&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PythonSymbolizationSuccesses_total&lt;/code&gt; (counter): Number of successfully symbolized Python frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PythonSymbolizationFailures_total&lt;/code&gt; (counter): Number of Python frames that failed symbolization.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HotspotSymbolizationSuccesses_total&lt;/code&gt; (counter): Number of successfully symbolized Hotspot frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HotspotSymbolizationFailures_total&lt;/code&gt; (counter): Number of Hotspot frames that failed symbolization.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RubySymbolizationSuccess_total&lt;/code&gt; (counter): Number of successfully symbolized Ruby frames.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RubySymbolizationFailure_total&lt;/code&gt; (counter): Number of Ruby frames that failed symbolization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;process-management&#34;&gt;Process management&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NumProcNew_total&lt;/code&gt; (counter): Number of new PID events.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NumProcExit_total&lt;/code&gt; (counter): Number of exit PID events.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NumGenericPID_total&lt;/code&gt; (counter): Number of generic PID events.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;ebpf-map-state&#34;&gt;eBPF map state&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NumExeIDLoadedToEBPF&lt;/code&gt; (gauge): The number of executables loaded to eBPF maps.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HashmapPidPageToMappingInfo&lt;/code&gt; (gauge): Current size of the pid_page_to_mapping_info hash map.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HashmapNumStackDeltaPages&lt;/code&gt; (gauge): Current size of the stack delta pages hash map.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UnwindInfoArraySize&lt;/code&gt; (gauge): Current size of the unwind info array.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The full list of ~213 metrics is defined in 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;.&lt;/p&gt;
&lt;h2 id=&#34;profile-collecting-behavior&#34;&gt;Profile collecting behavior&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pyroscope.ebpf&lt;/code&gt; component collects stack traces associated with a process running on the current host.
You can use the &lt;code&gt;sample_rate&lt;/code&gt; argument to define the number of stack traces collected per second. The default is 97.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected into the collected profiles if you 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;targets&#34;&gt;Targets&lt;/h3&gt;
&lt;p&gt;One of the following special labels &lt;em&gt;must&lt;/em&gt; be included in each target of &lt;code&gt;targets&lt;/code&gt; and the label must correspond to the container or process that is profiled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__container_id__&lt;/code&gt;: The container ID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_id&lt;/code&gt;: The ID of the Docker container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__meta_kubernetes_pod_container_id&lt;/code&gt;: The ID of the Kubernetes Pod container.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__process_pid__&lt;/code&gt; : The process ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each process is then associated with a specified target from the targets list, determined by a container ID or process PID.&lt;/p&gt;
&lt;p&gt;If a process&amp;rsquo;s container ID matches a target&amp;rsquo;s container ID label, the stack traces are aggregated per target based on the container ID.
If a process&amp;rsquo;s PID matches a target&amp;rsquo;s process PID label, the stack traces are aggregated per target based on the process PID.
Otherwise the process isn&amp;rsquo;t profiled.&lt;/p&gt;
&lt;h3 id=&#34;service-name&#34;&gt;Service name&lt;/h3&gt;
&lt;p&gt;The special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present.
If it&amp;rsquo;s not specified, it&amp;rsquo;s attempted to be inferred from multiple sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__meta_docker_container_name&lt;/code&gt;&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_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;/ul&gt;
&lt;p&gt;If &lt;code&gt;service_name&lt;/code&gt; isn&amp;rsquo;t specified and couldn&amp;rsquo;t be inferred, it&amp;rsquo;s set to &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;Symbols are extracted from various 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 &lt;a href=&#34;https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;gdb algorithm&lt;/a&gt;.
For example, if the profiler wants to find the debug file for &lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6&lt;/code&gt; with a &lt;code&gt;.gnu_debuglink&lt;/code&gt; set to &lt;code&gt;libc.so.6.debug&lt;/code&gt; and a build ID &lt;code&gt;0123456789abcdef&lt;/code&gt;.
The following paths are examined:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/.build-id/01/0123456789abcdef.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/lib/x86_64-linux-gnu/.debug/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/debug/lib/x86_64-linux-gnu/libc.so.6.debug&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;deal-with-unknown-symbols&#34;&gt;Deal with unknown symbols&lt;/h3&gt;
&lt;p&gt;Unknown symbols in the profiles you&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;, it indicates that the symbols couldn&amp;rsquo;t be mapped to their respective function names.&lt;/p&gt;
&lt;p&gt;This can occur for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The binary has been stripped, leaving no .symtab, .dynsym, or .gopclntab sections in the ELF file.&lt;/li&gt;
&lt;li&gt;The debug file is missing or couldn&amp;rsquo;t be located.&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, ensure that debug symbols are installed.
On Ubuntu, for example, you can install debug symbols for &lt;code&gt;libc&lt;/code&gt; by executing:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;apt install libc6-dbg&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;understand-flat-stack-traces&#34;&gt;Understand flat stack traces&lt;/h3&gt;
&lt;p&gt;If your profiles show many shallow stack traces, typically 1-2 frames deep, your binary might have been compiled without frame pointers.&lt;/p&gt;
&lt;p&gt;To compile your code with frame pointers, include the &lt;code&gt;-fno-omit-frame-pointer&lt;/code&gt; flag in your compiler options.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;h3 id=&#34;kubernetes-discovery&#34;&gt;Kubernetes discovery&lt;/h3&gt;
&lt;p&gt;In the following example, performance profiles are collected 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 &lt;code&gt;service_name&lt;/code&gt; label is set to &lt;code&gt;{__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 &lt;code&gt;service_name&lt;/code&gt; label is set to 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;!-- 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 collected performance profiles are forwarded to the list of receivers passed in &lt;code>forward_to&lt;/code>.&lt;/p></description></item><item><title>pyroscope.enrich</title><link>https://grafana.com/docs/alloy/v1.15/reference/components/pyroscope/pyroscope.enrich/</link><pubDate>Mon, 30 Mar 2026 15:47:22 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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.15/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;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(Target)&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, all labels are copied.&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.
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.&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 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 additional 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.15/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.15/reference/components/pyroscope/pyroscope.java/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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;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, in Docker, capabilities that aren&amp;rsquo;t on the allowlist are dropped 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;h2 id=&#34;profiling-behavior&#34;&gt;Profiling behavior&lt;/h2&gt;
&lt;p&gt;The special label &lt;code&gt;__process_pid__&lt;/code&gt; &lt;em&gt;must always&lt;/em&gt; be present in each target of &lt;code&gt;targets&lt;/code&gt; and corresponds to the &lt;code&gt;PID&lt;/code&gt; of the process to profile.&lt;/p&gt;
&lt;p&gt;After component startup, &lt;code&gt;pyroscope.java&lt;/code&gt; creates a temporary directory under &lt;code&gt;tmp_dir&lt;/code&gt; 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 according &lt;code&gt;libAsyncProfiler.so&lt;/code&gt; into the target process 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; configuration 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, needs to allow execution of files stored there. Typically a mount option called &lt;code&gt;noexec&lt;/code&gt; would prevent files from being executed.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;targets&#34;&gt;&lt;code&gt;targets&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The special &lt;code&gt;__process_pid__&lt;/code&gt; label &lt;em&gt;must always&lt;/em&gt; be present and corresponds to the process PID that&amp;rsquo;s used for profiling.&lt;/p&gt;
&lt;p&gt;Labels starting with a double underscore (&lt;code&gt;__&lt;/code&gt;) are treated as &lt;em&gt;internal&lt;/em&gt;, and are removed prior to scraping.&lt;/p&gt;
&lt;p&gt;The special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present.
If it&amp;rsquo;s not specified, &lt;code&gt;pyroscope.scrape&lt;/code&gt; will attempt to infer it from either of 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;If &lt;code&gt;service_name&lt;/code&gt; isn&amp;rsquo;t specified and couldn&amp;rsquo;t be inferred, then it&amp;rsquo;s set to &lt;code&gt;unspecified&lt;/code&gt;.&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;\u003eprofiling_config`\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;profiling_config`&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 async-profiler is invoked.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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;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. Can be one of &lt;code&gt;itimer&lt;/code&gt;, &lt;code&gt;cpu&lt;/code&gt; or &lt;code&gt;wall&lt;/code&gt;.&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;/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;h4 id=&#34;event&#34;&gt;&lt;code&gt;event&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;event&lt;/code&gt; argument sets the CPU profiling event:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;itimer&lt;/code&gt; - Default. Uses the &lt;a href=&#34;http://man7.org/linux/man-pages/man2/setitimer.2.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;setitimer(ITIMER_PROF)&lt;/code&gt;&lt;/a&gt; syscall, which generates a signal every time a process consumes CPU.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cpu&lt;/code&gt; - Uses PMU-case sampling (like Intel PEBS or AMD IBS), can be more accurate than &lt;code&gt;itimer&lt;/code&gt;, but it&amp;rsquo;s not available on every platform.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wall&lt;/code&gt; - This samples all threads equally every given period of time regardless of thread status: Running, Sleeping, or Blocked.
For example, this can be helpful when profiling application start-up time or IO-intensive processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;per_thread&#34;&gt;&lt;code&gt;per_thread&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;per_thread&lt;/code&gt; argument sets per thread mode on async profiler. Threads are profiled separately and each stack trace ends with a frame that denotes a single thread.&lt;/p&gt;
&lt;p&gt;The Wall-clock profiler (&lt;code&gt;event=wall&lt;/code&gt;) is most useful in per-thread mode.&lt;/p&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 that can be referenced by other components.&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 when 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;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;h3 id=&#34;profile-every-java-process-on-the-current-host&#34;&gt;Profile every java process on the current host&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.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.15/reference/components/pyroscope/pyroscope.receive_http/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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;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: 3;&#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\u003eName\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; [\u003ccode\u003etls\u003c/code\u003e][tls]\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;Name&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;code&gt;tls&lt;/code&gt;][tls]&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 reported as unhealthy if it&amp;rsquo;s given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope_receive_http_tcp_connections&lt;/code&gt; (gauge): Current number of accepted TCP connections.
&lt;code&gt;pyroscope_receive_http_tcp_connections_limit&lt;/code&gt; (gauge): The maximum number of TCP connections that the component can accept. A value of 0 means no limit.&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;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.15/reference/components/pyroscope/pyroscope.relabel/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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;If no rules are defined or applicable to some profiles, then those profiles are forwarded as-is to each receiver passed in the component&amp;rsquo;s arguments.
The profile is dropped if no external labels remain after the relabeling rules are applied.&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 &lt;code&gt;rule&lt;/code&gt; blocks are applied to the label set of each profile in order of their appearance in the configuration file.&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(pyroscope.Appendable)&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: 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\u003eName\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;Name&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;[]relabel.Config&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 reported as unhealthy if it is given an invalid configuration.&lt;/p&gt;
&lt;h2 id=&#34;debug-metrics&#34;&gt;Debug metrics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_cache_hits&lt;/code&gt; (counter): Total number of cache hits.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_cache_misses&lt;/code&gt; (counter): Total number of cache misses.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_cache_size&lt;/code&gt; (gauge): Total size of relabel cache.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_profiles_dropped&lt;/code&gt; (counter): Total number of profiles dropped by relabeling rules.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_profiles_processed&lt;/code&gt; (counter): Total number of profiles processed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pyroscope_relabel_profiles_written&lt;/code&gt; (counter): Total number of profiles forwarded.&lt;/li&gt;
&lt;/ul&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.15/reference/components/pyroscope/pyroscope.scrape/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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 [pprof] 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 different types of profiles are scraped on different endpoints.
For example, mutex profiles may be scraped on a &lt;code&gt;/debug/pprof/delta_mutex&lt;/code&gt; HTTP endpoint, whereas memory consumption may be scraped on a &lt;code&gt;/debug/pprof/allocs&lt;/code&gt; HTTP endpoint.&lt;/p&gt;
&lt;p&gt;The profile paths, protocol scheme, scrape interval, scrape timeout, query parameters, as well as any other settings can be configured 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 [pprof] 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; will show:&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 scraped performance profiles can be forwarded to components such as &lt;code&gt;pyroscope.write&lt;/code&gt; via the &lt;code&gt;forward_to&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;Multiple &lt;code&gt;pyroscope.scrape&lt;/code&gt; components can be specified 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 new scrape job to scrape all of the input targets.
Multiple scrape jobs can be started for a single input target when scraping 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;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;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;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;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 with which the target is scraped.&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;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. Must be larger than &lt;code&gt;scrape_interval&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;18s&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;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;The duration for a delta profiling to be scraped. 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;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 metrics 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;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;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;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 HTTP2 is supported 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 redirects returned by the server should be followed.&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 be sent along 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;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;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_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_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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] 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;code&gt;oauth2&lt;/code&gt;][oauth2] block&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Any omitted arguments take on their default values.
If conflicting arguments are being passed, 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; will fail to start and will report 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; will be &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;The list of &lt;code&gt;targets&lt;/code&gt; can be provided &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 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 is used for the scrape request.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt; is the special label that indicates the profile type being collected.&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 (e.g. &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 (e.g. &amp;ldquo;/mimir-prometheus&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service_name&lt;/code&gt; is a required label that identifies the service being profiled.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Labels starting with a double underscore (&lt;code&gt;__&lt;/code&gt;) are treated as &lt;em&gt;internal&lt;/em&gt;, and are removed prior to scraping.&lt;/p&gt;
&lt;p&gt;The special label &lt;code&gt;service_name&lt;/code&gt; is required and must always be present.
If it&amp;rsquo;s not specified, &lt;code&gt;pyroscope.scrape&lt;/code&gt; will attempt to infer it from either of 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;If &lt;code&gt;service_name&lt;/code&gt; isn&amp;rsquo;t specified and couldn&amp;rsquo;t be inferred, then it&amp;rsquo;s set to &lt;code&gt;unspecified&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following labels are automatically injected to the scraped profiles so that they can be linked 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Fewer profiles may be lost if the application being scraped 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;More profiles may be lost if the application being scraped crashes.&lt;/li&gt;
&lt;li&gt;If the [delta argument][] is set to &lt;code&gt;true&lt;/code&gt;, the batch size of each remote write to Pyroscope may be bigger.
The Pyroscope database may need to be tuned with higher limits.&lt;/li&gt;
&lt;li&gt;If the [delta argument][] is set to &lt;code&gt;true&lt;/code&gt;, there is a larger risk of reaching the HTTP server timeouts of the application being scraped.&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;&lt;code&gt;pyroscope.scrape&lt;/code&gt; is configured 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 application being scraped is running an HTTP server with a timeout of 30 seconds.&lt;/li&gt;
&lt;li&gt;Any scrape HTTP requests where the [delta argument][] is set to &lt;code&gt;true&lt;/code&gt; will fail, because they will 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 &lt;code&gt;profile.mutex&lt;/code&gt; isn&amp;rsquo;t specified in the configuration, the defaults documented in [profile.mutex][] are used.&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;File containing 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;&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-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;password_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;password&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;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 &lt;code&gt;enabled&lt;/code&gt; is set to true, then 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 a new node joins, then the subset of targets to scrape per node is recalculated.&lt;/p&gt;
&lt;p&gt;When clustering mode is enabled, 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;The following arguments are supported:&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;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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 allows for collecting profiles from custom endpoints.
Blocks must be specified with 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;The following arguments are supported:&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 this profile type to be scraped.&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 will be 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 [fgprof][] endpoint.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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 [godeltaprof][] block endpoint. The delta is computed on the target.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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 this profile type to be scraped.&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 [godeltaprof][] memory endpoint. The delta is computed on the target.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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 this profile type to be scraped.&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 [godeltaprof][] mutex endpoint.
The delta is computed on the target.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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 this profile type to be scraped.&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;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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;The following arguments are supported:&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 this profile type to be scraped.&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 [delta argument][] 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&gt;

        
&lt;h2 id=&#34;common-configuration&#34;&gt;Common configuration&lt;/h2&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 [pprof][] HTTP query will be 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 [pprof][] 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; is assigned 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 &lt;code&gt;scrape_interval&lt;/code&gt; must be set 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 that can be referenced by other components.&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.&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;ul&gt;
&lt;li&gt;&lt;code&gt;pyroscope_fanout_latency&lt;/code&gt; (histogram): Write latency for sending to direct and indirect components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&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 scraped profiles are sent 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;These endpoints will be scraped 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;&lt;code&gt;seconds=14&lt;/code&gt; is added 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 &lt;code&gt;/debug/fgprof&lt;/code&gt; endpoint won&amp;rsquo;t be scraped, 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;These endpoints will be scraped 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 will &lt;strong&gt;NOT&lt;/strong&gt; be scraped because they are 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 [pprof] 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.15/reference/components/pyroscope/pyroscope.write/</link><pubDate>Mon, 13 Apr 2026 07:37:47 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.15/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, all labels starting with double underscore (&lt;code&gt;__&lt;/code&gt;) are dropped before the data is sent, with the following exceptions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__name__&lt;/code&gt; is preserved because it identifies the profile type.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;__delta__&lt;/code&gt;is preserved because it&amp;rsquo;s required for delta profiles.&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.
Multiple &lt;code&gt;endpoint&lt;/code&gt; blocks can be provided to send profiles to multiple locations.&lt;/p&gt;
&lt;p&gt;The following arguments are supported:&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 metrics 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_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;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;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 HTTP2 is supported 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 redirects returned by the server should be followed.&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 be sent along 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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;At most, one of the following can be provided:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;authorization&lt;/code&gt;][authorization] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;basic_auth&lt;/code&gt;][basic_auth] block&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token_file&lt;/code&gt;][endpoint] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;bearer_token&lt;/code&gt;][endpoint] argument&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;oauth2&lt;/code&gt;][oauth2] 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;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;File containing 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;&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-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;password_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;password&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;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&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 are kept at 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;metrics&#34;&gt;Metrics&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pyroscope.write&lt;/code&gt; exposes the following metrics:&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;Metric&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;Counter&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;Counter&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;Counter&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;Counter&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;Counter&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;Histogram&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;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 metrics 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, all labels starting with double underscore (&lt;code>__&lt;/code>) are dropped before the data is sent, with the following exceptions:&lt;/p></description></item></channel></rss>