<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Configure Beyla on Grafana Labs</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/</link><description>Recent content in Configure Beyla on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/beyla/v3.9.x/configure/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure Beyla export modes</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/export-modes/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/export-modes/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-export-modes&#34;&gt;Configure Beyla export modes&lt;/h1&gt;
&lt;p&gt;Beyla exports data in Alloy or Direct mode.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/grafana-cloud/beyla/alloy-vs-direct.png&#34;
  alt=&#34;Beyla architecture alloy vs direct&#34; width=&#34;504&#34;
     height=&#34;325&#34;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Beyla running in Alloy mode on the left and Direct mode on the right.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;direct-mode&#34;&gt;Direct mode&lt;/h2&gt;
&lt;p&gt;In Direct mode Beyla pushes metrics and traces directly to a remote endpoint using the OpenTelemetry protocol (OTLP).&lt;/p&gt;
&lt;p&gt;Beyla can also expose a Prometheus HTTP endpoint ready to scrape, for example in &lt;strong&gt;pull&lt;/strong&gt; mode.&lt;/p&gt;
&lt;p&gt;To use Direct mode requires configuration with authentication credentials. Set the OTLP endpoint authentication credentials with these environment variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_HEADERS&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To run in Direct mode using the Prometheus scrape endpoint, see the
&lt;a href=&#34;../options/&#34;&gt;configuration documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;alloy-mode&#34;&gt;Alloy mode&lt;/h2&gt;
&lt;p&gt;In Alloy mode Beyla sends metrics and traces to &lt;a href=&#34;/docs/alloy/&#34;&gt;Grafana Alloy&lt;/a&gt;. Alloy processes and sends them to Mimir and Tempo. Alloy manages the authentication required by the Mimir and Tempo endpoints.&lt;/p&gt;
&lt;p&gt;This mode integrates with Grafana exclusive features like &lt;a href=&#34;/docs/tempo/latest/metrics-generator/span_metrics/&#34;&gt;span-to-metrics&lt;/a&gt; and &lt;a href=&#34;/docs/tempo/latest/metrics-generator/service_graphs/&#34;&gt;span-to-service graph&lt;/a&gt; converters.&lt;/p&gt;
&lt;p&gt;The following sections are examples of how to set up Alloy and Beyla to send to Grafana Cloud.&lt;/p&gt;
&lt;h3 id=&#34;configure-alloy-pipeline&#34;&gt;Configure Alloy pipeline&lt;/h3&gt;
&lt;p&gt;First, install and configure &lt;a href=&#34;/docs/alloy/&#34;&gt;Grafana Alloy&lt;/a&gt;. Configure the &lt;a href=&#34;/docs/alloy/&#34;&gt;Alloy&lt;/a&gt; pipeline and specify the following nodes:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/grafana-cloud/beyla/nodes-2.png&#34;
  alt=&#34;Beyla nodes&#34; width=&#34;537&#34;
     height=&#34;524&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Download the example &lt;a href=&#34;https://github.com/grafana/beyla/blob/main/docs/sources/configure/resources/alloy-config.river&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;River configuration file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Create an &lt;strong&gt;OpenTelemetry receiver&lt;/strong&gt; endpoint for the auto-instrumentation tool to forward metrics and traces.
Add this entry to the Alloy configuration file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;otelcol.receiver.otlp &amp;#34;default&amp;#34; {
  grpc {}
  http {}

  output {
    metrics = [otelcol.processor.batch.default.input]
    traces = [otelcol.processor.batch.default.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This enables Alloy to receive OpenTelemetry events via GRPC and HTTP. Alloy forwards the data to the batch processor. The batch processor accumulate the data and forwards it to exporters:&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;otelcol.processor.batch &amp;#34;default&amp;#34; {
  output {
    metrics = [otelcol.exporter.prometheus.default.input]
    traces  = [otelcol.exporter.otlp.tempo.input]
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Export either metrics, traces, or both. To export a single data type, omit the &lt;code&gt;metrics&lt;/code&gt; or &lt;code&gt;traces&lt;/code&gt; lines in the node definitions and skip the related exporters.&lt;/p&gt;
&lt;p&gt;Alloy exports metrics in &lt;strong&gt;Prometheus&lt;/strong&gt; format to &lt;a href=&#34;/oss/mimir/&#34;&gt;Grafana Mimir&lt;/a&gt;.
The configuration uses basic authentication. The Alloy configuration uses values set in environment variables:&lt;/p&gt;

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

prometheus.remote_write &amp;#34;mimir&amp;#34; {
  endpoint {
    url = &amp;#34;https://&amp;#34; &amp;#43; env(&amp;#34;MIMIR_ENDPOINT&amp;#34;) &amp;#43; &amp;#34;/api/prom/push&amp;#34;
    basic_auth {
      username = env(&amp;#34;MIMIR_USER&amp;#34;)
      password = env(&amp;#34;GRAFANA_API_KEY&amp;#34;)
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Set authentication environment variables and run Alloy:&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;sh&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-sh&#34;&gt;export MIMIR_USER=734432
export MIMIR_ENDPOINT=prometheus-prod-01-eu-west-0.grafana.net
export GRAFANA_API_KEY=VHJhbGFyw60gcXVlIHRlIHbD....=&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Finally, set up a &lt;a href=&#34;/oss/tempo/&#34;&gt;Grafana Tempo&lt;/a&gt; exporter and endpoint. The Alloy configuration uses values set in environment variables:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Alloy&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-alloy&#34;&gt;otelcol.exporter.otlp &amp;#34;tempo&amp;#34; {
    client {
        endpoint = env(&amp;#34;TEMPO_ENDPOINT&amp;#34;)
        auth     = otelcol.auth.basic.creds.handler
    }
}

otelcol.auth.basic &amp;#34;creds&amp;#34; {
    username = env(&amp;#34;TEMPO_USER&amp;#34;)
    password = env(&amp;#34;GRAFANA_API_KEY&amp;#34;)
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that the &lt;code&gt;TEMPO_ENDPOINT&lt;/code&gt; and &lt;code&gt;TEMPO_USER&lt;/code&gt; values are different from &lt;code&gt;MIMIR_ENDPOINT&lt;/code&gt; and &lt;code&gt;MIMIR_USER&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Run Alloy with a named configuration file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&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-sh&#34;&gt;grafana-alloy run alloy-config.river&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;configure-and-run-beyla&#34;&gt;Configure and run Beyla&lt;/h3&gt;
&lt;p&gt;This tutorial assumes Beyla and Alloy are running natively on the same host, so there is no need to secure the traffic nor provide authentication in the Alloy OTLP receiver.&lt;/p&gt;
&lt;p&gt;Install &lt;a href=&#34;../../setup/&#34;&gt;Grafana Beyla&lt;/a&gt; and download the example &lt;a href=&#34;https://github.com/grafana/beyla/blob/main/docs/sources/configure/resources/instrumenter-config.yml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;configuration file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, specify the executable to instrument. For a service executable running on port &lt;code&gt;443&lt;/code&gt;, add the &lt;code&gt;open_port&lt;/code&gt; property to the YAML document:&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;discovery:
  instrument:
    - open_ports: 443&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Next, specify where the traces and the metrics are sent. If Alloy is running on the local host, it uses port &lt;code&gt;4318&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;otel_metrics_export:
  endpoint: http://localhost:4318
otel_traces_export:
  endpoint: http://localhost:4318&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can specify a combination of &lt;code&gt;otel_metrics_export&lt;/code&gt; and &lt;code&gt;otel_traces_export&lt;/code&gt; properties to export metrics, traces, or both.&lt;/p&gt;
&lt;p&gt;Run Beyla with a named configuration file:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;beyla -config instrument-config.yml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;BEYLA_CONFIG_PATH=instrument-config.yml beyla&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="configure-beyla-export-modes">Configure Beyla export modes&lt;/h1>
&lt;p>Beyla exports data in Alloy or Direct mode.&lt;/p>
&lt;p>&lt;img
class="lazyload d-inline-block"
data-src="https://grafana.com/media/docs/grafana-cloud/beyla/alloy-vs-direct.png"
alt="Beyla architecture alloy vs direct" width="504"
height="325"/>&lt;/p>
&lt;p>&lt;em>Beyla running in Alloy mode on the left and Direct mode on the right.&lt;/em>&lt;/p></description></item><item><title>Beyla global configuration properties</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/options/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/options/</guid><content><![CDATA[&lt;!-- vale Grafana.Paragraphs = NO --&gt;
&lt;h1 id=&#34;beyla-global-configuration-properties&#34;&gt;Beyla global configuration properties&lt;/h1&gt;
&lt;p&gt;Beyla can be configured via environment variables or via a YAML configuration file passed either with the &lt;code&gt;-config&lt;/code&gt; command-line argument or the &lt;code&gt;BEYLA_CONFIG_PATH&lt;/code&gt; environment variable.
Environment variables have priority over the properties in the configuration file.
For example, in the following command line, the &lt;code&gt;BEYLA_LOG_LEVEL&lt;/code&gt; option overrides any &lt;code&gt;log_level&lt;/code&gt; settings inside config.yaml:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Config argument:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&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-sh&#34;&gt;BEYLA_LOG_LEVEL=debug beyla -config /path/to/config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Config environment variable:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&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-sh&#34;&gt;BEYLA_LOG_LEVEL=debug BEYLA_CONFIG_PATH=/path/to/config.yaml beyla&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;../example/&#34;&gt;example YAML configuration file&lt;/a&gt; for a configuration file template.&lt;/p&gt;
&lt;p&gt;Beyla consists of a pipeline of components that generate, transform, and export traces from HTTP and GRPC applications.
In the YAML configuration, each component has its own first-level section.&lt;/p&gt;
&lt;p&gt;Optionally, Beyla also provides network-level metrics, refer to the &lt;a href=&#34;../../network/&#34;&gt;network metrics documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;The following sections explain the global configuration properties that apply to the entire Beyla configuration.&lt;/p&gt;
&lt;p&gt;For example:&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;trace_printer: json
shutdown_timeout: 30s
channel_buffer_len: 33&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;em&gt;(No YAML)&lt;/em&gt;&lt;p&gt;&lt;code&gt;BEYLA_AUTO_TARGET_EXE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Selects the process to instrument by &lt;a href=&#34;https://en.wikipedia.org/wiki/Glob_%28programming%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Glob&lt;/a&gt; matching against the full executable path.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;unset&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;open_port&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OPEN_PORT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Selects a process to instrument by open ports. Accepts comma-separated lists of ports and port ranges.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;unset&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;shutdown_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_SHUTDOWN_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets the timeout for a graceful shutdown&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;10s&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;log_level&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_LOG_LEVEL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets process logger verbosity. Valid values: &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;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;INFO&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;log_format&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_LOG_FORMAT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets process logger format. Valid values: &lt;code&gt;text&lt;/code&gt;, &lt;code&gt;json&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;trace_printer&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_TRACE_PRINTER&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Prints instrumented traces to the standard output in a specified format, refer to &lt;a href=&#34;#trace-printer-formats&#34;&gt;trace printer formats&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;disabled&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enforce_sys_caps&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_ENFORCE_SYS_CAPS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Controls how Beyla handles missing system capabilities at startup.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;em&gt;(No YAML)&lt;/em&gt;&lt;p&gt;&lt;code&gt;BEYLA_AUTO_TARGET_LANGUAGE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Selects the executable to instrument matching a Glob of chosen languages.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;unset&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;executable-name-matching&#34;&gt;Executable name matching&lt;/h2&gt;
&lt;p&gt;This property accepts a &lt;a href=&#34;https://en.wikipedia.org/wiki/Glob_%28programming%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;glob&lt;/a&gt; matched against the full executable command line, including the directory where the executable resides on the file system.
Beyla selects one process, or multiple processes with similar characteristics.
For more detailed process selection and grouping, refer to the &lt;a href=&#34;../service-discovery/&#34;&gt;service discovery documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you instrument by executable name, choose a non-ambiguous name that matches one executable on the target system.
For example, if you set &lt;code&gt;BEYLA_AUTO_TARGET_EXE=*/server&lt;/code&gt; and have two processes that match the Glob, Beyla selects both.
Instead use the full application path for exact matches, for example &lt;code&gt;BEYLA_AUTO_TARGET_EXE=/opt/app/server&lt;/code&gt; or &lt;code&gt;BEYLA_AUTO_TARGET_EXE=/server&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you set both &lt;code&gt;BEYLA_AUTO_TARGET_EXE&lt;/code&gt; and &lt;code&gt;BEYLA_OPEN_PORT&lt;/code&gt; properties, Beyla selects only executables
matching both selection criteria.&lt;/p&gt;
&lt;h2 id=&#34;open-port-matching&#34;&gt;Open port matching&lt;/h2&gt;
&lt;p&gt;This property accepts a comma-separated list of ports or port ranges. If an executable matches any of the ports Beyla selects it. For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;BEYLA_OPEN_PORT=80,443,8000-8999&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, Beyla selects any executable that opens port &lt;code&gt;80&lt;/code&gt;, &lt;code&gt;443&lt;/code&gt;, or any port between &lt;code&gt;8000&lt;/code&gt; and &lt;code&gt;8999&lt;/code&gt;.
It can select one process or multiple processes with similar characteristics.
For more detailed process selection and grouping, follow the instructions in the &lt;a href=&#34;../service-discovery/&#34;&gt;service discovery documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If an executable opens multiple ports, specifying one of those ports is enough for Beyla to instrument all HTTP/S and GRPC requests on all application ports.
Currently, there&amp;rsquo;s no way to limit instrumentation to requests on a specific port.&lt;/p&gt;
&lt;p&gt;If the specified port range is wide, for example &lt;code&gt;1-65535&lt;/code&gt;, Beyla tries to execute all processes that own one of the ports in that range.&lt;/p&gt;
&lt;p&gt;If you set both &lt;code&gt;BEYLA_AUTO_TARGET_EXE&lt;/code&gt; and &lt;code&gt;BEYLA_OPEN_PORT&lt;/code&gt; properties, Beyla selects only executables
matching both selection criteria.&lt;/p&gt;
&lt;h2 id=&#34;service-name-and-namespace&#34;&gt;Service name and namespace&lt;/h2&gt;
&lt;p&gt;These configuration options are deprecated.&lt;/p&gt;
&lt;p&gt;Defining these properties is equivalent to adding a &lt;code&gt;name&lt;/code&gt; entry to the &lt;a href=&#34;../service-discovery/&#34;&gt;&lt;code&gt;discovery.instrument&lt;/code&gt; YAML section&lt;/a&gt;.
When a single instance of Beyla instruments multiple processes, they share the same service name even if they differ.
To give multiple services different names, see how to &lt;a href=&#34;../service-discovery/&#34;&gt;override the service name and namespace&lt;/a&gt; in the service discovery documentation.&lt;/p&gt;
&lt;h2 id=&#34;trace-printer-formats&#34;&gt;Trace printer formats&lt;/h2&gt;
&lt;p&gt;This option prints any instrumented trace on the standard output using one of the following formats:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;disabled&lt;/code&gt;&lt;/strong&gt;: Disables the printer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;text&lt;/code&gt;&lt;/strong&gt;: Prints a concise line of text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;json&lt;/code&gt;&lt;/strong&gt;: Prints a compact JSON object&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;json_indent&lt;/code&gt;&lt;/strong&gt;: Prints an indented JSON object&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;system-capabilities&#34;&gt;System capabilities&lt;/h2&gt;
&lt;p&gt;If you set &lt;code&gt;enforce_sys_caps&lt;/code&gt; to true and the required system capabilities are missing, Beyla aborts startup and logs the missing capabilities.
If you set this option to &lt;code&gt;false&lt;/code&gt;, Beyla only logs the missing capabilities.&lt;/p&gt;
]]></content><description>&lt;!-- vale Grafana.Paragraphs = NO -->
&lt;h1 id="beyla-global-configuration-properties">Beyla global configuration properties&lt;/h1>
&lt;p>Beyla can be configured via environment variables or via a YAML configuration file passed either with the &lt;code>-config&lt;/code> command-line argument or the &lt;code>BEYLA_CONFIG_PATH&lt;/code> environment variable.
Environment variables have priority over the properties in the configuration file.
For example, in the following command line, the &lt;code>BEYLA_LOG_LEVEL&lt;/code> option overrides any &lt;code>log_level&lt;/code> settings inside config.yaml:&lt;/p></description></item><item><title>Configure Beyla Prometheus and OpenTelemetry data export</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/export-data/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/export-data/</guid><content><![CDATA[&lt;!-- vale Grafana.Paragraphs = NO --&gt;
&lt;h1 id=&#34;configure-beyla-prometheus-and-opentelemetry-data-export&#34;&gt;Configure Beyla Prometheus and OpenTelemetry data export&lt;/h1&gt;
&lt;p&gt;Beyla can export OpenTelemetry metrics and traces to a OTLP endpoint.&lt;/p&gt;
&lt;p&gt;To send metrics directly to the Grafana Cloud OpenTelemetry endpoint, see the &lt;a href=&#34;#grafana-cloud-otlp-endpoint&#34;&gt;Grafana Cloud OTLP endpoint configuration&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;grafana-cloud-otlp-endpoint&#34;&gt;Grafana Cloud OTLP endpoint&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;grafana.otlp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;grafana.otlp&lt;/code&gt; section of your YAML configuration or via environment variables.
You can configure Beyla to submit OpenTelemetry data to the Grafana Cloud OTEL endpoint using custom variables, allowing an easier setup of the endpoint and the authentication.&lt;/p&gt;
&lt;p&gt;For more information on the Grafana Cloud OTLP endpoint,
refer to the &lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/send-data-otlp/&#34;&gt;Send data to the Grafana Cloud OTLP endpoint documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example:&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;grafana:
  otlp:
    cloud_submit: [&amp;#34;metrics&amp;#34;, &amp;#34;traces&amp;#34;]
    cloud_zone: &amp;#34;eu-west-23&amp;#34;
    cloud_instance_id: &amp;#34;12345&amp;#34;
    cloud_api_key: &amp;#34;abcde&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can also use the standard OpenTelemetry variables to submit the metrics and traces to any standard OpenTelemetry endpoint, including Grafana Cloud.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cloud_submit&lt;/code&gt;&lt;p&gt;&lt;code&gt;GRAFANA_CLOUD_SUBMIT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;A list of data types to submit to the OTLP endpoint. Accepts &lt;code&gt;metrics&lt;/code&gt; and &lt;code&gt;traces&lt;/code&gt; as values.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;traces&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cloud_zone&lt;/code&gt;&lt;p&gt;&lt;code&gt;GRAFANA_CLOUD_ZONE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The cloud zone of your Grafana endpoint used to compose the Grafana OTLP URL. Refer to &lt;a href=&#34;#cloud-zone-configuration&#34;&gt;cloud zone configuration&lt;/a&gt; for important details about endpoint overrides.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cloud_instance_id&lt;/code&gt;&lt;p&gt;&lt;code&gt;GRAFANA_CLOUD_INSTANCE_ID&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Your Grafana user name. Usually a number but must be set as a string in the YAML file.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cloud_api_key&lt;/code&gt;&lt;p&gt;&lt;code&gt;GRAFANA_CLOUD_API_KEY&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;API key of your Grafana Cloud account.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;cloud-zone-configuration&#34;&gt;Cloud zone configuration&lt;/h3&gt;
&lt;p&gt;If any of the &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;, &lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_ENDPOINT&lt;/code&gt; or &lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt; variables are defined, they override the destination endpoint, and Beyla ignores the &lt;code&gt;cloud_zone&lt;/code&gt; configuration option.&lt;/p&gt;
&lt;h2 id=&#34;opentelemetry-metrics-exporter-component&#34;&gt;OpenTelemetry metrics exporter component&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;otel_metrics_export&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Enable the OpenTelemetry metrics export component by setting the endpoint attribute in your configuration file or via an environment variable, refer to &lt;a href=&#34;#metrics-export-configuration-options&#34;&gt;metric export configuration options&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Configure the component under the &lt;code&gt;otel_metrics_export&lt;/code&gt; section of your YAML configuration or via environment variables.&lt;/p&gt;
&lt;p&gt;In addition to the configuration documented in this article, the component supports environment variables from the &lt;a href=&#34;https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;standard OpenTelemetry exporter configuration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example:&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;otel_metrics_export:
  ttl: 5m
  endpoint: http://otelcol:4318
  protocol: grpc
  features: [&amp;#34;network&amp;#34;, &amp;#34;network_inter_zone&amp;#34;]
  buckets:
    duration_histogram: [0, 1, 2]
  histogram_aggregation: base2_exponential_bucket_histogram&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_ENDPOINT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The endpoint Beyla sends metrics to.&lt;/td&gt;
              &lt;td&gt;URL&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The shared endpoint for metrics and traces exporters. Beyla adds &lt;code&gt;/v1/metrics&lt;/code&gt; path to the URL when sending metrics, following the OpenTelemetry standard. To prevent this behavior, use the metrics specific setting.&lt;/td&gt;
              &lt;td&gt;URL&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_PROTOCOL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The protocol transport/encoding of the OpenTelemetry endpoint, refer to &lt;a href=&#34;#metrics-export-protocol&#34;&gt;metrics export protocol&lt;/a&gt;. &lt;a href=&#34;https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Accepted values&lt;/a&gt; &lt;code&gt;http/json&lt;/code&gt;, &lt;code&gt;http/protobuf&lt;/code&gt;, and &lt;code&gt;grpc&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;Inferred from port usage&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Similar to the shared endpoint, the protocol for metrics and traces.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;Inferred from port usage&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_INSECURE_SKIP_VERIFY&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;If &lt;code&gt;true&lt;/code&gt;, Beyla skips verifying and accepts any server certificate. Only override this setting for non-production environments.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interval&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_METRICS_INTERVAL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The duration between exports.&lt;/td&gt;
              &lt;td&gt;Duration&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;60s&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;features&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_METRICS_FEATURES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The list of metric groups Beyla exports data for, refer to &lt;a href=&#34;#metrics-export-features&#34;&gt;metrics export features&lt;/a&gt;. Accepted values &lt;code&gt;application&lt;/code&gt;, &lt;code&gt;application_span&lt;/code&gt;, &lt;code&gt;application_span_otel&lt;/code&gt;, &lt;code&gt;application_host&lt;/code&gt;, &lt;code&gt;application_service_graph&lt;/code&gt;, &lt;code&gt;application_process&lt;/code&gt;, &lt;code&gt;network&lt;/code&gt; and &lt;code&gt;network_inter_zone&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;application&amp;quot;]&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_service_graph_self_references&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_ALLOW_SERVICE_GRAPH_SELF_REFERENCES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Controls if Beyla includes self-referencing services in service graph generation, for example a service that calls itself. Self referencing reduces service graph usefulness and increases data cardinality.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instrumentations&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_METRICS_INSTRUMENTATIONS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The list of metrics instrumentation Beyla collects data for, refer to &lt;a href=&#34;#metrics-instrumentation&#34;&gt;metrics instrumentation&lt;/a&gt; section.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;*&amp;quot;]&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets how you can override bucket boundaries of diverse histograms, refer to &lt;a href=&#34;../metrics-histograms/&#34;&gt;override histogram buckets&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;(n/a)&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;histogram_aggregation&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets the default aggregation Beyla uses for histogram instruments. Accepted values &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/metrics/sdk/#explicit-bucket-histogram-aggregation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;explicit_bucket_histogram&lt;/code&gt;&lt;/a&gt; or &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/metrics/sdk/#base2-exponential-bucket-histogram-aggregation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;base2_exponential_bucket_histogram&lt;/code&gt;&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;explicit_bucket_histogram&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;metrics-export-protocol&#34;&gt;Metrics export protocol&lt;/h3&gt;
&lt;p&gt;If you don&amp;rsquo;t set a protocol Beyla sets the protocol as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;grpc&lt;/code&gt;: if the port ends in &lt;code&gt;4317&lt;/code&gt;, for example &lt;code&gt;4317&lt;/code&gt;, &lt;code&gt;14317&lt;/code&gt;, or &lt;code&gt;24317&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http/protobuf&lt;/code&gt;: if the port ends in &lt;code&gt;4318&lt;/code&gt;, for example &lt;code&gt;4318&lt;/code&gt;, &lt;code&gt;14318&lt;/code&gt;, or &lt;code&gt;24318&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;metrics-export-features&#34;&gt;Metrics export features&lt;/h3&gt;
&lt;p&gt;The Beyla metrics exporter can export the following metrics data groups for processes matching entries in the &lt;a href=&#34;./&#34;&gt;metrics discovery&lt;/a&gt; configuration.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;application&lt;/code&gt;: Application-level metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_span&lt;/code&gt;: Application-level trace span metrics using legacy naming conventions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_span_otel&lt;/code&gt;: Application-level trace span metrics using OpenTelemetry naming conventions. Refer to &lt;a href=&#34;#span-metrics-formats&#34;&gt;span metrics formats&lt;/a&gt; for differences between &lt;code&gt;application_span&lt;/code&gt; and &lt;code&gt;application_span_otel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_host&lt;/code&gt;: Application-level host metrics for host based pricing&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_service_graph&lt;/code&gt;: Application-level service graph metrics.
It&amp;rsquo;s recommended to use a DNS for service discovery and to ensure the DNS names match the OpenTelemetry service names Beyla uses.
In Kubernetes environments, the OpenTelemetry service name set by the service name discovery is the best choice for service graph metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_process&lt;/code&gt;: Low-level process metrics (for example, CPU, memory, disk metrics) for the selected services&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network&lt;/code&gt;: Network-level metrics, refer to the &lt;a href=&#34;/docs/beyla/latest/network/&#34;&gt;network metrics&lt;/a&gt; configuration documentation to learn more&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network_inter_zone&lt;/code&gt;: Network inter-zone metrics, refer to the &lt;a href=&#34;/docs/beyla/latest/network/&#34;&gt;network metrics&lt;/a&gt; configuration documentation to learn more&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;span-metrics-formats&#34;&gt;Span metrics formats&lt;/h3&gt;
&lt;p&gt;Beyla provides two formats for span metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;application_span&lt;/code&gt;: Legacy format using the metric names &lt;code&gt;traces_spanmetrics_latency&lt;/code&gt; and &lt;code&gt;traces_spanmetrics_calls_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_span_otel&lt;/code&gt;: OpenTelemetry-compliant format using the metric names &lt;code&gt;traces_span_metrics_duration_seconds&lt;/code&gt; and &lt;code&gt;traces_span_metrics_calls_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can only enable one span metrics format at a time. If you specify both &lt;code&gt;application_span&lt;/code&gt; and &lt;code&gt;application_span_otel&lt;/code&gt; in the &lt;code&gt;features&lt;/code&gt; list, Beyla returns a configuration error.&lt;/p&gt;
&lt;h3 id=&#34;metrics-instrumentation&#34;&gt;Metrics instrumentation&lt;/h3&gt;
&lt;p&gt;The list of instrumentation areas Beyla can collection data from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;: all instrumentation, if &lt;code&gt;*&lt;/code&gt; is present Beyla ignores other values&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http&lt;/code&gt;: HTTP/HTTPS/HTTP2 application metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grpc&lt;/code&gt;: gRPC application metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sql&lt;/code&gt;: SQL database client call metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;redis&lt;/code&gt;: Redis client/server database metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kafka&lt;/code&gt;: Kafka client/server message queue metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mongodb&lt;/code&gt;: MongoDB client/server database metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, setting the &lt;code&gt;instrumentations&lt;/code&gt; option to: &lt;code&gt;http,grpc&lt;/code&gt; enables the collection of &lt;code&gt;HTTP/HTTPS/HTTP2&lt;/code&gt; and &lt;code&gt;gRPC&lt;/code&gt; application metrics, and disables other instrumentation.&lt;/p&gt;
&lt;h2 id=&#34;opentelemetry-traces-exporter-component&#34;&gt;OpenTelemetry traces exporter component&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;otel_traces_export&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;otel_traces_export&lt;/code&gt; section of your YAML configuration or via environment variables.&lt;/p&gt;
&lt;p&gt;In addition to the configuration documented in this article, the component supports the environment variables from the &lt;a href=&#34;https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;standard OpenTelemetry exporter configuration&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;otel_traces_export:
  endpoint: http://jaeger:4317
  protocol: grpc
  instrumentations: [&amp;#34;http&amp;#34;, &amp;#34;sql&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;endpoint&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The endpoint Beyla sends traces to. When using &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;, Beyla follows the OpenTelemetry standard and automatically adds &lt;code&gt;/v1/traces&lt;/code&gt; path to the URL. If you don&amp;rsquo;t want this to happen, use the traces specific setting.&lt;/td&gt;
              &lt;td&gt;URL&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;protocol&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_PROTOCOL&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The protocol transport/encoding of the OpenTelemetry endpoint, refer to &lt;a href=&#34;#traces-export-protocol&#34;&gt;traces export protocol&lt;/a&gt;. &lt;a href=&#34;https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_protocol&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Accepted values&lt;/a&gt; &lt;code&gt;http/json&lt;/code&gt;, &lt;code&gt;http/protobuf&lt;/code&gt;, and &lt;code&gt;grpc&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;Inferred from port usage&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;insecure_skip_verify&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_INSECURE_SKIP_VERIFY&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;If &lt;code&gt;true&lt;/code&gt;, Beyla skips verifying and accepts any server certificate. Only override this setting for non-production environments.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instrumentations&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_OTEL_TRACES_INSTRUMENTATIONS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The list of instrumentation Beyla collects data for, refer to &lt;a href=&#34;#traces-instrumentation&#34;&gt;traces instrumentation&lt;/a&gt; section.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;http&amp;quot;, &amp;quot;grpc&amp;quot;, &amp;quot;sql&amp;quot;, &amp;quot;redis&amp;quot;, &amp;quot;kafka&amp;quot;, &amp;quot;mongo&amp;quot;]&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;traces-export-protocol&#34;&gt;Traces export protocol&lt;/h3&gt;
&lt;p&gt;If you don&amp;rsquo;t set a protocol Beyla sets the protocol as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;grpc&lt;/code&gt;: if the port ends in &lt;code&gt;4317&lt;/code&gt;, for example &lt;code&gt;4317&lt;/code&gt;, &lt;code&gt;14317&lt;/code&gt;, or &lt;code&gt;24317&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http/protobuf&lt;/code&gt;: if the port ends in &lt;code&gt;4318&lt;/code&gt;, for example &lt;code&gt;4318&lt;/code&gt;, &lt;code&gt;14318&lt;/code&gt;, or &lt;code&gt;24318&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;traces-instrumentation&#34;&gt;Traces instrumentation&lt;/h3&gt;
&lt;p&gt;The list of instrumentation areas Beyla can collection data from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;: all instrumentation, if &lt;code&gt;*&lt;/code&gt; is present Beyla ignores other values&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http&lt;/code&gt;: HTTP/HTTPS/HTTP2 application traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grpc&lt;/code&gt;: gRPC application traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sql&lt;/code&gt;: SQL database client call traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;redis&lt;/code&gt;: Redis client/server database traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kafka&lt;/code&gt;: Kafka client/server message queue traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mongo&lt;/code&gt;: MongoDB client/server database traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dns&lt;/code&gt;: DNS request traces (not enabled by default)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gpu&lt;/code&gt;: GPU operation traces (not enabled by default)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, setting the &lt;code&gt;instrumentations&lt;/code&gt; option to: &lt;code&gt;http,grpc&lt;/code&gt; enables the collection of &lt;code&gt;HTTP/HTTPS/HTTP2&lt;/code&gt; and &lt;code&gt;gRPC&lt;/code&gt; application traces, and disables other instrumentation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: By default, Beyla enables the most commonly used instrumentations (&lt;code&gt;http&lt;/code&gt;, &lt;code&gt;grpc&lt;/code&gt;, &lt;code&gt;sql&lt;/code&gt;, &lt;code&gt;redis&lt;/code&gt;, &lt;code&gt;kafka&lt;/code&gt;, &lt;code&gt;mongo&lt;/code&gt;). DNS and GPU traces are not enabled by default to reduce overhead, but can be explicitly enabled if needed.&lt;/p&gt;
&lt;h2 id=&#34;prometheus-exporter-component&#34;&gt;Prometheus exporter component&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;prometheus_export&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;prometheus_export&lt;/code&gt; section of your YAML configuration or via environment variables.
This component opens an HTTP endpoint in the auto-instrumentation tool that allows any external scraper to pull metrics in Prometheus format. It is enabled if the &lt;code&gt;port&lt;/code&gt; property is set.&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;Prometheus scrapers override the &lt;code&gt;instance&lt;/code&gt; and &lt;code&gt;job&lt;/code&gt; labels by default. To preserve the per-process instance identifiers set by Beyla, configure your scraper with &lt;code&gt;honor_labels: true&lt;/code&gt;. See the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus documentation&lt;/a&gt; or &lt;a href=&#34;/docs/alloy/latest/reference/components/prometheus/prometheus.scrape/&#34;&gt;Alloy &lt;code&gt;prometheus.scrape&lt;/code&gt; documentation&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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;prometheus_export:
  port: 8999
  path: /metrics
  extra_resource_attributes: [&amp;#34;deployment_environment&amp;#34;]
  ttl: 1s
  buckets:
    request_size_histogram: [0, 10, 20, 22]
    response_size_histogram: [0, 10, 20, 22]
  features:
    - application
    - network
    - application_process
    - application_span
    - application_service_graph
  instrumentations: [&amp;#34;http, &amp;#34;sql&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;port&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_PORT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The HTTP port for the Prometheus scrape endpoint. If unset or 0, no Prometheus endpoint is open.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;path&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_PATH&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The HTTP query path to fetch the list of Prometheus metrics.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/metrics&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;extra_resource_attributes&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_EXTRA_RESOURCE_ATTRIBUTES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;A list of additional resource attributes to be added to the reported &lt;code&gt;target_info&lt;/code&gt; metric. Refer to &lt;a href=&#34;#prometheus-extra-resource-attributes&#34;&gt;extra resource attributes&lt;/a&gt; for important details about runtime discovered attributes.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ttl&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_TTL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The duration after which metric instances are not reported if they haven&amp;rsquo;t been updated. Used to avoid reporting indefinitely finished application instances.&lt;/td&gt;
              &lt;td&gt;Duration&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5m&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Sets how you can override bucket boundaries of diverse histograms, refer to &lt;a href=&#34;../metrics-histograms/&#34;&gt;override histogram buckets&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;features&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_FEATURES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The list of metric groups Beyla exports data for, refer to &lt;a href=&#34;#prometheus-export-features&#34;&gt;Prometheus export features&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;application&amp;quot;]&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;allow_service_graph_self_references&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_ALLOW_SERVICE_GRAPH_SELF_REFERENCES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Does Beyla include self-referencing service in service graph generation. Self referencing isn&amp;rsquo;t useful for service graphs and increases data cardinality.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instrumentations&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_PROMETHEUS_INSTRUMENTATIONS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;The list of instrumentation Beyla collects data for, refer to &lt;a href=&#34;#prometheus-instrumentation&#34;&gt;Prometheus instrumentation&lt;/a&gt; section.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[&amp;quot;*&amp;quot;]&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;prometheus-extra-resource-attributes&#34;&gt;Prometheus extra resource attributes&lt;/h3&gt;
&lt;p&gt;Due to internal limitations of the Prometheus API client, Beyla needs to know beforehand which attributes are exposed for each metric. This would cause that some attributes that are discovered at runtime, during instrumentation, won&amp;rsquo;t be visible by default. For example, attributes defined on each application via Kubernetes annotations, or in the target application&amp;rsquo;s &lt;code&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/code&gt; environment variable.&lt;/p&gt;
&lt;p&gt;For example, an application defining the &lt;code&gt;OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production&lt;/code&gt; as environment variable, the &lt;code&gt;target_info{deployment.environment=&amp;quot;production&amp;quot;}&lt;/code&gt; attribute would be visible by default if the metrics are exported via OpenTelemetry but not if they are exported via Prometheus.&lt;/p&gt;
&lt;p&gt;To make &lt;code&gt;deployment_environment&lt;/code&gt; visible in Prometheus, you need to add it to the &lt;code&gt;extra_resource_attributes&lt;/code&gt; list.&lt;/p&gt;
&lt;h3 id=&#34;prometheus-export-features&#34;&gt;Prometheus export features&lt;/h3&gt;
&lt;p&gt;The Prometheus metrics exporter can export the following metrics data groups:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;application&lt;/code&gt;: Application-level metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_span&lt;/code&gt;: Application-level trace span metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_host&lt;/code&gt; Application-level host metrics for host based pricing&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_service_graph&lt;/code&gt;: Application-level service graph metrics.
It&amp;rsquo;s recommended to use a DNS for service discovery and to ensure the DNS names match the OpenTelemetry service names Beyla uses.
In Kubernetes environments, the OpenTelemetry service name set by the service name discovery is the best choice for service graph metrics.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;application_process&lt;/code&gt;: Low-level process metrics (for example, CPU, memory, disk metrics) for the selected services&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network&lt;/code&gt;: Network-level metrics, refer to the &lt;a href=&#34;/docs/beyla/latest/network/&#34;&gt;network metrics&lt;/a&gt; configuration documentation to learn more&lt;/li&gt;
&lt;li&gt;&lt;code&gt;network_inter_zone&lt;/code&gt;: Network inter-zone metrics, refer to the &lt;a href=&#34;/docs/beyla/latest/network/&#34;&gt;network metrics&lt;/a&gt; configuration documentation to learn more&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;prometheus-instrumentation&#34;&gt;Prometheus instrumentation&lt;/h3&gt;
&lt;p&gt;The list of instrumentation areas Beyla can collection data from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;: all instrumentation, if &lt;code&gt;*&lt;/code&gt; is present Beyla ignores other values&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http&lt;/code&gt;: HTTP/HTTPS/HTTP2 application metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grpc&lt;/code&gt;: gRPC application metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sql&lt;/code&gt;: SQL database client call metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;redis&lt;/code&gt;: Redis client/server database metrics&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kafka&lt;/code&gt;: Kafka client/server message queue metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, setting the &lt;code&gt;instrumentations&lt;/code&gt; option to: &lt;code&gt;http,grpc&lt;/code&gt; enables the collection of &lt;code&gt;HTTP/HTTPS/HTTP2&lt;/code&gt; and &lt;code&gt;gRPC&lt;/code&gt; application metrics, and disables other instrumentation.&lt;/p&gt;
]]></content><description>&lt;!-- vale Grafana.Paragraphs = NO -->
&lt;h1 id="configure-beyla-prometheus-and-opentelemetry-data-export">Configure Beyla Prometheus and OpenTelemetry data export&lt;/h1>
&lt;p>Beyla can export OpenTelemetry metrics and traces to a OTLP endpoint.&lt;/p>
&lt;p>To send metrics directly to the Grafana Cloud OpenTelemetry endpoint, see the &lt;a href="#grafana-cloud-otlp-endpoint">Grafana Cloud OTLP endpoint configuration&lt;/a>.&lt;/p></description></item><item><title>Configure Beyla service discovery</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/service-discovery/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/service-discovery/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-service-discovery&#34;&gt;Configure Beyla service discovery&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;BEYLA_AUTO_TARGET_EXE&lt;/code&gt; and &lt;code&gt;BEYLA_OPEN_PORT&lt;/code&gt; are environment variables that make it easier to configure Beyla to instrument a single service or a group of related services.&lt;/p&gt;
&lt;p&gt;In some scenarios, Beyla instruments many services. For example, as a &lt;a href=&#34;../../setup/kubernetes/&#34;&gt;Kubernetes DaemonSet&lt;/a&gt; that instruments all the services in a node. The &lt;code&gt;discovery&lt;/code&gt; YAML section lets you specify more granular selection criteria for the services Beyla can instrument.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;instrument&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specify different selection criteria for different services, and override their reported name or namespace. Refer to the &lt;a href=&#34;#discovery-services&#34;&gt;discovery services&lt;/a&gt; section for details. .&lt;/td&gt;
              &lt;td&gt;list of objects&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;survey&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;specifying different selection criteria for Beyla survey mode. Refer to the &lt;a href=&#34;#survey-mode&#34;&gt;survey mode&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;List of objects&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_instrument&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specify selection criteria for excluding services from being instrumented. Useful for avoiding instrumentation of services typically found in observability environments. Refer to the &lt;a href=&#34;#exclude-services-from-instrumentation&#34;&gt;exclude services from instrumentation&lt;/a&gt; section for details. .&lt;/td&gt;
              &lt;td&gt;list of objects&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default_exclude_instrument&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Disables instrumentation of Beyla itself, Grafana Alloy, and the OpenTelemetry Collector. Set to empty to allow Beyla to instrument itself and these other components. Refer to the &lt;a href=&#34;#default-exclude-services-from-instrumentation&#34;&gt;default exclude services from instrumentation&lt;/a&gt; section for details. .&lt;/td&gt;
              &lt;td&gt;list of objects&lt;/td&gt;
              &lt;td&gt;Path: &lt;code&gt;{*beyla,*alloy,*prometheus-config-reloader,*ebpf-instrument,*obi,*otelcol,*otelcol-contrib,*otelcol-contrib[!/]*}&lt;/code&gt; and certain Kubernetes system namespaces&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;skip_go_specific_tracers&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_SKIP_GO_SPECIFIC_TRACERS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Disables the detection of Go specifics when the &lt;strong&gt;ebpf&lt;/strong&gt; tracer inspects executables to be instrumented. The tracer falls back to using generic instrumentation, which is generally less efficient. Refer to the &lt;a href=&#34;#skip-go-specific-tracers&#34;&gt;skip go specific tracers&lt;/a&gt; section for details. .&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_otel_instrumented_services&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Disables Beyla instrumentation of services already instrumented with OpenTelemetry. Refer to the &lt;a href=&#34;#exclude-otel-instrumented-services&#34;&gt;exclude instrumented services&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exclude_otel_instrumented_services_span_metrics&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES_SPAN_METRICS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Disables Beyla span metric/service graph metric generation of services already instrumented with OpenTelemetry. Refer to the &lt;a href=&#34;#exclude-otel-instrumented-services&#34;&gt;exclude instrumented services&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;discovery-services&#34;&gt;Discovery services&lt;/h2&gt;
&lt;p&gt;You can override the service name, namespace, and other configurations per service type.&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;YAML&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines a name for the matching instrumented service. Refer to &lt;a href=&#34;#name&#34;&gt;name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(see description)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Defines a namespace for the matching instrumented service. Refer to &lt;a href=&#34;#namespace&#34;&gt;namespace&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(empty or K8s namespace)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;open_ports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Selects the process to instrument by the port it has open (listens to). Refer to &lt;a href=&#34;#open-ports&#34;&gt;open ports&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exe_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Selects the processes to instrument by their executable name path. Refer to &lt;a href=&#34;#executable-path&#34;&gt;executable path&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;containers_only&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Selects processes to instrument which are running in an OCI container. Refer to &lt;a href=&#34;#containers-only&#34;&gt;containers only&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;container_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by OCI container name. Refer to &lt;a href=&#34;#container-name&#34;&gt;Container name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes namespace. Refer to &lt;a href=&#34;#k8s-namespace&#34;&gt;K8s namespace&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_pod_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes Pod. Refer to &lt;a href=&#34;#k8s-pod-name&#34;&gt;K8s Pod name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_deployment_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes Deployment. Refer to &lt;a href=&#34;#k8s-deployment-name&#34;&gt;K8s deployment name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_replicaset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes ReplicaSet. Refer to &lt;a href=&#34;#k8s-replicaset-name&#34;&gt;K8s ReplicaSet name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_statefulset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes StatefulSet. Refer to &lt;a href=&#34;#k8s-statefulset-name&#34;&gt;K8s StatefulSet name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_daemonset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes DaemonSet. Refer to &lt;a href=&#34;#k8s-daemonset-name&#34;&gt;K8s DaemonSet name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_owner_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes Pod owner (Deployment, ReplicaSet, DaemonSet, or StatefulSet). Refer to &lt;a href=&#34;#k8s-owner-name&#34;&gt;K8s owner name&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_pod_labels&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes Pod labels. Refer to &lt;a href=&#34;#k8s-pod-labels&#34;&gt;K8s Pod labels&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;map[string]string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_pod_annotations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Filter services by Kubernetes Pod annotations. Refer to &lt;a href=&#34;#k8s-pod-annotations&#34;&gt;K8s Pod annotations&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;map[string]string (glob)&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Control what telemetry data to export for the matching service. Refer to &lt;a href=&#34;#exports&#34;&gt;Exports&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;(all signals)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;name&#34;&gt;Name&lt;/h3&gt;
&lt;p&gt;Defines a name for the matching instrumented service. Beyla uses it to populate the &lt;code&gt;service.name&lt;/code&gt; OTEL property and the &lt;code&gt;service_name&lt;/code&gt; Prometheus property in the exported metrics and traces.&lt;/p&gt;
&lt;p&gt;This option is deprecated, as multiple matches for the same &lt;code&gt;instrument&lt;/code&gt; entry mean multiple services share the same name. Refer to the &lt;a href=&#34;#override-service-name-and-namespace&#34;&gt;override service name and namespace&lt;/a&gt; section to enable automatic configuration of service name and namespace from diverse metadata sources.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t set this property, Beyla uses the following properties, in order of precedence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If Kubernetes is enabled:
&lt;ol&gt;
&lt;li&gt;The name of the Deployment that runs the instrumented process, if any&lt;/li&gt;
&lt;li&gt;The name of the ReplicaSet, DaemonSet, or StatefulSet that runs the instrumented process, if any&lt;/li&gt;
&lt;li&gt;The name of the Pod that runs the instrumented process&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;If Kubernetes isn&amp;rsquo;t enabled:
&lt;ol&gt;
&lt;li&gt;The name of the process executable file&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If multiple processes match the service selection criteria, the metrics and traces for all the instances might share the same service name. For example, when multiple instrumented processes run under the same Deployment, or have the same executable name. In that case, the reported &lt;code&gt;instance&lt;/code&gt; attribute lets you differentiate the different instances of the service.&lt;/p&gt;
&lt;h3 id=&#34;namespace&#34;&gt;Namespace&lt;/h3&gt;
&lt;p&gt;Defines a namespace for the matching instrumented service. If you don&amp;rsquo;t set this property, Beyla uses the Kubernetes namespace of the instrumented process, if available, or leaves it empty if Kubernetes isn&amp;rsquo;t available.&lt;/p&gt;
&lt;p&gt;This option is deprecated. Refer to the &lt;a href=&#34;#override-service-name-and-namespace&#34;&gt;overriding service name and namespace&lt;/a&gt; section to enable automatic configuration of service name and namespace from diverse metadata sources.&lt;/p&gt;
&lt;p&gt;This namespace is not a selector for Kubernetes namespaces. Beyla uses its value to set the value of standard telemetry attributes. For example, the &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/common/attribute-naming/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry &lt;code&gt;service.namespace&lt;/code&gt; attribute&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;open-ports&#34;&gt;Open ports&lt;/h3&gt;
&lt;p&gt;Selects the process to instrument by the port it has open (listens to). This property accepts a comma-separated list of ports, for example &lt;code&gt;80&lt;/code&gt;, and port ranges, for example &lt;code&gt;8000-8999&lt;/code&gt;. If the executable matches only one of the ports in the list, Beyla considers it a match.&lt;/p&gt;
&lt;p&gt;For example, specifying the following property:&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;discovery:
  instrument:
    - open_ports: 80,443,8000-8999&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Beyla selects any executable that opens port 80, 443, or any of the ports between 8000 and 8999 included.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;p&gt;If an executable opens multiple ports, you only need to specify one of those ports for Beyla to instrument all the HTTP/S and GRPC requests on all application ports. Currently, you can&amp;rsquo;t restrict the instrumentation only to the methods exposed through a specific port.&lt;/p&gt;
&lt;h3 id=&#34;executable-path&#34;&gt;Executable path&lt;/h3&gt;
&lt;p&gt;Selects the processes to instrument by their executable name path. This property accepts a glob to match against the full executable command line, including the directory where the executable resides on the file system.&lt;/p&gt;
&lt;p&gt;Beyla tries to instrument all the processes with an executable path matching this property. For example, setting &lt;code&gt;exe_path: *&lt;/code&gt; makes Beyla try to instrument all the executables in the host.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;containers-only&#34;&gt;Containers only&lt;/h3&gt;
&lt;p&gt;Selects processes to instrument which are running in an OCI container. To perform this check, Beyla inspects the process network namespace and matches it against its own network namespace. If Beyla doesn&amp;rsquo;t have enough permissions to perform the network namespace inspection, it ignores this option.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;container-name&#34;&gt;Container name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in OCI containers (such as Docker) with a name matching the provided glob pattern.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - container_name: &amp;#34;*testserver*&amp;#34;
    - container_name: &amp;#34;my-app-*&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example discovers all processes running in containers whose names contain &lt;code&gt;testserver&lt;/code&gt; or start with &lt;code&gt;my-app-&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-namespace&#34;&gt;K8s namespace&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes Namespaces with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-pod-name&#34;&gt;K8s Pod name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes Pods with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-deployment-name&#34;&gt;K8s deployment name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes Deployments with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-replicaset-name&#34;&gt;K8s replicaset name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes ReplicaSets with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-statefulset-name&#34;&gt;K8s statefulset name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes StatefulSets with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-daemonset-name&#34;&gt;K8s daemonset name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Kubernetes DaemonSet with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-owner-name&#34;&gt;K8s owner name&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Pods owned by a &lt;code&gt;Deployment&lt;/code&gt;, &lt;code&gt;ReplicaSet&lt;/code&gt;, &lt;code&gt;DaemonSet&lt;/code&gt;, or &lt;code&gt;StatefulSet&lt;/code&gt; with a name matching the provided glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;h3 id=&#34;k8s-pod-labels&#34;&gt;K8s Pod labels&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Pods with labels matching the provided value as glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - k8s_namespace: frontend
      k8s_pod_labels:
        instrument: beyla&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The preceding example discovers all Pods in the &lt;code&gt;frontend&lt;/code&gt; namespace that have a label &lt;code&gt;instrument&lt;/code&gt; with a value that matches the glob &lt;code&gt;beyla&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;k8s-pod-annotations&#34;&gt;K8s Pod annotations&lt;/h3&gt;
&lt;p&gt;This selector property limits the instrumentation to the applications running in the Pods with annotations matching the provided value as glob.&lt;/p&gt;
&lt;p&gt;If you specify other selectors in the same &lt;code&gt;instrument&lt;/code&gt; entry, the processes must match all the selector properties.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - k8s_namespace: backend
      k8s_pod_annotations:
        beyla.instrument: &amp;#34;true&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The preceding example discovers all Pods in the &lt;code&gt;backend&lt;/code&gt; namespace that have an annotation &lt;code&gt;beyla.instrument&lt;/code&gt; with a value that matches the glob &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;exports&#34;&gt;Exports&lt;/h3&gt;
&lt;p&gt;Controls which telemetry signals Beyla exports for the matching service. This property enables per-service feature enablement, allowing you to selectively enable specific observability capabilities for different services within a single Beyla instance.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;exports&lt;/code&gt; property accepts a list containing &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;traces&lt;/code&gt;, or both. An empty list &lt;code&gt;[]&lt;/code&gt; disables export for the service. If not specified, Beyla exports all configured telemetry signals.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - k8s_deployment_name: &amp;#34;*&amp;#34;
      exports: [metrics]
    - k8s_deployment_name: backend
      exports: [traces]
    - k8s_deployment_name: worker
      exports: []&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example configures Beyla to export only metrics for all services. For the specific case of &lt;code&gt;backend&lt;/code&gt;, only traces are enabled, and for &lt;code&gt;worker&lt;/code&gt;, everything is disabled. The order of defined instrument selectors matters, as later entries can override earlier export rules.&lt;/p&gt;
&lt;p&gt;For an export signal to function, you must configure the corresponding exporter in Beyla. For example, specifying &lt;code&gt;traces&lt;/code&gt; in the &lt;code&gt;exports&lt;/code&gt; list requires configuring the OTLP traces exporter via &lt;code&gt;otel_traces_export&lt;/code&gt;. Specifying &lt;code&gt;metrics&lt;/code&gt; requires configuring at least one metrics exporter, such as &lt;code&gt;prometheus_export&lt;/code&gt; or &lt;code&gt;otel_metrics_export&lt;/code&gt;. If you specify an export signal without configuring the corresponding exporter, Beyla ignores that signal.&lt;/p&gt;
&lt;h3 id=&#34;metrics-export-features&#34;&gt;Metrics export features&lt;/h3&gt;
&lt;p&gt;Additionally to configuring custom export modes per discovery instrumentation criteria, Beyla allows you to override the global metrics export features
for each discovery criteria by adding &lt;code&gt;metrics &amp;gt; features&lt;/code&gt; as a property to individual &lt;code&gt;discovery &amp;gt; instrument&lt;/code&gt; entries.&lt;/p&gt;
&lt;p&gt;For example:&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;metrics:
  features: [&amp;#39;application_service_graph&amp;#39;]
discovery:
  instrument:
    - open_ports: 3030,3040
      metrics:
        features:
          - &amp;#39;application&amp;#39;
          - &amp;#39;application_span&amp;#39;
          - &amp;#39;application_service_graph&amp;#39;
    - name: pyserver
      open_ports: 7773
      metrics:
        features:
          - &amp;#39;application&amp;#39;
    - name: apache
      open_ports: 8080
    - name: nginx
      open_ports: 8085
    - name: tomcat
      open_ports: 8090&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example configures Beyla to only export application service graph metrics by default, but it later overrides specific discovery criteria with different set of exported metrics.
The outcome of the configuration is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;apache&lt;/code&gt;, &lt;code&gt;nginx&lt;/code&gt;, and &lt;code&gt;tomcat&lt;/code&gt; service instances only export
&lt;code&gt;application_service_graph&lt;/code&gt; metrics (as defined in the top-level
&lt;code&gt;metrics &amp;gt; features&lt;/code&gt; configuration).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;pyserver&lt;/code&gt; service only exports the &lt;code&gt;application&lt;/code&gt; group of metrics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Services listening on ports 3030 or 3040 export the &lt;code&gt;application&lt;/code&gt;,
&lt;code&gt;application_span&lt;/code&gt;, and &lt;code&gt;application_service_graph&lt;/code&gt; metric groups.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;custom-trace-sampler&#34;&gt;Custom trace sampler&lt;/h3&gt;
&lt;p&gt;By using the &lt;code&gt;sampler&lt;/code&gt; property for an &lt;code&gt;instrument&lt;/code&gt; definition criteria, you can define individual trace sampling strategy for each &lt;code&gt;instrument&lt;/code&gt; criteria. This option overrides the default specified trace sampling configuration if it is defined for all instrumented services. For more details on configuring sampling, refer to the &lt;a href=&#34;../sample-traces/&#34;&gt;sample traces&lt;/a&gt; documentation section.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - k8s_deployment_name: backend
      sampler:
        name: &amp;#34;traceidratio&amp;#34;
        arg: &amp;#34;0.1&amp;#34;      
    - k8s_deployment_name: worker
otel_traces_export:
  sampler:
    name: &amp;#34;traceidratio&amp;#34;
    arg: &amp;#34;0.5&amp;#34;      &lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example configures a global trace sampling configuration with the &lt;code&gt;traceidratio&lt;/code&gt; sampling option of 50%, for all instrumented services. However, for the deployment name &lt;code&gt;backend&lt;/code&gt;, this discovery criteria defines an override that uses the same &lt;code&gt;traceidratio&lt;/code&gt; sampling option, but samples only 10% of the traces.&lt;/p&gt;
&lt;h3 id=&#34;custom-route-matching-rules&#34;&gt;Custom route matching rules&lt;/h3&gt;
&lt;p&gt;By using the &lt;code&gt;routes&lt;/code&gt; property for an &lt;code&gt;instrument&lt;/code&gt; definition criteria, you can define individual incoming and outgoing route matching rules for each &lt;code&gt;instrument&lt;/code&gt; criteria. This option appends to the default specified route matching patterns if it is defined for all instrumented services. For more details on configuring route matching patterns, refer to the &lt;a href=&#34;../routes-decorator/&#34;&gt;routes decorator&lt;/a&gt; documentation section.&lt;/p&gt;
&lt;p&gt;Unlike the default &lt;code&gt;routes&lt;/code&gt; pattern matching configuration option, the &lt;code&gt;instrument&lt;/code&gt; definition criteria routes option has separate section for defining route matching rules for &lt;code&gt;incoming&lt;/code&gt; and &lt;code&gt;outgoing&lt;/code&gt; requests. This allows for precise control of your HTTP route cardinality.&lt;/p&gt;
&lt;p&gt;For example:&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;discovery:
  instrument:
    - k8s_deployment_name: backend
      routes:
        incoming: [&amp;#34;/api/users/{user_id}&amp;#34;, &amp;#34;/api/customers/{customer_id}&amp;#34;]
        outgoing: [&amp;#34;/*&amp;#34;]  
    - k8s_deployment_name: frontend
routes:
  patterns:
    - /user/{id}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In the example above, we have global route matching pattern definition for the HTTP route &lt;code&gt;/user/{id}&lt;/code&gt;. However, the service &lt;code&gt;backend&lt;/code&gt; has additional route matchers for incoming calls to &lt;code&gt;/api/users/{user_id}&lt;/code&gt; and &lt;code&gt;/api/customers/{customer_id}&lt;/code&gt;, and an additional outgoing request pattern for &lt;code&gt;/*&lt;/code&gt;. If the &lt;code&gt;backend&lt;/code&gt; service was making high-cardinality outgoing calls that we didn&amp;rsquo;t want to store in out metrics database, by specifying a catch all outgoing pattern of &lt;code&gt;/*&lt;/code&gt;, we can selectively remove the problematic cardinality source without impacting all other services.&lt;/p&gt;
&lt;h2 id=&#34;survey-mode&#34;&gt;Survey mode&lt;/h2&gt;
&lt;p&gt;In survey mode, Beyla only performs service discovery and detects the programming language of each service, but doesn&amp;rsquo;t instrument any discovered services.&lt;/p&gt;
&lt;p&gt;Beyla writes the discovered information from survey mode to a metric called &lt;code&gt;survey_info&lt;/code&gt;, which uses the same attributes as the &lt;code&gt;target_info&lt;/code&gt; metric. The Prometheus exporter creates this metric based on the OpenTelemetry metric resource attributes. You can use survey mode to build external automated instrumentation solutions. For example, you can use the &lt;code&gt;survey_info&lt;/code&gt; metric to list available instrumentation targets and choose which ones to instrument.&lt;/p&gt;
&lt;p&gt;Configure the &lt;code&gt;survey&lt;/code&gt; section exactly like the &lt;code&gt;instrument&lt;/code&gt; section. For more details, see the &lt;a href=&#34;#discovery-services&#34;&gt;discovery services section&lt;/a&gt; of this document.&lt;/p&gt;
&lt;h2 id=&#34;exclude-services-from-instrumentation&#34;&gt;Exclude services from instrumentation&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;exclude_instrument&lt;/code&gt; section lets you specify selection criteria for excluding services from being instrumented. It follows the same definition format as described in the &lt;a href=&#34;#discovery-services&#34;&gt;discovery services&lt;/a&gt; section of this document.&lt;/p&gt;
&lt;p&gt;This option helps you avoid instrumenting services typically found in observability environments. For example, use this option to exclude instrumenting Prometheus.&lt;/p&gt;
&lt;h2 id=&#34;default-exclude-services-from-instrumentation&#34;&gt;Default exclude services from instrumentation&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;default_exclude_instrument&lt;/code&gt; section disables instrumentation of Beyla itself (self-instrumentation), as well as Grafana Alloy and the OpenTelemetry Collector.
It also disables instrumentation of various Kubernetes system namespaces to reduce the overall cost of metric generation. The following section contains all excluded
components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Excluded services by &lt;code&gt;exe_path&lt;/code&gt;: &lt;code&gt;*beyla&lt;/code&gt;, &lt;code&gt;*alloy&lt;/code&gt;, &lt;code&gt;*ebpf-instrument&lt;/code&gt;, &lt;code&gt;*obi&lt;/code&gt;, &lt;code&gt;*otelcol&lt;/code&gt;, &lt;code&gt;*otelcol-contrib&lt;/code&gt;, &lt;code&gt;*otelcol-contrib[!/]*&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Excluded services by &lt;code&gt;k8s_namespace&lt;/code&gt;: &lt;code&gt;kube-system&lt;/code&gt;, &lt;code&gt;kube-node-lease&lt;/code&gt;, &lt;code&gt;local-path-storage&lt;/code&gt;, &lt;code&gt;grafana-alloy&lt;/code&gt;, &lt;code&gt;cert-manager&lt;/code&gt;, &lt;code&gt;monitoring&lt;/code&gt;,
&lt;code&gt;gke-connect&lt;/code&gt;, &lt;code&gt;gke-gmp-system&lt;/code&gt;, &lt;code&gt;gke-managed-cim&lt;/code&gt;, &lt;code&gt;gke-managed-filestorecsi&lt;/code&gt;, &lt;code&gt;gke-managed-metrics-server&lt;/code&gt;, &lt;code&gt;gke-managed-system&lt;/code&gt;, &lt;code&gt;gke-system&lt;/code&gt;, &lt;code&gt;gke-managed-volumepopulator&lt;/code&gt;,
&lt;code&gt;gatekeeper-system&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Change this option to allow Beyla to instrument itself or some of the other excluded components.&lt;/p&gt;
&lt;p&gt;Note: to enable such self-instrumentation, you still need to include them in the &lt;code&gt;instrument&lt;/code&gt; section, or these components need to be
a part of a encompassing inclusion criteria.&lt;/p&gt;
&lt;h2 id=&#34;skip-go-specific-tracers&#34;&gt;Skip go specific tracers&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;skip_go_specific_tracers&lt;/code&gt; option disables the detection of Go specifics when the &lt;strong&gt;ebpf&lt;/strong&gt; tracer inspects executables to be instrumented. The tracer falls back to using generic instrumentation, which is generally less efficient.
This option should only be used for Go services built with Go versions older than 1.17.&lt;/p&gt;
&lt;h2 id=&#34;exclude-otel-instrumented-services&#34;&gt;Exclude otel instrumented services&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;exclude_otel_instrumented_services&lt;/code&gt; option disables Beyla instrumentation of services already instrumented with OpenTelemetry. Since Beyla is often deployed to monitor all services in a Kubernetes cluster, monitoring already instrumented services can lead to duplicate telemetry data, unless you carefully craft the instrumentation selection (or exclusion) criteria. To avoid unnecessary configuration overhead, Beyla monitors for OpenTelemetry SDK calls to publish metrics and traces, and automatically turns off instrumentation of services that publish their own telemetry data. Turn this option off if your application-generated telemetry data doesn&amp;rsquo;t conflict with the Beyla generated metrics and traces.&lt;/p&gt;
&lt;h2 id=&#34;override-service-name-and-namespace&#34;&gt;Override service name and namespace&lt;/h2&gt;
&lt;p&gt;If you export instrumentation data via OpenTelemetry or Prometheus, Beyla follows the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-operator/blob/main/README.md#how-resource-attributes-are-calculated-from-the-pods-metadata&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;service name conventions from the OpenTelemetry operator&lt;/a&gt; to improve interoperability with other instrumentation solutions.&lt;/p&gt;
&lt;p&gt;Beyla uses the following criteria in this order to automatically set the service name and namespace:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Resource attributes set via &lt;code&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/code&gt; and &lt;code&gt;OTEL_SERVICE_NAME&lt;/code&gt; environment variables of the instrumented process or container.&lt;/li&gt;
&lt;li&gt;In Kubernetes, resource attributes set via the following Pod annotations:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resource.opentelemetry.io/service.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resource.opentelemetry.io/service.namespace&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Kubernetes, resource attributes set via the following Pod labels:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/name&lt;/code&gt; sets the service name&lt;/li&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/part-of&lt;/code&gt; sets the service namespace&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Kubernetes, resource attributes calculated from the Pod owner&amp;rsquo;s metadata, in the following order (according to their availability):
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.replicaset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.statefulset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.daemonset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.cronjob.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.job.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.container.name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The executable name of the instrumented process.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can override the Kubernetes labels from the previous bullet 3 via configuration.&lt;/p&gt;
&lt;p&gt;In YAML:&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;attributes:
  kubernetes:
    resource_labels:
      service.name:
        # gets service name from the first existing Pod label
        - override-svc-name
        - app.kubernetes.io/name
      service.namespace:
        # gets service namespace from the first existing Pod label
        - override-svc-ns
        - app.kubernetes.io/part-of&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;They accept a comma-separated list of annotation and label names.&lt;/p&gt;
&lt;h2 id=&#34;minimum-process-age&#34;&gt;Minimum process age&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;min_process_age&lt;/code&gt; (environment variable &lt;code&gt;BEYLA_MIN_PROCESS_AGE&lt;/code&gt;) option sets a requirement for a process to be alive for at least certain amount of time before it is considered for instrumentation. The default value is &lt;code&gt;&amp;quot;5s&amp;quot;&lt;/code&gt; (five seconds). This option is a performance optimization related to cost of processing discovered binaries based on the chosen discovery criteria. It avoids instrumenting periodic short lived processes.&lt;/p&gt;
&lt;h2 id=&#34;route-harvesting&#34;&gt;Route harvesting&lt;/h2&gt;
&lt;p&gt;Since Beyla instruments at the protocol level, for HTTP requests we see the actual URL path, while the OpenTelemetry specification requires that we provide a low-cardinality URL route. Beyla has purpose built route detector, which uses heuristics and cardinality reduction logic to automatically determine the low-cardinality route from the protocol provided URL path (for more information on this refer to &lt;a href=&#34;../routes-decorator/&#34;&gt;Routes Decorator&lt;/a&gt;). However, for certain programming languages, Beyla can process the application symbols and extract the actual routes set in the application.&lt;/p&gt;
&lt;p&gt;Currently the route harvesting is supported for &lt;code&gt;Java&lt;/code&gt;, &lt;code&gt;Go&lt;/code&gt; and &lt;code&gt;NodeJS&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;route_harvester_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_ROUTE_HARVESTER_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;A timeout to abandon the route harvesting if it takes too long&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;10s&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disabled_route_harvesters&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;A list of disabled route harvesters. Available choices: [&amp;quot;&lt;code&gt;java&lt;/code&gt;&amp;quot;, &amp;ldquo;&lt;code&gt;nodejs&lt;/code&gt;&amp;rdquo;, &amp;ldquo;&lt;code&gt;go&lt;/code&gt;&amp;rdquo;]&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The route harvesting for &lt;code&gt;Java&lt;/code&gt; applications works by communicating with the JVM at runtime. &lt;code&gt;Java&lt;/code&gt; application typically load after a bit of time, which may result in incomplete route
information, if Beyla harvests the Java application routes immediately as it instruments the process. Therefore, Beyla performs Java route harvesting on Java applications which have been
running for at least 60 seconds. This value can be modified by setting the environment variable &lt;code&gt;BEYLA_JAVA_ROUTE_HARVEST_DELAY&lt;/code&gt; or by setting the configuration file option:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;discovery:
  route_harvester_advanced:
    java_harvest_delay: 30s&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="configure-beyla-service-discovery">Configure Beyla service discovery&lt;/h1>
&lt;p>The &lt;code>BEYLA_AUTO_TARGET_EXE&lt;/code> and &lt;code>BEYLA_OPEN_PORT&lt;/code> are environment variables that make it easier to configure Beyla to instrument a single service or a group of related services.&lt;/p></description></item><item><title>Configure Beyla metrics and traces attributes</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/metrics-traces-attributes/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/metrics-traces-attributes/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-metrics-and-traces-attributes&#34;&gt;Configure Beyla metrics and traces attributes&lt;/h1&gt;
&lt;p&gt;You can configure how Beyla decorates attributes for metrics and traces. Use the &lt;code&gt;attributes&lt;/code&gt; top YAML section to enable and configure how attributes are set.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;../../metrics/&#34;&gt;Beyla exported metrics&lt;/a&gt; document lists the attributes you can report with each metric. Beyla reports some attributes by default and hides others to control cardinality.&lt;/p&gt;
&lt;p&gt;For each metric, you control which attributes to see with the &lt;code&gt;select&lt;/code&gt; subsection. This is a map where each key is the name of a metric either in its OpenTelemetry or Prometheus port, and each metric has two sub-properties: &lt;code&gt;include&lt;/code&gt; and &lt;code&gt;exclude&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include&lt;/code&gt; is a list of attributes to report. Each attribute can be a name or a wildcard, for example, &lt;code&gt;k8s.dst.*&lt;/code&gt; to include all attributes starting with &lt;code&gt;k8s.dst&lt;/code&gt;. If you don&amp;rsquo;t provide an &lt;code&gt;include&lt;/code&gt; list, Beyla reports the default attribute set, refer to &lt;a href=&#34;../../metrics/&#34;&gt;Beyla exported metrics&lt;/a&gt; for more information about default attributes for a given metric&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exclude&lt;/code&gt; is a list of attribute names or wildcards to remove from the &lt;code&gt;include&lt;/code&gt; list, or the default attribute set&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&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;attributes:
  select:
    beyla_network_flow_bytes:
      # limit the beyla_network_flow_bytes attributes to only the three attributes
      include:
        - beyla.ip
        - src.name
        - dst.port
    db_client_operation_duration:
      # report all the possible attributes but db_query_text
      include: [&amp;#34;*&amp;#34;]
      exclude: [&amp;#34;db_query_text&amp;#34;]
    http_client_request_duration:
      # report the default attribute set but exclude the Kubernetes Pod information
      exclude: [&amp;#34;k8s.pod.*&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, you can use wildcards as metric names to add and exclude attributes for groups of metrics with the same name. For example:&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;attributes:
  select:
    http_*:
      include: [&amp;#34;*&amp;#34;]
      exclude: [&amp;#34;http_path&amp;#34;, &amp;#34;http_route&amp;#34;]
    http_client_*:
      # override http_* exclusion
      include: [&amp;#34;http_path&amp;#34;]
    http_server_*:
      # override http_* exclusion
      include: [&amp;#34;http_route&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In the previous example, all metrics with a name starting with &lt;code&gt;http_&lt;/code&gt; or &lt;code&gt;http.&lt;/code&gt; include all possible attributes except &lt;code&gt;http_path&lt;/code&gt; and &lt;code&gt;http_route&lt;/code&gt; or &lt;code&gt;http.path&lt;/code&gt;/&lt;code&gt;http.route&lt;/code&gt;. The &lt;code&gt;http_client_*&lt;/code&gt; and &lt;code&gt;http_server_*&lt;/code&gt; sections override the base configuration, enabling the &lt;code&gt;http_path&lt;/code&gt; attribute for HTTP client metrics and &lt;code&gt;http_route&lt;/code&gt; for HTTP server metrics.&lt;/p&gt;
&lt;p&gt;When a metric name matches multiple definitions using wildcards, exact matches take precedence over wildcard matches.&lt;/p&gt;
&lt;h2 id=&#34;instance-id-decoration&#34;&gt;Instance ID decoration&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;attributes.instance_id&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Beyla decorates metrics and traces with a unique instance ID string, identifying each instrumented application. By default, Beyla uses the host name that runs Beyla (can be a container or Pod name), followed by the PID of the instrumented process. You can override how the instance ID is composed in the &lt;code&gt;instance_id&lt;/code&gt; YAML subsection under the &lt;code&gt;attributes&lt;/code&gt; top-level section.&lt;/p&gt;
&lt;p&gt;For example:&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;attributes:
  instance_id:
    dns: false&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dns&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_HOSTNAME_DNS_RESOLUTION&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;If &lt;code&gt;true&lt;/code&gt;, Beyla tries to resolve the local hostname against the network DNS. If &lt;code&gt;false&lt;/code&gt;, uses local name. For more information, refer to the &lt;a href=&#34;#dns&#34;&gt;dns section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;true&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;override_hostname&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_HOSTNAME&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;If set, Beyla uses the provided string as the host part of the Instance ID. Overrides DNS resolution. For more information, refer to the &lt;a href=&#34;#override-hostname&#34;&gt;override hostname section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;dns&#34;&gt;DNS&lt;/h3&gt;
&lt;p&gt;If &lt;code&gt;true&lt;/code&gt;, Beyla tries to resolve the local hostname against the network DNS. If &lt;code&gt;false&lt;/code&gt;, it uses the local hostname.&lt;/p&gt;
&lt;h3 id=&#34;override-hostname&#34;&gt;Override hostname&lt;/h3&gt;
&lt;p&gt;If set, Beyla uses the provided string as the host part of the Instance ID instead of trying to resolve the host name. This option takes precedence over &lt;code&gt;dns&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;kubernetes-decorator&#34;&gt;Kubernetes decorator&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;attributes.kubernetes&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;attributes.kubernetes&lt;/code&gt; section of your YAML configuration or via environment variables.&lt;/p&gt;
&lt;p&gt;To enable this feature, you must provide extra permissions to the Beyla Pod. See the &lt;a href=&#34;../../setup/kubernetes/&#34;&gt;&amp;ldquo;Configuring Kubernetes metadata decoration section&amp;rdquo; in the &amp;ldquo;Running Beyla in Kubernetes&amp;rdquo;&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;If you set this option to &lt;code&gt;true&lt;/code&gt;, Beyla decorates metrics and traces with Kubernetes metadata. If you set it to &lt;code&gt;false&lt;/code&gt;, Beyla disables the Kubernetes metadata decorator. If you set it to &lt;code&gt;autodetect&lt;/code&gt;, Beyla tries to detect if it is running inside Kubernetes and enables metadata decoration if so.&lt;/p&gt;
&lt;p&gt;For example:&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;attributes:
  kubernetes:
    enable: true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_KUBE_METADATA_ENABLE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable or disable Kubernetes metadata decoration. Set to &lt;code&gt;autodetect&lt;/code&gt; to enable if running in Kubernetes. For more information, refer to the &lt;a href=&#34;#enable-kubernetes&#34;&gt;enable kubernetes section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean/string&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;kubeconfig_path&lt;/code&gt;&lt;p&gt;&lt;code&gt;KUBECONFIG&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Path to the Kubernetes configuration file. For more information, refer to the &lt;a href=&#34;#kubernete-configuration-path&#34;&gt;Kubernetes configuration path section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;~/.kube/config&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;disable_informers&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_KUBE_DISABLE_INFORMERS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;List of informers to disable (&lt;code&gt;node&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;). For more information, refer to the &lt;a href=&#34;#disable-informers&#34;&gt;disable informers section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;meta_restrict_local_node&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_KUBE_META_RESTRICT_LOCAL_NODE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Restrict metadata to local node only. For more information, refer to the &lt;a href=&#34;#meta-restrict-local-node&#34;&gt;meta restrict local node section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informers_sync_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_KUBE_INFORMERS_SYNC_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Maximum time to wait for Kubernetes metadata before starting. For more information, refer to the &lt;a href=&#34;#informers-sync-timeout&#34;&gt;informers sync timeout section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;Duration&lt;/td&gt;
              &lt;td&gt;30s&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;informers_resync_period&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_KUBE_INFORMERS_RESYNC_PERIOD&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Periodically resynchronize all Kubernetes metadata. For more information, refer to the &lt;a href=&#34;#informers-resynchronization-period&#34;&gt;informers resynchronization period section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;Duration&lt;/td&gt;
              &lt;td&gt;30m&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;service_name_template&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_SERVICE_NAME_TEMPLATE&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Go template for service names. For more information, refer to the &lt;a href=&#34;#service-name-template&#34;&gt;service name template section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(empty)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;enable-kubernetes&#34;&gt;Enable kubernetes&lt;/h3&gt;
&lt;p&gt;If you run Beyla in a Kubernetes environment, you can configure it to decorate traces and metrics with the standard OpenTelemetry labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s.namespace.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.statefulset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.replicaset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.daemonset.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.node.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.container.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.uid&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.pod.start_time&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k8s.cluster.name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;kubernetes-configuration-path&#34;&gt;Kubernetes configuration path&lt;/h3&gt;
&lt;p&gt;This is a standard Kubernetes configuration environment variable. Use it to tell Beyla where to find the Kubernetes configuration to communicate with the Kubernetes Cluster. Usually, you do not need to change this value.&lt;/p&gt;
&lt;h3 id=&#34;disable-informers&#34;&gt;Disable informers&lt;/h3&gt;
&lt;p&gt;The accepted value is a list that might contain &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This option lets you selectively disable some Kubernetes informers, which continuously listen to the Kubernetes API to get the metadata needed for decorating network metrics or application metrics and traces.&lt;/p&gt;
&lt;p&gt;When you deploy Beyla as a DaemonSet in very large clusters, all the Beyla instances creating multiple informers might overload the Kubernetes API.&lt;/p&gt;
&lt;p&gt;Disabling some informers causes reported metadata to be incomplete, but reduces the load on the Kubernetes API.&lt;/p&gt;
&lt;p&gt;You cannot disable the Pods informer. To do that, disable the whole Kubernetes metadata decoration.&lt;/p&gt;
&lt;h3 id=&#34;meta-restrict-local-node&#34;&gt;Meta restrict local node&lt;/h3&gt;
&lt;p&gt;If true, Beyla stores Pod and Node metadata only from the node where the Beyla instance runs.&lt;/p&gt;
&lt;p&gt;This option decreases the memory used to store metadata, but some metrics such as network bytes or service graph metrics won&amp;rsquo;t include metadata from destination pods on a different node.&lt;/p&gt;
&lt;h3 id=&#34;informers-sync-timeout&#34;&gt;Informers sync timeout&lt;/h3&gt;
&lt;p&gt;This is the maximum time Beyla waits to get all the Kubernetes metadata before starting to decorate metrics and traces. If this timeout is reached, Beyla starts normally, but the metadata attributes might be incomplete until all the Kubernetes metadata is updated in the background.&lt;/p&gt;
&lt;h3 id=&#34;informers-resynchronization-period&#34;&gt;Informers resynchronization period&lt;/h3&gt;
&lt;p&gt;Beyla immediately receives any update on resources&amp;rsquo; metadata. In addition, Beyla periodically resynchronizes all Kubernetes metadata at the frequency you specify with this property. Higher values reduce the load on the Kubernetes API service.&lt;/p&gt;
&lt;h3 id=&#34;service-name-template&#34;&gt;Service name template&lt;/h3&gt;
&lt;p&gt;You can template service names using Go templates. This lets you create conditional or extended service names.&lt;/p&gt;
&lt;p&gt;The following context is available to the template:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;Meta: (*informer.ObjectMeta)
  Name: (string)
  Namespace: (string)
  Labels:
    label1: lv1
    label2: lv2
  Annotations:
    Anno1: av1
    Anno2: av2
  Pod: (*PodInfo)
  ...

ContainerName: (string)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can find the full object and structure in the &lt;code&gt;kubecache informer.pb.go&lt;/code&gt; source file.&lt;/p&gt;
&lt;p&gt;Service name template examples:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{{- .Meta.Namespace }}/{{ index .Meta.Labels &amp;#34;app.kubernetes.io/name&amp;#34; }}/{{ index .Meta.Labels &amp;#34;app.kubernetes.io/component&amp;#34; -}}{{ if .ContainerName }}/{{ .ContainerName -}}{{ end -}}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{{- .Meta.Namespace }}/{{ index .Meta.Labels &amp;#34;app.kubernetes.io/name&amp;#34; }}/{{ index .Meta.Labels &amp;#34;app.kubernetes.io/component&amp;#34; -}}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, only the first line is used and trimmed to prevent white space in the service name.&lt;/p&gt;
&lt;h2 id=&#34;extra-group-attributes&#34;&gt;Extra group attributes&lt;/h2&gt;
&lt;p&gt;Beyla allows you to enhance your metrics with custom attributes using the &lt;code&gt;extra_group_attributes&lt;/code&gt; configuration. This gives you the flexibility to include additional metadata in your metrics, beyond the standard set.&lt;/p&gt;
&lt;p&gt;To use this feature, specify the group name and the list of attributes you want to include in that group.&lt;/p&gt;
&lt;p&gt;Currently, only the &lt;code&gt;k8s_app_meta&lt;/code&gt; group is supported. This group contains Kubernetes-specific metadata such as Pod name, namespace, container name, Pod UID, and more.&lt;/p&gt;
&lt;p&gt;Example 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;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;attributes:
  kubernetes:
    enable: true
  extra_group_attributes:
    k8s_app_meta: [&amp;#34;k8s.app.version&amp;#34;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding &lt;code&gt;k8s.app.version&lt;/code&gt; to the &lt;code&gt;extra_group_attributes &amp;gt; k8s_app_meta&lt;/code&gt; block causes the &lt;code&gt;k8s.app.version&lt;/code&gt; label to appear in the metrics.&lt;/li&gt;
&lt;li&gt;You can also define annotations with the prefix &lt;code&gt;resource.opentelemetry.io/&lt;/code&gt; and suffix &lt;code&gt;k8s.app.version&lt;/code&gt; in your Kubernetes manifests, these annotations are automatically included in the metrics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table describes the default group attributes.&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;Group&lt;/th&gt;
              &lt;th&gt;Label&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.namespace.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.pod.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.container.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.deployment.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.replicaset.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.daemonset.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.statefulset.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.node.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.pod.uid&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.pod.start_time&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.cluster.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k8s.owner.name&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;And the following table describes the metrics and their associated groups.&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;Group&lt;/th&gt;
              &lt;th&gt;OTEL Metric&lt;/th&gt;
              &lt;th&gt;Prom Metric&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process.cpu.utilization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process_cpu_utilization_ratio&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process.cpu.time&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process_cpu_time_seconds_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process.memory.usage&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process_memory_usage_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process.memory.virtual&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process_memory_virtual_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process.disk.io&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;process_disk_io_bytes_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;messaging.publish.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;messaging_publish_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;messaging.process.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;messaging_process_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.server.request.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_server_request_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.server.request.body.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_server_request_body_size_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.server.response.body.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_server_response_body_size_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.client.request.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_client_request_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.client.request.body.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_client_request_body_size_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http.client.response.body.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http_client_response_body_size_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;rpc.client.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;rpc_client_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;rpc.server.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;rpc_server_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;db.client.operation.duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;db_client_operation_duration_seconds&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu.kernel.launch.calls&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu_kernel_launch_calls_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu.kernel.grid.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu_kernel_grid_size_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu.kernel.block.size&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu_kernel_block_size_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;k8s_app_meta&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu.memory.allocations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;gpu_memory_allocations_bytes_total&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;configure-cardinality-limits&#34;&gt;Configure cardinality limits&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;attributes&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Since Beyla instruments at the protocol level, it doesn&amp;rsquo;t have access to programming language/framework information about host names or URL routes. Therefore, it&amp;rsquo;s possible to create a metric cardinality explosion, without putting restrictions on how many possible values can be reported for a given metric label. To limit the possibility of cardinality explosion, Beyla has several options that control cardinality.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;metric_span_names_limit&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_METRIC_SPAN_NAMES_LIMIT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets the maximum cardinality of the &lt;code&gt;span_name&lt;/code&gt; attribute for span metrics. See more details below.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(100)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rename_unresolved_hosts&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_RENAME_UNRESOLVED_HOSTS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Value used for the host and peer service graph attributes when they are empty or contain unresolved IP addresses to reduce cardinality.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;unresolved&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rename_unresolved_hosts_outgoing&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_RENAME_UNRESOLVED_HOSTS_OUTGOING&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Value used for the client peer service graph attribute when it&amp;rsquo;s empty or contain unresolved IP addresses to reduce cardinality.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;outgoing&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rename_unresolved_hosts_incoming&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_RENAME_UNRESOLVED_HOSTS_INCOMING&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Value used for the client peer service graph attribute when it&amp;rsquo;s empty or contain unresolved IP addresses to reduce cardinality.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;incoming&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;metric-span-name-limit&#34;&gt;Metric span name limit&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;metric_span_names_limit&lt;/code&gt; works &lt;code&gt;per service&lt;/code&gt; and only relates to span metrics (metrics option &lt;code&gt;application_span&lt;/code&gt;).
When the &lt;code&gt;span_name&lt;/code&gt; cardinality surpasses this limit, the &lt;code&gt;span_name&lt;/code&gt; is be reported as AGGREGATED for all future spans. If the value is set to less or equal to zero, the aggregation is disabled.&lt;/p&gt;
&lt;h3 id=&#34;unresolved-host-names&#34;&gt;Unresolved host names&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;rename_unresolved_hosts&lt;/code&gt;, &lt;code&gt;rename_unresolved_hosts_outgoing&lt;/code&gt; and &lt;code&gt;rename_unresolved_hosts_incoming&lt;/code&gt; only affect service graph metrics (metrics option &lt;code&gt;application_service_graph&lt;/code&gt;).&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-metrics-and-traces-attributes">Configure Beyla metrics and traces attributes&lt;/h1>
&lt;p>You can configure how Beyla decorates attributes for metrics and traces. Use the &lt;code>attributes&lt;/code> top YAML section to enable and configure how attributes are set.&lt;/p></description></item><item><title>Configure Beyla host name resolution</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/name-resolver/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/name-resolver/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-service-host-and-peer-name-resolution&#34;&gt;Configure Beyla service host and peer name resolution&lt;/h1&gt;
&lt;p&gt;Since Beyla instruments at the protocol level, it doesn&amp;rsquo;t have access to programming language/framework information about host and peer names. Instead, Beyla has access to the IP addresses used for the communication between the services which are monitored. Therefore Beyla sources this information from metadata services, such as the Kubernetes API, or from information found in protocol headers, for example HTTP&amp;rsquo;s Host header value.&lt;/p&gt;
&lt;h2 id=&#34;name-resolution-configuration&#34;&gt;Name resolution configuration&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;name_resolver&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;sources&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_NAME_RESOLVER_SOURCES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;A comma separated list of metadata sources to use for name resolution. More details below.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;[&amp;ldquo;k8s&amp;rdquo;]&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_len&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_NAME_RESOLVER_CACHE_LEN&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Size of the service name cache. Used to speed up reverse IP lookups.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(1024)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;cache_expiry&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_NAME_RESOLVER_CACHE_TTL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Time-to-live value for the service name cache.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;5m&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The possible values for the name resolver sources are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;k8s&lt;/code&gt;. Use Kubernetes API metadata for reverse IP address lookup.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dns&lt;/code&gt;. Use the host DNS for reverse IP address lookup. This option can cause flood of DNS requests in certain situations and should be used only on services that are not exposed to the Internet.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rdns&lt;/code&gt;. Beyla tracks DNS requests for instrumentation purposes. This option uses that information to build internal cache of DNS resolved names.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="configure-beyla-service-host-and-peer-name-resolution">Configure Beyla service host and peer name resolution&lt;/h1>
&lt;p>Since Beyla instruments at the protocol level, it doesn&amp;rsquo;t have access to programming language/framework information about host and peer names. Instead, Beyla has access to the IP addresses used for the communication between the services which are monitored. Therefore Beyla sources this information from metadata services, such as the Kubernetes API, or from information found in protocol headers, for example HTTP&amp;rsquo;s Host header value.&lt;/p></description></item><item><title>Configure Beyla instrumentation options</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/controlling-instrumentation/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/controlling-instrumentation/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-instrumentation-options&#34;&gt;Configure Beyla instrumentation options&lt;/h1&gt;
&lt;p&gt;This configuration section describes various options for controlling the instrumentation capabilities of Beyla related to distributed traces, context propagation and various protocol instrumentation options.&lt;/p&gt;
&lt;h2 id=&#34;distributed-traces-and-context-propagation&#34;&gt;Distributed traces and context propagation&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;ebpf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;ebpf&lt;/code&gt; section of your YAML configuration or via environment variables.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;enable_context_propagation&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_ENABLE_CONTEXT_PROPAGATION&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Deprecated. Use &lt;code&gt;context_propagation&lt;/code&gt; instead. For more information, refer to the &lt;a href=&#34;#enable-context-propagation&#34;&gt;enable context propagation section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;context_propagation&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_CONTEXT_PROPAGATION&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Controls trace context propagation method. Accepted: &lt;code&gt;all&lt;/code&gt;, &lt;code&gt;headers&lt;/code&gt;, &lt;code&gt;ip&lt;/code&gt;, &lt;code&gt;disabled&lt;/code&gt;. For more information, refer to the &lt;a href=&#34;#context-propagation&#34;&gt;context propagation section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;disabled&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;track_request_headers&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_TRACK_REQUEST_HEADERS&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Track incoming &lt;code&gt;Traceparent&lt;/code&gt; headers for trace spans. For more information, refer to the &lt;a href=&#34;#track-request-headers&#34;&gt;track request headers section&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;enable-context-propagation&#34;&gt;Enable context propagation&lt;/h3&gt;
&lt;p&gt;Deprecated. Use &lt;code&gt;context_propagation&lt;/code&gt; instead.&lt;/p&gt;
&lt;h3 id=&#34;context-propagation&#34;&gt;Context propagation&lt;/h3&gt;
&lt;p&gt;Beyla injects the &lt;code&gt;Traceparent&lt;/code&gt; header value for outgoing HTTP requests, so it can propagate any incoming context to downstream services. This context propagation works for any programming language.&lt;/p&gt;
&lt;p&gt;For TLS encrypted HTTP requests (HTTPS), Beyla encodes the &lt;code&gt;Traceparent&lt;/code&gt; header value at the TCP/IP packet level. Beyla must be present on both sides of the communication.&lt;/p&gt;
&lt;p&gt;The TCP/IP packet level encoding uses Linux Traffic Control (TC). eBPF programs that also use TC must chain correctly with Beyla. For more information about chaining programs, see the &lt;a href=&#34;../../cilium-compatibility/&#34;&gt;Cilium compatibility documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can disable the TCP/IP level encoding and TC programs by setting &lt;code&gt;context_propagation=&amp;quot;headers&amp;quot;&lt;/code&gt;. This context propagation is fully compatible with any OpenTelemetry distributed tracing library.&lt;/p&gt;
&lt;p&gt;Context propagation values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;all&lt;/code&gt;: Enable both HTTP and IP options context propagation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;headers&lt;/code&gt;: Enable context propagation via the HTTP headers only&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ip&lt;/code&gt;: Enable context propagation via the IP options field only&lt;/li&gt;
&lt;li&gt;&lt;code&gt;disabled&lt;/code&gt;: Disable trace context propagation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To use this option in containerized environments (Kubernetes and Docker), you must:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deploy Beyla as a &lt;code&gt;DaemonSet&lt;/code&gt; with host network access &lt;code&gt;hostNetwork: true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Volume mount the &lt;code&gt;/sys/fs/cgroup&lt;/code&gt; path from the host as local &lt;code&gt;/sys/fs/cgroup&lt;/code&gt; path&lt;/li&gt;
&lt;li&gt;Grant the &lt;code&gt;CAP_NET_ADMIN&lt;/code&gt; capability to the Beyla container&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;gRPC and HTTP2 are not supported.&lt;/p&gt;
&lt;p&gt;For an example of how to configure distributed traces in Kubernetes, see our &lt;a href=&#34;../../distributed-traces/&#34;&gt;Distributed traces with Beyla&lt;/a&gt; guide.&lt;/p&gt;
&lt;h3 id=&#34;track-request-headers&#34;&gt;Track request headers&lt;/h3&gt;
&lt;p&gt;This option lets Beyla process any incoming &lt;code&gt;Traceparent&lt;/code&gt; header values. If enabled, when Beyla sees an incoming server request with a &lt;code&gt;Traceparent&lt;/code&gt; header value, it uses the provided &amp;rsquo;trace id&amp;rsquo; to create its own trace spans.&lt;/p&gt;
&lt;p&gt;This option does not affect Go applications, where the &lt;code&gt;Traceparent&lt;/code&gt; field is always processed.&lt;/p&gt;
&lt;p&gt;Enabling this option may increase performance overhead in high request volume scenarios. This option is only useful when generating Beyla traces; it does not affect metrics.&lt;/p&gt;
&lt;h2 id=&#34;payload-extraction&#34;&gt;Payload extraction&lt;/h2&gt;
&lt;p&gt;Various cloud and database protocols are implemented on top of HTTP. For example, all AWS S3 (Amazon Web Services) requests are in fact HTTP requests. To create better traces and metrics, Beyla has custom protocol detectors which run on top of HTTP, by performing HTTP payload extraction. You can configure which payload extractors are enabled by default with the following options:&lt;/p&gt;
&lt;p&gt;YAML section:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;ebpf:
  http:
    graphql:&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&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;p&gt;&lt;code&gt;BEYLA_HTTP_GRAPHQL_ENABLED&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable GraphQL protocol detection in HTTP payload processing.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(true)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;YAML section:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;ebpf:
  http:
    elasticsearch:&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&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;p&gt;&lt;code&gt;BEYLA_HTTP_HTTP_ELASTICSEARCH_ENABLED&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable Elasticsearch protocol detection in HTTP payload processing. See below for details.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(true)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;code&gt;Opensearch&lt;/code&gt; is a fork of &lt;code&gt;Elasticsearch&lt;/code&gt; and therefore also 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;Product&lt;/th&gt;
              &lt;th&gt;Methods&lt;/th&gt;
              &lt;th&gt;Version&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Elasticsearch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;/_search, /_msearch, /_bulk, /_doc&lt;/td&gt;
              &lt;td&gt;7.14&#43;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;Opensearch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;/_search, /_msearch, /_bulk, /_doc&lt;/td&gt;
              &lt;td&gt;3.0.0&#43;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;YAML section:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;ebpf:
  http:
    aws:&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&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;p&gt;&lt;code&gt;BEYLA_HTTP_HTTP_AWS_ENABLED&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable AWS services protocol detection in HTTP payload processing. See below for list of AWS supported protocols.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(true)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;List of supported AWS services protocol detectors:&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;Protocol&lt;/th&gt;
              &lt;th&gt;Methods&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;S3&lt;/td&gt;
              &lt;td&gt;CreateBucket, DeleteBucket, PutObject, DeleteObject, ListBuckets, ListObjects, GetObject&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;SQS&lt;/td&gt;
              &lt;td&gt;All&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;configure-data-processing-buffer-sizes&#34;&gt;Configure data processing buffer sizes&lt;/h2&gt;
&lt;p&gt;To minimize the performance impact of eBPF data collection, Beyla uses limited payload buffer size capture for various protocols, which gives us the best quality to performance ratio. However, for certain kinds of protocols, especially for some that are mentioned in &lt;a href=&#34;#payload-extraction&#34;&gt;Payload extraction&lt;/a&gt;, it might be beneficial to use larger buffer sizes. The following section describes the configuration options for controlling the auxiliary buffers captured for higher quality trace generation.&lt;/p&gt;
&lt;p&gt;YAML section:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;ebpf:
  buffer_sizes:&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Maximum&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_BUFFER_SIZE_HTTP&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Auxiliary buffer size (in bytes) for HTTP protocol capture.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(0)&lt;/td&gt;
              &lt;td&gt;8192&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;mysql&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_BUFFER_SIZE_MYSQL&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Auxiliary buffer size (in bytes) for MYSQL protocol capture.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(0)&lt;/td&gt;
              &lt;td&gt;8192&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;postgres&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_BUFFER_SIZE_POSTGRES&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Auxiliary buffer size (in bytes) for POSTGRESQL protocol capture.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(0)&lt;/td&gt;
              &lt;td&gt;8192&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;other-attributes&#34;&gt;Other attributes&lt;/h2&gt;
&lt;p&gt;YAML section: &lt;code&gt;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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;heuristic_sql_detect&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_HEURISTIC_SQL_DETECT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable heuristic SQL client detection. See below for details.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(false)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;heuristic sql detect&lt;/code&gt; option lets Beyla detect SQL client requests by inspecting query statements, even if the protocol is not directly supported. By default, Beyla detects SQL client requests by their binary protocol format. If you use a database technology not directly supported by Beyla, you can enable this option to get database client telemetry. This option is not enabled by default, because it can create false positives, for example, if an application sends SQL text for logging through a TCP connection. Currently, Beyla natively supports the Postgres and MySQL binary protocols.&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_transaction_time&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_MAX_TRANSACTION_TIME&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Maximum allowed transaction time. See below for details.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(5m)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;max_transaction_time&lt;/code&gt; option configures the distributed tracing transaction correlation maximum allowed time. It specifies the maximum time allowed for two requests to be correlated as parent -&amp;gt; child.
This is implemented as a safety measure for limiting the maximum possible trace size, because some programs (for example load generators) keep on generating requests from the same thread in perpetuity, which can generate very large traces.
If a child request has started later than the time specified by &lt;code&gt;max_transaction_time&lt;/code&gt;, then we consider the two requests not correlated to prevent infinite traces.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-instrumentation-options">Configure Beyla instrumentation options&lt;/h1>
&lt;p>This configuration section describes various options for controlling the instrumentation capabilities of Beyla related to distributed traces, context propagation and various protocol instrumentation options.&lt;/p></description></item><item><title>Configure Beyla language specific agents</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/language-agents/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/language-agents/</guid><content><![CDATA[&lt;h1 id=&#34;language-specific-agents&#34;&gt;Language specific agents&lt;/h1&gt;
&lt;p&gt;Certain programming languages that Beyla instruments are using &lt;code&gt;managed runtimes&lt;/code&gt; with complicated threading models, such that Beyla cannot perform correct thread context propagation solely by using eBPF based techniques. In certain situations, for example Java, capturing TLS traffic is also not possible by eBPF techniques, because the Java SDK has its own TLS implementation written in Java. A lot of these programming languages start program execution with interpreters, but later perform method or execution trace compilation using Just-In-Time(JIT) compilers, which generate code in anonymous memory regions. These anonymous regions cannot be attached to with eBPF uprobes, because there is no Linux &lt;code&gt;inode&lt;/code&gt; number associated with them. Therefore, it&amp;rsquo;s not possible to perform eBPF instrumentation on the generated code, without potentially unstable techniques of stopping the program with &lt;code&gt;ptrace&lt;/code&gt; and remapping the anonymous regions to memory mapped files.&lt;/p&gt;
&lt;p&gt;Because of the inherent limitation of certain programming languages and technologies, Beyla dynamically injects tiny language specific agents for certain languages, to be able to perform TLS traffic capture and context propagation. Currently, Beyla uses language agents for &lt;code&gt;Java&lt;/code&gt; and &lt;code&gt;NodeJS&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;YAML section: &lt;code&gt;nodejs&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&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;p&gt;&lt;code&gt;BEYLA_NODEJS_ENABLED&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable dynamic injection of the &lt;code&gt;NodeJS&lt;/code&gt; agent.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(true)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;NodeJS&lt;/code&gt; agent is used only for context propagation, since NodeJS uses &lt;code&gt;libssl&lt;/code&gt; for TLS encryption and decryption. This agent is injected via the debugger interface. You should disable the &lt;code&gt;NodeJS&lt;/code&gt; agent support if your program has a handler attached on &lt;code&gt;SIGUSR1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;YAML section: &lt;code&gt;javaagent&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;YAML option&lt;p&gt;Environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&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;p&gt;&lt;code&gt;BEYLA_JAVAAGENT_ENABLED&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Enable dynamic injection of the Java agent.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(true)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;attach_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_JAVAAGENT_ATTACH_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Timeout for waiting on dynamic attach to succeed.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;10s&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;Java&lt;/code&gt; agent is used for both context propagation and for TLS traffic capture. The dynamic injection of the agent is supported for &lt;code&gt;OpenJDK Hotspot&lt;/code&gt; JVM (and derivatives) and for &lt;code&gt;OpenJ9&lt;/code&gt;. Minimum &lt;code&gt;Java&lt;/code&gt; version supported is &lt;code&gt;Java 8&lt;/code&gt;. If the JVM is busy during the agent attach process, the attach process may take longer than 10 seconds. You can use the &lt;code&gt;attach_timeout&lt;/code&gt; option to increase the time Beyla waits for the dynamic attach to successfully complete.&lt;/p&gt;
&lt;p&gt;Injection of the &lt;code&gt;Java&lt;/code&gt; agent requires that the target process has writeable file system, for example, the injection process doesn&amp;rsquo;t work for containers with read-only file systems.&lt;/p&gt;
]]></content><description>&lt;h1 id="language-specific-agents">Language specific agents&lt;/h1>
&lt;p>Certain programming languages that Beyla instruments are using &lt;code>managed runtimes&lt;/code> with complicated threading models, such that Beyla cannot perform correct thread context propagation solely by using eBPF based techniques. In certain situations, for example Java, capturing TLS traffic is also not possible by eBPF techniques, because the Java SDK has its own TLS implementation written in Java. A lot of these programming languages start program execution with interpreters, but later perform method or execution trace compilation using Just-In-Time(JIT) compilers, which generate code in anonymous memory regions. These anonymous regions cannot be attached to with eBPF uprobes, because there is no Linux &lt;code>inode&lt;/code> number associated with them. Therefore, it&amp;rsquo;s not possible to perform eBPF instrumentation on the generated code, without potentially unstable techniques of stopping the program with &lt;code>ptrace&lt;/code> and remapping the anonymous regions to memory mapped files.&lt;/p></description></item><item><title>Filter metrics and traces by attribute values</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/filter-metrics-traces/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/filter-metrics-traces/</guid><content><![CDATA[&lt;h1 id=&#34;filter-metrics-and-traces-by-attribute-values&#34;&gt;Filter metrics and traces by attribute values&lt;/h1&gt;
&lt;p&gt;You might want to restrict the reported metrics and traces to very concrete
event types based on the values of the attributes (for example, filter network
metrics to report only TCP traffic).&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;filter&lt;/code&gt; YAML section allows filtering both application and network metrics
by attribute values. It has the following structure:&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;filter:
  application:
    # map of attribute matches to restrict application metrics
  network:
    # map of attribute matches to restrict network metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For a list of metrics under the application and network family, as well as their
attributes, check the &lt;a href=&#34;../../metrics/&#34;&gt;Beyla exported metrics&lt;/a&gt; document.&lt;/p&gt;
&lt;p&gt;Each &lt;code&gt;application&lt;/code&gt; and &lt;code&gt;network&lt;/code&gt; filter section is a map where each key is an attribute
name (either in Prometheus or OpenTelemetry format), with either the &lt;code&gt;match&lt;/code&gt; or the &lt;code&gt;not_match&lt;/code&gt; property. Both properties accept a
&lt;a href=&#34;https://github.com/gobwas/glob&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;glob-like&lt;/a&gt; string (it can be a full value or include
wildcards). If you set the &lt;code&gt;match&lt;/code&gt; property, Beyla only reports the metrics and traces
matching the provided value for that given attribute. The &lt;code&gt;not_match&lt;/code&gt; property is the
negation of &lt;code&gt;match&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following example reports network metrics for connections targeting the destination port 53, excluding the UDP protocol:&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;filter:
  network:
    transport:
      not_match: UDP
    dst_port:
      match: &amp;#34;53&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following example filters application metrics to only report database operations for PostgreSQL and MongoDB:&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;filter:
  application:
    db.system.name:
      match: &amp;#34;{postgresql,mongodb}&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="filter-metrics-and-traces-by-attribute-values">Filter metrics and traces by attribute values&lt;/h1>
&lt;p>You might want to restrict the reported metrics and traces to very concrete
event types based on the values of the attributes (for example, filter network
metrics to report only TCP traffic).&lt;/p></description></item><item><title>Configure Beyla routes decorator</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/routes-decorator/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/routes-decorator/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-routes-decorator&#34;&gt;Configure Beyla routes decorator&lt;/h1&gt;
&lt;p&gt;YAML section: &lt;code&gt;routes&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure this component in the &lt;code&gt;routes&lt;/code&gt; section of your YAML configuration or with environment variables.&lt;/p&gt;
&lt;p&gt;You must configure this section in the YAML file. If you don&amp;rsquo;t provide a &lt;code&gt;routes&lt;/code&gt; section, Beyla creates a default routes pipeline stage and uses the &lt;code&gt;heuristic&lt;/code&gt; routes decorator.&lt;/p&gt;
&lt;p&gt;For example:&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;routes:
  patterns:
    - /basic/:rnd
  unmatched: path
  ignored_patterns:
    - /metrics
  ignore_mode: traces&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;patterns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of URL path patterns to match and set the &lt;code&gt;http.route&lt;/code&gt; property. Refer to &lt;a href=&#34;#patterns&#34;&gt;patterns&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignored_patterns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;List of URL path patterns to ignore. Discards trace/metric events if matched. Refer to &lt;a href=&#34;#ignored-patterns&#34;&gt;ignored patterns&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;list of strings&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ignore_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies which event types to ignore when using &lt;code&gt;ignored_patterns&lt;/code&gt;. Refer to &lt;a href=&#34;#ignore-mode&#34;&gt;ignore mode&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;all&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;unmatched&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Specifies what to do when an HTTP path doesn&amp;rsquo;t match any &lt;code&gt;patterns&lt;/code&gt; entries. Refer to &lt;a href=&#34;#unmatched&#34;&gt;unmatched&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;heuristic&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wildcard_char&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Character to use for path components replaced by cardinality reducing modes. Refer to &lt;a href=&#34;#wildcard-char&#34;&gt;wildcard char&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&amp;ldquo;*&amp;rdquo;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;max_path_segment_cardinality&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Maximum cardinality in a segment for the low-cardinality unmatched mode.&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;10&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;patterns&#34;&gt;Patterns&lt;/h2&gt;
&lt;p&gt;Beyla matches the provided URL path patterns and sets the &lt;code&gt;http.route&lt;/code&gt; trace/metric property. Use the &lt;code&gt;routes&lt;/code&gt; property when possible to reduce the cardinality of generated metrics.&lt;/p&gt;
&lt;p&gt;Each route pattern is a URL path with tags that group path segments. You can use the &lt;code&gt;:name&lt;/code&gt; or &lt;code&gt;{name}&lt;/code&gt; format for matcher tags.&lt;/p&gt;
&lt;p&gt;For example, if you define these patterns:&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;routes:
  patterns:
    - /user/{id}
    - /user/{id}/basket/{product}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Traces with these HTTP paths have the same &lt;code&gt;http.route=&#39;/user/{id}&#39;&lt;/code&gt; property:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;/user/123
/user/456&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Traces with these HTTP paths have the same &lt;code&gt;http.route=&#39;/user/{id}&#39;/basket/{product}&lt;/code&gt; property:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;/user/123/basket/1
/user/456/basket/3&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The route matcher also supports the wildcard character &lt;code&gt;*&lt;/code&gt;, which matches path prefixes. For example, if you define this pattern:&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;routes:
  patterns:
    - /user/*&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Any traces with HTTP paths starting with &lt;code&gt;/user&lt;/code&gt; (including &lt;code&gt;/user&lt;/code&gt; itself) match the route &lt;code&gt;/user/*&lt;/code&gt;. All these paths match as &lt;code&gt;/user/*&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;/user
/user/123
/user/123/basket/1
/user/456/basket/3&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;ignored-patterns&#34;&gt;Ignored patterns&lt;/h2&gt;
&lt;p&gt;Beyla matches the provided URL path against the defined patterns and discards trace or metric events if they match any &lt;code&gt;ignored_patterns&lt;/code&gt;. The format for &lt;code&gt;ignored_patterns&lt;/code&gt; is identical to &lt;code&gt;patterns&lt;/code&gt;. You can define ignored patterns with or without wildcard options. For example, if you define these ignored patterns:&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;routes:
  ignored_patterns:
    - /health
    - /v1/*&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Any event paths with a prefix of &lt;code&gt;/v1&lt;/code&gt; or equal to &lt;code&gt;/health&lt;/code&gt; are ignored.&lt;/p&gt;
&lt;p&gt;This is useful to prevent certain paths used for development or service health monitoring from being recorded as traces or metrics.&lt;/p&gt;
&lt;h2 id=&#34;ignore-mode&#34;&gt;Ignore mode&lt;/h2&gt;
&lt;p&gt;Use this property with &lt;code&gt;ignored_patterns&lt;/code&gt; to specify which event types to ignore.&lt;/p&gt;
&lt;p&gt;Possible values for &lt;code&gt;ignore_mode&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;all&lt;/code&gt; discards both &lt;strong&gt;metrics&lt;/strong&gt; and &lt;strong&gt;traces&lt;/strong&gt; that match &lt;code&gt;ignored_patterns&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;traces&lt;/code&gt; discards only &lt;strong&gt;traces&lt;/strong&gt; that match &lt;code&gt;ignored_patterns&lt;/code&gt;, metrics are still recorded&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metrics&lt;/code&gt; discards only &lt;strong&gt;metrics&lt;/strong&gt; that match &lt;code&gt;ignored_patterns&lt;/code&gt;, traces are still recorded&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you may want performance metrics for your health check API but not the overhead of trace records in your traces database. Set &lt;code&gt;ignore_mode&lt;/code&gt; to &lt;code&gt;traces&lt;/code&gt; so only traces matching &lt;code&gt;ignored_patterns&lt;/code&gt; are discarded, while metrics are still recorded.&lt;/p&gt;
&lt;h2 id=&#34;unmatched&#34;&gt;Unmatched&lt;/h2&gt;
&lt;p&gt;This property specifies what to do when an HTTP path doesn&amp;rsquo;t match any &lt;code&gt;patterns&lt;/code&gt; entries.&lt;/p&gt;
&lt;p&gt;Possible values for &lt;code&gt;unmatched&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;unset&lt;/code&gt; leaves the &lt;code&gt;http.route&lt;/code&gt; property unset&lt;/li&gt;
&lt;li&gt;&lt;code&gt;path&lt;/code&gt; copies the path value to the &lt;code&gt;http.route&lt;/code&gt; field. This can lead to cardinality explosion at the ingestion side&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wildcard&lt;/code&gt; sets the &lt;code&gt;http.route&lt;/code&gt; field to a generic asterisk-based &lt;code&gt;/**&lt;/code&gt; value&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#heuristic-route-decorator-mode&#34;&gt;&lt;code&gt;heuristic&lt;/code&gt;&lt;/a&gt; automatically derives &lt;code&gt;http.route&lt;/code&gt; from the path value using these rules:
&lt;ul&gt;
&lt;li&gt;Path components with numbers or characters outside the ASCII alphabet (or &lt;code&gt;-&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt;) are replaced by &lt;code&gt;wildcard_char&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Alphabetical components that don&amp;rsquo;t look like words are replaced by &lt;code&gt;wildcard_char&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#low-cardinality-route-decorator-mode&#34;&gt;&lt;code&gt;low-cardinality&lt;/code&gt;&lt;/a&gt; automatically derives &lt;code&gt;http.route&lt;/code&gt; from the path value, ensuring path components with
unbounded cardinality are replaced with &lt;code&gt;wildcard_char&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;wildcard-char&#34;&gt;Wildcard char&lt;/h2&gt;
&lt;p&gt;Use this property with &lt;code&gt;unmatched: heuristic&lt;/code&gt; to choose the character that replaces path components identified by heuristic mode. By default, Beyla uses an asterisk &lt;code&gt;&#39;*&#39;&lt;/code&gt;. The value should be quoted and must be a single character.&lt;/p&gt;
&lt;h2 id=&#34;heuristic-route-decorator-mode&#34;&gt;Heuristic route decorator mode&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;heuristic&lt;/code&gt; decorator is a best effort route decorator, which may still lead to cardinality explosion in some scenarios.
For example, GitHub URL paths are constructed like a directory tree, so all paths remain unique and lead to cardinality explosion. In this case consider the &lt;a href=&#34;#low-cardinality-route-decorator-mode&#34;&gt;low-cardinality&lt;/a&gt; route decorator.&lt;/p&gt;
&lt;p&gt;If your URL path patterns follow a certain structure and unique IDs are made of numbers or random characters, then the &lt;code&gt;heuristic&lt;/code&gt; decorator may work for your use case with minimal configuration. For example, these mock Google Docs URLs are correctly reduced to a low cardinality version:&lt;/p&gt;
&lt;p&gt;Both URL paths below:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;document/d/CfMkAGbE_aivhFydEpaRafPuGWbmHfG/edit (no numbers in the ID)
document/d/C2fMkAGb3E_aivhFyd5EpaRafP123uGWbmHfG/edit&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;are converted to a low cardinality route (using the default &lt;code&gt;wildcard_char&lt;/code&gt;):&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;document/d/*/edit&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;low-cardinality-route-decorator-mode&#34;&gt;Low cardinality route decorator mode&lt;/h2&gt;
&lt;p&gt;Low cardinality route decorator mode extends the &lt;a href=&#34;#heuristic-route-decorator-mode&#34;&gt;&lt;code&gt;heuristic&lt;/code&gt;&lt;/a&gt; mode by performing additional cardinality reduction after applying heuristics.&lt;/p&gt;
&lt;p&gt;The cardinality reduction logic detects cardinality explosion in specific URL path segments using this process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It builds a per-service route database by deconstructing URL path segments into nodes. For example, with &lt;code&gt;/api/users/123&lt;/code&gt;, there are three nodes: &lt;code&gt;api&lt;/code&gt; -&amp;gt; &lt;code&gt;users&lt;/code&gt; -&amp;gt; &lt;code&gt;123&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Each URL path segment node tracks how many unique children it has. For example, when processing &lt;code&gt;/api/users/abc&lt;/code&gt;, &lt;code&gt;/api/users/def&lt;/code&gt;, &lt;code&gt;/api/users/xyz&lt;/code&gt;, the &lt;code&gt;users&lt;/code&gt; node sees its children cardinality increase to 3.&lt;/li&gt;
&lt;li&gt;High cardinality URL path segment nodes are automatically collapsed when a threshold is reached. When a node&amp;rsquo;s children exceed &lt;code&gt;max_path_segment_cardinality&lt;/code&gt;, all children merge into a single wildcard node (&lt;code&gt;wildcard_char&lt;/code&gt;). Future paths through that segment return the &lt;code&gt;wildcard_char&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Example flow with &lt;code&gt;low-cardinality&lt;/code&gt; mode and &lt;code&gt;max_path_segment_cardinality=3&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Insert &lt;code&gt;/api/users/alice&lt;/code&gt;  -&amp;gt; &lt;code&gt;/api/users/alice&lt;/code&gt;   (cardinality: 1)&lt;/li&gt;
&lt;li&gt;Insert &lt;code&gt;/api/users/bob&lt;/code&gt;    -&amp;gt; &lt;code&gt;/api/users/bob&lt;/code&gt;     (cardinality: 2)&lt;/li&gt;
&lt;li&gt;Insert &lt;code&gt;/api/users/carol&lt;/code&gt;  -&amp;gt; &lt;code&gt;/api/users/carol&lt;/code&gt;   (cardinality: 3)&lt;/li&gt;
&lt;li&gt;Insert &lt;code&gt;/api/users/dave&lt;/code&gt;   -&amp;gt; &lt;code&gt;/api/users/*&lt;/code&gt;       (threshold exceeded, collapsed)&lt;/li&gt;
&lt;li&gt;Insert &lt;code&gt;/api/users/eve&lt;/code&gt;    -&amp;gt; &lt;code&gt;/api/users/*&lt;/code&gt;       (stays collapsed)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This means the first three routes match the original URL path. After the cardinality limit is reached, all future URL paths collapse to a low cardinality route.&lt;/p&gt;
&lt;p&gt;Note that the per-service low-cardinality route database is in-memory only and resets on every Beyla restart.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-routes-decorator">Configure Beyla routes decorator&lt;/h1>
&lt;p>YAML section: &lt;code>routes&lt;/code>&lt;/p>
&lt;p>You can configure this component in the &lt;code>routes&lt;/code> section of your YAML configuration or with environment variables.&lt;/p>
&lt;p>You must configure this section in the YAML file. If you don&amp;rsquo;t provide a &lt;code>routes&lt;/code> section, Beyla creates a default routes pipeline stage and uses the &lt;code>heuristic&lt;/code> routes decorator.&lt;/p></description></item><item><title>Configure Beyla Prometheus and OpenTelemetry metrics histograms</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/metrics-histograms/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/metrics-histograms/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-prometheus-and-opentelemetry-metrics-histograms&#34;&gt;Configure Beyla Prometheus and OpenTelemetry metrics histograms&lt;/h1&gt;
&lt;p&gt;You can configure Beyla Prometheus and OpenTelemetry metrics histograms. You can also choose to use native histograms and exponential histograms.&lt;/p&gt;
&lt;h2 id=&#34;override-histogram-buckets&#34;&gt;Override histogram buckets&lt;/h2&gt;
&lt;p&gt;You can override the histogram bucket boundaries for OpenTelemetry and Prometheus metrics exporters by setting the &lt;code&gt;buckets&lt;/code&gt; YAML configuration option:&lt;/p&gt;
&lt;p&gt;YAML section: &lt;code&gt;otel_metrics_export.buckets&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For example:&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;otel_metrics_export:
  buckets:
    duration_histogram: [0, 1, 2]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;duration_histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]float64&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Set the bucket boundaries for metrics related to request duration. Specifically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;http.server.request.duration&lt;/code&gt; (OTEL) / &lt;code&gt;http_server_request_duration_seconds&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.client.request.duration&lt;/code&gt; (OTEL) / &lt;code&gt;http_client_request_duration_seconds&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc.server.duration&lt;/code&gt; (OTEL) / &lt;code&gt;rpc_server_duration_seconds&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rpc.client.duration&lt;/code&gt; (OTEL) / &lt;code&gt;rpc_client_duration_seconds&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you leave the value unset, Beyla uses the default bucket boundaries from the &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry semantic conventions&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;YAML section: &lt;code&gt;prometheus_export.buckets&lt;/code&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;prometheus_export:
  buckets:
    request_size_histogram: [0, 10, 20, 22]
    response_size_histogram: [0, 10, 20, 22]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;YAML&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;request_size_histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]float64&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;response_size_histogram&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;[]float64&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Set the bucket boundaries for metrics related to request and response sizes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;http.server.request.body.size&lt;/code&gt; (OTEL) / &lt;code&gt;http_server_request_body_size_bytes&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.client.request.body.size&lt;/code&gt; (OTEL) / &lt;code&gt;http_client_request_body_size_bytes&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.server.response.body.size&lt;/code&gt; (OTEL) / &lt;code&gt;http_server_response_body_size_bytes&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.client.response.body.size&lt;/code&gt; (OTEL) / &lt;code&gt;http_client_response_body_size_bytes&lt;/code&gt; (Prometheus)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you leave the value unset, Beyla uses these default bucket boundaries:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;0, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These default values are UNSTABLE and may change if Prometheus or OpenTelemetry semantic conventions recommend different bucket boundaries.&lt;/p&gt;
&lt;h2 id=&#34;use-native-histograms-and-exponential-histograms&#34;&gt;Use native histograms and exponential histograms&lt;/h2&gt;
&lt;p&gt;For Prometheus, you enable &lt;a href=&#34;https://prometheus.io/docs/concepts/metric_types/#histogram&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;native histograms&lt;/a&gt; by &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/feature_flags/#native-histograms&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;enabling the &lt;code&gt;native-histograms&lt;/code&gt; feature in your Prometheus collector&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For OpenTelemetry, you can use &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;exponential histograms&lt;/a&gt; for the predefined histograms instead of defining the buckets manually. Set the standard &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION&lt;/a&gt; environment variable. See the &lt;code&gt;histogram_aggregation&lt;/code&gt; section in the &lt;a href=&#34;../export-data/&#34;&gt;OTEL metrics exporter&lt;/a&gt; section for more information.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-prometheus-and-opentelemetry-metrics-histograms">Configure Beyla Prometheus and OpenTelemetry metrics histograms&lt;/h1>
&lt;p>You can configure Beyla Prometheus and OpenTelemetry metrics histograms. You can also choose to use native histograms and exponential histograms.&lt;/p></description></item><item><title>Configure Beyla OpenTelemetry trace sampling</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/sample-traces/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/sample-traces/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-opentelemetry-trace-sampling&#34;&gt;Configure Beyla OpenTelemetry trace sampling&lt;/h1&gt;
&lt;p&gt;Beyla accepts the standard OpenTelemetry environment variables to configure the sampling ratio of traces.&lt;/p&gt;
&lt;p&gt;YAML section: &lt;code&gt;otel_traces_export.sampler&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;otel_traces_export.sampler&lt;/code&gt; section of your YAML configuration or via environment variables.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;otel_traces_export:
  sampler:
    name: &amp;#34;traceidratio&amp;#34;
    arg: &amp;#34;0.1&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you&amp;rsquo;re using Grafana Alloy as your OTEL collector, you can configure the sampling policy at that level instead.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_TRACES_SAMPLER&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the name of the sampler. Accepts standard sampler names from the &lt;a href=&#34;https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry specification&lt;/a&gt;. Refer to &lt;a href=&#34;#sampler-name&#34;&gt;sampler name&lt;/a&gt; for details.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;parentbased_always_on&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;arg&lt;/code&gt;&lt;p&gt;&lt;code&gt;OTEL_TRACES_SAMPLER_ARG&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Specifies the argument for the selected sampler. Only &lt;code&gt;traceidratio&lt;/code&gt; and &lt;code&gt;parentbased_traceidratio&lt;/code&gt; require an argument. Refer to &lt;a href=&#34;#sampler-argument&#34;&gt;sampler argument&lt;/a&gt; for details.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;sampler-name&#34;&gt;Sampler name&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;name&lt;/code&gt; property accepts the following standard sampler names:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;always_on&lt;/code&gt;: samples every trace. Be careful using this sampler in an application with significant traffic: a new trace will be started and exported for every request&lt;/li&gt;
&lt;li&gt;&lt;code&gt;always_off&lt;/code&gt;: samples no traces&lt;/li&gt;
&lt;li&gt;&lt;code&gt;traceidratio&lt;/code&gt;: samples a given fraction of traces (specified by the &lt;code&gt;arg&lt;/code&gt; property). The fraction must be a real value between 0 and 1. For example, a value of &lt;code&gt;&amp;quot;0.5&amp;quot;&lt;/code&gt; samples 50% of the traces. Fractions &amp;gt;= 1 always sample. Fractions &amp;lt; 0 are treated as zero. To respect the parent trace&amp;rsquo;s sampling configuration, use the &lt;code&gt;parentbased_traceidratio&lt;/code&gt; sampler&lt;/li&gt;
&lt;li&gt;&lt;code&gt;parentbased_always_on&lt;/code&gt; (default): parent-based version of &lt;code&gt;always_on&lt;/code&gt; sampler&lt;/li&gt;
&lt;li&gt;&lt;code&gt;parentbased_always_off&lt;/code&gt;: parent-based version of &lt;code&gt;always_off&lt;/code&gt; sampler&lt;/li&gt;
&lt;li&gt;&lt;code&gt;parentbased_traceidratio&lt;/code&gt;: parent-based version of &lt;code&gt;traceidratio&lt;/code&gt; sampler&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Parent-based samplers are composite samplers that behave differently based on the parent of the traced span. If the span has no parent, the root sampler is used to make the sampling decision. If the span has a parent, the sampling configuration depends on the sampling parent.&lt;/p&gt;
&lt;h2 id=&#34;sampler-argument&#34;&gt;Sampler argument&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;arg&lt;/code&gt; property specifies the argument for the selected sampler. Only &lt;code&gt;traceidratio&lt;/code&gt; and &lt;code&gt;parentbased_traceidratio&lt;/code&gt; require an argument.&lt;/p&gt;
&lt;p&gt;In YAML, you MUST provide this value as a string. Even if the value is numeric, make sure to enclose it in quotes in the YAML file (for example, &lt;code&gt;arg: &amp;quot;0.25&amp;quot;&lt;/code&gt;).&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-opentelemetry-trace-sampling">Configure Beyla OpenTelemetry trace sampling&lt;/h1>
&lt;p>Beyla accepts the standard OpenTelemetry environment variables to configure the sampling ratio of traces.&lt;/p>
&lt;p>YAML section: &lt;code>otel_traces_export.sampler&lt;/code>&lt;/p>
&lt;p>You can configure the component under the &lt;code>otel_traces_export.sampler&lt;/code> section of your YAML configuration or via environment variables.&lt;/p></description></item><item><title>Configure the Beyla internal metrics reporter</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/internal-metrics-reporter/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/internal-metrics-reporter/</guid><content><![CDATA[&lt;h1 id=&#34;configure-the-beyla-internal-metrics-reporter&#34;&gt;Configure the Beyla internal metrics reporter&lt;/h1&gt;
&lt;p&gt;YAML section: &lt;code&gt;internal_metrics&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This component reports internal metrics about the auto-instrumentation tool&amp;rsquo;s behavior.
You can export these metrics using &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; or &lt;a href=&#34;https://opentelemetry.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To export metrics with Prometheus, set &lt;code&gt;exporter&lt;/code&gt; to &lt;code&gt;prometheus&lt;/code&gt; in the &lt;code&gt;internal_metrics&lt;/code&gt; section. Then set &lt;code&gt;port&lt;/code&gt; in the &lt;code&gt;prometheus&lt;/code&gt; subsection.&lt;/p&gt;
&lt;p&gt;To export metrics with OpenTelemetry, set &lt;code&gt;exporter&lt;/code&gt; to &lt;code&gt;otel&lt;/code&gt; in the &lt;code&gt;internal_metrics&lt;/code&gt; section. Then set an endpoint in the &lt;code&gt;otel_metrics_export&lt;/code&gt; or &lt;code&gt;grafana.otlp&lt;/code&gt; section.&lt;/p&gt;
&lt;p&gt;Example:&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;internal_metrics:
  exporter: prometheus
  prometheus:
    port: 6060
    path: /internal/metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configuration-summary&#34;&gt;Configuration summary&lt;/h2&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;YAML&lt;/th&gt;
              &lt;th&gt;Environment Variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
              &lt;th&gt;Summary&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;exporter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_INTERNAL_METRICS_EXPORTER&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;disabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#internal-metrics-exporter&#34;&gt;Selects the internal metrics exporter.&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;prometheus.port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;int&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#prometheus-port&#34;&gt;HTTP port for Prometheus scrape endpoint.&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;prometheus.path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_INTERNAL_METRICS_PROMETHEUS_PATH&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;/internal/metrics&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href=&#34;#prometheus-path&#34;&gt;HTTP query path for Prometheus metrics.&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;internal-metrics-exporter&#34;&gt;Internal metrics exporter&lt;/h2&gt;
&lt;p&gt;Set the internal metrics exporter.
You can use &lt;code&gt;disabled&lt;/code&gt;, &lt;code&gt;prometheus&lt;/code&gt;, or &lt;code&gt;otel&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;prometheus-port&#34;&gt;Prometheus port&lt;/h2&gt;
&lt;p&gt;Set the HTTP port for the Prometheus scrape endpoint.
If you leave it unset or set it to 0, Beyla doesn&amp;rsquo;t open a Prometheus endpoint and doesn&amp;rsquo;t report metrics.&lt;/p&gt;
&lt;p&gt;You can use the same value as &lt;a href=&#34;../export-data/#prometheus-http-endpoint&#34;&gt;&lt;code&gt;prometheus_export.port&lt;/code&gt;&lt;/a&gt; (both metric families share the same HTTP server, but use different paths), or use a different value (Beyla opens two HTTP servers for the different metric families).&lt;/p&gt;
&lt;h2 id=&#34;prometheus-path&#34;&gt;Prometheus path&lt;/h2&gt;
&lt;p&gt;Set the HTTP query path to fetch Prometheus metrics.&lt;/p&gt;
&lt;p&gt;If &lt;a href=&#34;../export-data/#prometheus-http-endpoint&#34;&gt;&lt;code&gt;prometheus_export.port&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;internal_metrics.prometheus.port&lt;/code&gt; use the same value, you can set &lt;code&gt;internal_metrics.prometheus.path&lt;/code&gt; to a different value than &lt;code&gt;prometheus_export.path&lt;/code&gt; to keep the metric families separate, or use the same value to list both metric families in the same scrape endpoint.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-the-beyla-internal-metrics-reporter">Configure the Beyla internal metrics reporter&lt;/h1>
&lt;p>YAML section: &lt;code>internal_metrics&lt;/code>&lt;/p>
&lt;p>This component reports internal metrics about the auto-instrumentation tool&amp;rsquo;s behavior.
You can export these metrics using &lt;a href="https://prometheus.io/" target="_blank" rel="noopener noreferrer">Prometheus&lt;/a> or &lt;a href="https://opentelemetry.io/" target="_blank" rel="noopener noreferrer">OpenTelemetry&lt;/a>.&lt;/p></description></item><item><title>Configure Beyla performance</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/tune-performance/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/tune-performance/</guid><content><![CDATA[&lt;h1 id=&#34;configure-beyla-performance&#34;&gt;Configure Beyla performance&lt;/h1&gt;
&lt;p&gt;YAML section: &lt;code&gt;grafana.otlp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can use the eBPF tracer to fine-tune Beyla performance.&lt;/p&gt;
&lt;p&gt;You can configure the component under the &lt;code&gt;ebpf&lt;/code&gt; section of your YAML configuration or with environment variables.&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;YAML&lt;p&gt;environment variable&lt;/p&gt;&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;wakeup_len&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_WAKEUP_LEN&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets how many messages Beyla accumulates in the eBPF ring buffer before sending a wake-up request to user space. Refer to &lt;a href=&#34;#wake-up-length&#34;&gt;wake up length&lt;/a&gt;.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(unset)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traffic_control_backend&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_TC_BACKEND&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Selects the backend for attaching traffic control probes. Refer to the &lt;a href=&#34;#traffic-control-backend&#34;&gt;traffic control backend&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;auto&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_request_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_HTTP_REQUEST_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets the time interval after which Beyla considers an HTTP request a timeout. Refer to the &lt;a href=&#34;#http-request-timeout&#34;&gt;HTTP request timeout&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(0ms)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;high_request_volume&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_HIGH_REQUEST_VOLUME&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sends telemetry events as soon as Beyla detects a response. Refer to the &lt;a href=&#34;#high-request-volume&#34;&gt;high request volume&lt;/a&gt; section for details.&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;(false)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;dns_request_timeout&lt;/code&gt;&lt;p&gt;&lt;code&gt;BEYLA_BPF_DNS_REQUEST_TIMEOUT&lt;/code&gt;&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;Sets the time interval after which Beyla considers an DNS request a timeout.&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(5s)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;wake-up-length&#34;&gt;Wake up length&lt;/h2&gt;
&lt;p&gt;Beyla accumulates messages in the eBPF ringbuffer and sends a wake-up request to user space when it reaches this value.&lt;/p&gt;
&lt;p&gt;For high-load services, set this option higher to reduce CPU overhead.&lt;/p&gt;
&lt;p&gt;For low-load services, high values can delay when Beyla submits metrics and when they become visible.&lt;/p&gt;
&lt;h2 id=&#34;traffic-control-backend&#34;&gt;Traffic control backend&lt;/h2&gt;
&lt;p&gt;This option selects the backend for attaching traffic control probes.
Linux 6.6 adds support for TCX, a file-descriptor based traffic control attachment. TCX is more robust, doesn&amp;rsquo;t require explicit qdisc management, and chains probes deterministically.
We recommend the &lt;code&gt;tcx&lt;/code&gt; backend for kernels &amp;gt;= 6.6.
When set to &lt;code&gt;auto&lt;/code&gt;, Beyla chooses the best backend for your kernel.&lt;/p&gt;
&lt;p&gt;Accepted backends: &lt;code&gt;tc&lt;/code&gt;, &lt;code&gt;tcx&lt;/code&gt;, and &lt;code&gt;auto&lt;/code&gt;.
If you leave this value empty or unset, Beyla uses &lt;code&gt;auto&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;http-request-timeout&#34;&gt;HTTP request timeout&lt;/h2&gt;
&lt;p&gt;This option sets how long Beyla waits before considering an HTTP request a timeout.
Beyla can report HTTP transactions that time out and never return.
Set this option to a non-zero value to enable automatic HTTP request timeouts. When a request times out, Beyla reports HTTP status code 408. Disconnects can look like timeouts, so setting this value may increase your request averages.&lt;/p&gt;
&lt;h2 id=&#34;high-request-volume&#34;&gt;High request volume&lt;/h2&gt;
&lt;p&gt;This option makes Beyla send telemetry events as soon as it detects a response.
It reduces timing accuracy for requests with large responses, but in high-volume scenarios, it helps reduce dropped trace events.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-beyla-performance">Configure Beyla performance&lt;/h1>
&lt;p>YAML section: &lt;code>grafana.otlp&lt;/code>&lt;/p>
&lt;p>You can use the eBPF tracer to fine-tune Beyla performance.&lt;/p>
&lt;p>You can configure the component under the &lt;code>ebpf&lt;/code> section of your YAML configuration or with environment variables.&lt;/p></description></item><item><title>Beyla configuration YAML example</title><link>https://grafana.com/docs/beyla/v3.9.x/configure/example/</link><pubDate>Wed, 15 Apr 2026 16:46:57 +0000</pubDate><guid>https://grafana.com/docs/beyla/v3.9.x/configure/example/</guid><content><![CDATA[&lt;h2 id=&#34;yaml-file-example&#34;&gt;YAML file example&lt;/h2&gt;
&lt;p&gt;An example Beyla YAML configuration file to send OTLP data to Grafana Cloud OTLP endpoint:&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;discovery:
  instrument:
    - open_ports: 443
log_level: DEBUG

ebpf:
  wakeup_len: 100

otel_traces_export:
  endpoint: https://otlp-gateway-prod-eu-west-0.grafana.net/otlp

prometheus_export:
  port: 8999
  path: /metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h2 id="yaml-file-example">YAML file example&lt;/h2>
&lt;p>An example Beyla YAML configuration file to send OTLP data to Grafana Cloud OTLP endpoint:&lt;/p>
&lt;div class="code-snippet ">&lt;div class="lang-toolbar">
&lt;span class="lang-toolbar__item lang-toolbar__item-active">YAML&lt;/span>
&lt;span class="code-clipboard">
&lt;button x-data="app_code_snippet()" x-init="init()" @click="copy()">
&lt;img class="code-clipboard__icon" src="/media/images/icons/icon-copy-small-2.svg" alt="Copy code to clipboard" width="14" height="13">
&lt;span>Copy&lt;/span>
&lt;/button>
&lt;/span>
&lt;div class="lang-toolbar__border">&lt;/div>
&lt;/div>&lt;div class="code-snippet ">
&lt;pre data-expanded="false">&lt;code class="language-yaml">discovery:
instrument:
- open_ports: 443
log_level: DEBUG
ebpf:
wakeup_len: 100
otel_traces_export:
endpoint: https://otlp-gateway-prod-eu-west-0.grafana.net/otlp
prometheus_export:
port: 8999
path: /metrics&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div></description></item></channel></rss>