<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/v1.3.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/v1.3.x/configure/index.xml" rel="self" type="application/rss+xml"/><item><title>Beyla configuration options</title><link>https://grafana.com/docs/beyla/v1.3.x/configure/options/</link><pubDate>Mon, 17 Mar 2025 08:44:01 +0100</pubDate><guid>https://grafana.com/docs/beyla/v1.3.x/configure/options/</guid><content><![CDATA[&lt;h1 id=&#34;beyla-configuration-options&#34;&gt;Beyla configuration options&lt;/h1&gt;
&lt;p&gt;Beyla can be configured via environment variables or via
a YAML configuration file that is 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 BEYLA_OPEN_PORT option,
is used to override any open_port settings inside the config.yaml 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_OPEN_PORT=8080 beyla -config /path/to/config.yaml&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_OPEN_PORT=8080 BEYLA_CONFIG_PATH=/path/to/config.yaml beyla&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;At the end of this document, there is an &lt;a href=&#34;#yaml-file-example&#34;&gt;example of YAML configuration file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Currently, Beyla consist of a pipeline of components which
generate, transform, and export traces from HTTP and GRPC services. In the
YAML configuration, each component has its own first-level section.&lt;/p&gt;
&lt;p&gt;The architecture below shows the different components of Beyla.
The dashed boxes in the diagram below can be enabled and disabled according to the configuration.&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/architecture-1.1.png&#34;
  alt=&#34;Grafana Beyla architecture&#34; width=&#34;394&#34;
     height=&#34;378&#34;/&gt;&lt;/p&gt;
&lt;p&gt;A quick description of the components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#service-discovery&#34;&gt;Service discovery&lt;/a&gt; searches for instrumentable processes matching
a given criteria.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ebpf-tracer&#34;&gt;EBPF tracer&lt;/a&gt; instruments the HTTP and GRPC services of an external process,
creates service traces and forwards them to the next stage of the pipeline.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#routes-decorator&#34;&gt;Routes decorator&lt;/a&gt; will match HTTP paths (e.g. &lt;code&gt;/user/1234/info&lt;/code&gt;)
into user-provided HTTP routes (e.g. &lt;code&gt;/user/{id}/info&lt;/code&gt;). If no routes are defined,
the incoming data will be directly forwarded to the next stage.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#kubernetes-decorator&#34;&gt;Kubernetes decorator&lt;/a&gt; will decorate the metrics and traces
with Kubernetes metadata of the instrumented Pods.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Grafana Cloud OTEL exporter for metrics and traces&lt;/a&gt;
simplifies the submission of OpenTelemetry metrics and traces to Grafana cloud.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#otel-metrics-exporter&#34;&gt;OTEL metrics exporter&lt;/a&gt; exports metrics data to an external
&lt;a href=&#34;https://opentelemetry.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry&lt;/a&gt; metrics collector.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#otel-traces-exporter&#34;&gt;OTEL traces exporter&lt;/a&gt; exports span data to an external
&lt;a href=&#34;https://opentelemetry.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry&lt;/a&gt; traces collector.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#prometheus-http-endpoint&#34;&gt;Prometheus HTTP endpoint&lt;/a&gt; enables an HTTP endpoint
that allows any external scraper to pull metrics in &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; format.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#internal-metrics-reporter&#34;&gt;Internal metrics reporter&lt;/a&gt; optionally reports metrics about the internal behavior of
the auto-instrumentation tool in &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt; format.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following sections explain the global configuration properties, as well as
the options for each component.&lt;/p&gt;
&lt;h2 id=&#34;global-configuration-properties&#34;&gt;Global configuration properties&lt;/h2&gt;
&lt;p&gt;The properties in this section are first-level YAML properties, as they apply to the
whole Beyla configuration:&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;Env var&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;executable_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_EXECUTABLE_NAME&lt;/code&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;p&gt;Selects the process to instrument by the executable name path. This property accepts
a regular expression to be matched against the full executable command line, including the directory
where the executable resides on the file system.&lt;/p&gt;
&lt;p&gt;This property is used to select a single process to instrument, or a group of processes of
similar characteristics. For more fine-grained process selection and grouping, you can
follow the instructions in the &lt;a href=&#34;#service-discovery&#34;&gt;service discovery section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;open_port&lt;/code&gt; property is set, the executable to be selected needs to match both properties.&lt;/p&gt;
&lt;p&gt;When instrumenting by using the executable name, choose a non-ambiguous name, a name that
will match a single executable on the target system.
For example, if you set &lt;code&gt;BEYLA_EXECUTABLE_NAME=server&lt;/code&gt;, and you have running two processes whose executables
have the following paths:&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;/usr/local/bin/language-server
/opt/app/server&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Beyla will match indistinctly one of the above processes and instrument both.
If you just want to instrument one of them, you should be as concrete as possible about
the value of the setting. For example, &lt;code&gt;BEYLA_EXECUTABLE_NAME=/opt/app/server&lt;/code&gt;
or just &lt;code&gt;BEYLA_EXECUTABLE_NAME=/server&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;/th&gt;
              &lt;th&gt;Env var&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;open_port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_OPEN_PORT&lt;/code&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;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 matching only one of the ports in the list, it is considered to match
the selection criteria.&lt;/p&gt;
&lt;p&gt;For example, specifying the following 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;open_port: 80,443,8000-8999&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Would make Beyla to select any executable that opens port 80, 443, or any of the ports between 8000 and 8999 included.&lt;/p&gt;
&lt;p&gt;This property is used to select a single process to instrument, or a group of processes of
similar characteristics. For more fine-grained process selection and grouping, you can
follow the instructions in the &lt;a href=&#34;#service-discovery&#34;&gt;service discovery section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;executable_name&lt;/code&gt; property is set, the executable to be selected needs to match both properties.&lt;/p&gt;
&lt;p&gt;If an executable opens multiple ports, only one of the ports needs to be specified
for Beyla &lt;strong&gt;to instrument all the
HTTP/S and GRPC requests on all application ports&lt;/strong&gt;. At the moment, there is no way to
restrict the instrumentation only to the methods exposed through a specific port.&lt;/p&gt;
&lt;p&gt;If the specified port range is wide (e.g. &lt;code&gt;1-65535&lt;/code&gt;) Beyla will try to execute all the processes
owning one of the ports in the range.&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;Env var&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;service_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_SERVICE_NAME&lt;/code&gt; or &lt;code&gt;OTEL_SERVICE_NAME&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(see &lt;a href=&#34;#service-discovery&#34;&gt;service discovery&lt;/a&gt; section)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Overrides the name of the instrumented service to be reported by the metrics exporter.
Defining this property is equivalent to add a &lt;code&gt;name&lt;/code&gt; entry into the &lt;a href=&#34;#service-discovery&#34;&gt;&lt;code&gt;discovery.services&lt;/code&gt; YAML
section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If a single instance of Beyla is instrumenting multiple instances of different processes,
they will share the same service name even if they are different. If you need that a
single instance of Beyla report different service names, follow the instructions in the
&lt;a href=&#34;#service-discovery&#34;&gt;service discovery section&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;service_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_SERVICE_NAMESPACE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(see &lt;a href=&#34;#service-discovery&#34;&gt;service discovery&lt;/a&gt; section)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Optionally, allows assigning a namespace for the service selected from the &lt;code&gt;executable_name&lt;/code&gt;
or &lt;code&gt;open_port&lt;/code&gt; properties.&lt;/p&gt;
&lt;p&gt;Defining this property is equivalent to add a &lt;code&gt;name&lt;/code&gt; entry into the &lt;a href=&#34;#service-discovery&#34;&gt;&lt;code&gt;discovery.services&lt;/code&gt; YAML
section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This will assume a single namespace for all the services instrumented
by Beyla. If you need that a single instance of Beyla groups multiple services
into different namespaces, follow the instructions in the
&lt;a href=&#34;#service-discovery&#34;&gt;service discovery section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is important to notice that this namespace is not a selector for Kubernetes namespaces. Its
value will be use 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;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;Env var&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;log_level&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_LOG_LEVEL&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Sets the verbosity level of the process standard output logger.
Valid log level values are: &lt;code&gt;DEBUG&lt;/code&gt;, &lt;code&gt;INFO&lt;/code&gt;, &lt;code&gt;WARN&lt;/code&gt; and &lt;code&gt;ERROR&lt;/code&gt;.
&lt;code&gt;DEBUG&lt;/code&gt; being the most verbose and &lt;code&gt;ERROR&lt;/code&gt; the least verbose.&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;Env var&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;print_traces&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_PRINT_TRACES&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;a id=&#34;printer&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;true&lt;/code&gt;, prints any instrumented trace on the standard output (stdout).&lt;/p&gt;
&lt;h2 id=&#34;service-discovery&#34;&gt;Service discovery&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;executable_name&lt;/code&gt;, &lt;code&gt;open_port&lt;/code&gt;, &lt;code&gt;service_name&lt;/code&gt; and &lt;code&gt;service_namespace&lt;/code&gt; are top-level
properties that simplify the configuration of Beyla to instrument a single service, or
a group of related services.&lt;/p&gt;
&lt;p&gt;In some scenarios, Beyla will instrument a big variety of 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 will let you specify a higher
differentiation degree in the services that Beyla can instrument.&lt;/p&gt;
&lt;p&gt;For example, it will allow overriding the service name and namespace 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;Env var&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;services&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;list of objects&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;p&gt;This section allows specifying different selection criteria for different services,
as well as overriding some of their metadata, such as their reported name or
namespace.&lt;/p&gt;
&lt;p&gt;For more details about this section, please go to the &lt;a href=&#34;#discovery-services-section&#34;&gt;discovery services section&lt;/a&gt;
of this document.&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;Env var&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;skip_go_specific_tracers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_SKIP_GO_SPECIFIC_TRACERS&lt;/code&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;p&gt;Disables the detection of Go specifics when ebpf tracer inspects executables to be instrumented.
The tracer will fallback to using generic instrumentation, which will generally be less efficient.&lt;/p&gt;
&lt;h3 id=&#34;discovery-services-section&#34;&gt;Discovery services section&lt;/h3&gt;
&lt;p&gt;Example of YAML file allowing the selection of multiple groups of services:&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:
  services:
    - exe_path: (worker)|(backend)|(frontend)
      namespace: MyApplication
    - exe_path: loadgen
      namespace: testing
      name: &amp;#34;TestLoadGenerator&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The above example YAML will select two groups of executables. The first group will be formed by any
process whose executable path contains the &lt;code&gt;worker&lt;/code&gt;, &lt;code&gt;backend&lt;/code&gt; or &lt;code&gt;frontend&lt;/code&gt; text. For each
service, Beyla will take the service name attribute from the executable name. The reported
service namespace for all the processes matching this group will be &lt;code&gt;MyApplication&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The second group in the above example YAML will select any executable whose path contains
&lt;code&gt;regexp&lt;/code&gt;, but instead of taking the service name from the executable name, it will override
the service name with &lt;code&gt;TestLoadGenerator&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The rest of this section describes the properties that are accepted in each entry of the
&lt;code&gt;services&lt;/code&gt; list.&lt;/p&gt;
&lt;p&gt;Each &lt;code&gt;services&lt;/code&gt; entry is a map where the properties can be grouped according to two purposes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overriding the reported service name and namespace: &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;namespace&lt;/code&gt; properties.&lt;/li&gt;
&lt;li&gt;Selecting the process to instrument: the rest of the properties, referred as &lt;em&gt;selectors&lt;/em&gt; in
this documentation.&lt;/li&gt;
&lt;/ul&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;Env var&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;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(see description)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Defines a name for the matching instrumented service. It will be used to populate the &lt;code&gt;service.name&lt;/code&gt;
OTEL property and/or the &lt;code&gt;service_name&lt;/code&gt; prometheus property in the exported metrics/traces.&lt;/p&gt;
&lt;p&gt;If the property is not set, it will default to any of 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 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 is not 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 described below,
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.id&lt;/code&gt; (OTEL) or
&lt;code&gt;target_instance&lt;/code&gt; (Prometheus) would allow differentiating the different instances
of the service.&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;Env var&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;namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(empty or K8s namespace)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Defines a namespace for the matching instrumented service.
If the property is not set, it will be defaulted to the Kubernetes namespace of
that runs the instrumented process, if Kubernetes is available, or empty when
Kubernetes is not available.&lt;/p&gt;
&lt;p&gt;It is important to notice that this namespace is not a selector for Kubernetes namespaces. Its
value will be use 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;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;Env var&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;open_ports&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&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;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 matching only one of the ports in the list, it is considered to match
the selection criteria.&lt;/p&gt;
&lt;p&gt;For example, specifying the following 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;open_port: 80,443,8000-8999&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Would make Beyla to select any executable that opens port 80, 443, or any of the ports between 8000 and 8999 included.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&lt;/p&gt;
&lt;p&gt;If an executable opens multiple ports, only one of the ports needs to be specified
for Beyla &lt;strong&gt;to instrument all the
HTTP/S and GRPC requests on all application ports&lt;/strong&gt;. At the moment, there is no way to
restrict the instrumentation only to the methods exposed through a specific port.&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;Env var&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;exe_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;Selects the processes to instrument by their executable name path. This property accepts
a regular expression to be matched against the full executable command line, including the directory
where the executable resides on the file system.&lt;/p&gt;
&lt;p&gt;Beyla will try to instrument all the processes with an executable path matching this property.
For example, setting &lt;code&gt;exe_path: .*&lt;/code&gt; will make Beyla to try to instrument all the
executables in the host.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_namespace&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes Namespaces with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_pod_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes Pods with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_deployment_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes Deployments with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_replicaset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes ReplicaSets with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_statefulset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes StatefulSets with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_daemonset_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Kubernetes DaemonSet with a name matching the provided regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&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;Env var&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;k8s_owner_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string (regular expression)&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;p&gt;This selector property will limit the instrumentation to the applications
running in the Pods having owned by either 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 regular
expression.&lt;/p&gt;
&lt;p&gt;If other selectors are specified in the same &lt;code&gt;services&lt;/code&gt; entry, the processes to be
selected need to match all the selector properties.&lt;/p&gt;
&lt;h2 id=&#34;ebpf-tracer&#34;&gt;EBPF tracer&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&lt;/th&gt;
              &lt;th&gt;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_BPF_WAKEUP_LEN&lt;/code&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;p&gt;Specifies how many messages need to be accumulated in the eBPF ringbuffer
before sending a wake-up request to the user space code.&lt;/p&gt;
&lt;p&gt;In high-load services (in terms of requests/second), tuning this option to higher values
can help with reducing the CPU overhead of Beyla.&lt;/p&gt;
&lt;p&gt;In low-load services (in terms of requests/second), high values of &lt;code&gt;wakeup_len&lt;/code&gt; could
add a noticeable delay in the time the metrics are submitted and become externally visible.&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;Env var&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;track_request_headers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_BPF_TRACK_REQUEST_HEADERS&lt;/code&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;p&gt;Enables tracking of request headers for the purposes of processing any incoming &amp;lsquo;Traceparent&amp;rsquo;
header values. If this option is enabled, when Beyla encounters an incoming server request with
a &amp;lsquo;Traceparent&amp;rsquo; header value, it will use the provided &amp;rsquo;trace id&amp;rsquo; to create its own trace spans.&lt;/p&gt;
&lt;p&gt;This option does not have an effect on Go applications, where the &amp;lsquo;Traceparent&amp;rsquo; field is always
processed, without additional tracking of the request headers.&lt;/p&gt;
&lt;p&gt;Enabling this option may increase Beyla&amp;rsquo;s performance overhead in high request volume scenarios.
Please note that this option is only useful when generating Beyla traces, it does not affect
generation of Beyla metrics.&lt;/p&gt;
&lt;h2 id=&#34;configuration-of-metrics-and-traces-attributes&#34;&gt;Configuration of metrics and traces attributes&lt;/h2&gt;
&lt;p&gt;Grafana Beyla allows configuring how some attributes for metrics and traces
are decorated. Under the &lt;code&gt;attributes&lt;/code&gt; top YAML sections, you can enable
other subsections configure how some attributes are set.&lt;/p&gt;
&lt;h3 id=&#34;instance-id-decoration&#34;&gt;Instance ID decoration&lt;/h3&gt;
&lt;p&gt;The metrics and the traces are decorated 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;
but 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;/th&gt;
              &lt;th&gt;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_HOSTNAME_DNS_RESOLUTION&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If &lt;code&gt;true&lt;/code&gt;, it will try to resolve the Beyla local hostname against the network DNS.
If &lt;code&gt;false&lt;/code&gt;, it will use the local hostname.&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;Env var&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;override_hostname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_HOSTNAME&lt;/code&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;p&gt;If set, the host part of the Instance ID will use the provided string
instead of trying to automatically resolve the host name.&lt;/p&gt;
&lt;p&gt;This option takes precedence over &lt;code&gt;dns&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;/th&gt;
              &lt;th&gt;Env var&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;override_instance_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_INSTANCE_ID&lt;/code&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;p&gt;If set, Beyla will use this value directly as instance ID of any instrumented
process. If you are managing multiple processes from a single Beyla instance,
all the processes will have the same instance ID.&lt;/p&gt;
&lt;h3 id=&#34;kubernetes-decorator&#34;&gt;Kubernetes decorator&lt;/h3&gt;
&lt;p&gt;If you run Beyla in a Kubernetes environment, you can configure it to decorate the 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.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;/ul&gt;
&lt;p&gt;In YAML, this section is named &lt;code&gt;kubernetes&lt;/code&gt;, and is located under the
&lt;code&gt;attributes&lt;/code&gt; top-level section. 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;p&gt;It is IMPORTANT to consider that enabling this feature requires a previous step of
providing some extra permissions to the Beyla Pod. Please check 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;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;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_KUBE_METADATA_ENABLE&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If set to &lt;code&gt;true&lt;/code&gt;, Beyla will decorate the metrics and traces with Kubernetes metadata.&lt;/p&gt;
&lt;p&gt;If set to &lt;code&gt;false&lt;/code&gt;, the Kubernetes metadata decorator will be disabled.&lt;/p&gt;
&lt;p&gt;If set to &lt;code&gt;autodetect&lt;/code&gt;, Beyla will try to automatically detect if it is running inside
Kubernetes, and enable the metadata decoration if that is the case.&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;Env var&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;kubeconfig_path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;KUBECONFIG&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;~/.kube/config&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;This is a standard Kubernetes configuration environment variable, and is used
to tell Beyla where to find the Kubernetes configuration in order to try to
establish communication with the Kubernetes Cluster.&lt;/p&gt;
&lt;p&gt;Usually you won&amp;rsquo;t need to change this value.&lt;/p&gt;
&lt;h2 id=&#34;routes-decorator&#34;&gt;Routes decorator&lt;/h2&gt;
&lt;p&gt;YAML section &lt;code&gt;routes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This section can be only configured via the YAML file. If no &lt;code&gt;routes&lt;/code&gt; section is provided in
the YAML file, a default routes&amp;rsquo; pipeline stage will be created and filtered with the &lt;code&gt;wildcard&lt;/code&gt;
routes decorator.&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;Env var&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;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;list of strings&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;p&gt;Will match the provided URL path patterns and set the &lt;code&gt;http.route&lt;/code&gt; trace/metric
property accordingly. You should use the &lt;code&gt;routes&lt;/code&gt; property
whenever possible to reduce the cardinality of generated metrics.&lt;/p&gt;
&lt;p&gt;Each route pattern is a URL path with specific tags which allow for grouping path
segments. The matcher tags can be in the &lt;code&gt;:name&lt;/code&gt; or &lt;code&gt;{name}&lt;/code&gt; format.&lt;/p&gt;
&lt;p&gt;For example, if you define the following 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 the following HTTP paths will include 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 the following HTTP paths will include 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;Additionally, the route matcher also supports the wildcard character &lt;code&gt;*&lt;/code&gt;, which can be used to
match path prefixes. For example, if you define the following 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) will be matched to the
route &lt;code&gt;/user/*&lt;/code&gt;. As per the example above, all of the following paths will be matched 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;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;Env var&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;ignored_patterns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;list of strings&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;p&gt;Will match the provided URL path against the defined patterns, and discard the trace and/or metric events if
they match any of the &lt;code&gt;ignored_patterns&lt;/code&gt;. The format for the &lt;code&gt;ignored_patterns&lt;/code&gt; field is identical
to the &lt;code&gt;patterns&lt;/code&gt; field described above. You can define the ignored patterns with or without
any of the wildcard options. For example, if you define the following 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 which have a prefix of &lt;code&gt;/v1&lt;/code&gt; or are equal to &lt;code&gt;/health&lt;/code&gt; will be ignored.&lt;/p&gt;
&lt;p&gt;This option is very useful if you want to prevent certain paths used development or service health monitoring, to be
recorded as traces or metrics.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;ignore_mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;all&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;This property can be used together with the &lt;code&gt;ignored_patterns&lt;/code&gt; property to refine which type of events are ignored.&lt;/p&gt;
&lt;p&gt;Possible values for the &lt;code&gt;ignore_mode&lt;/code&gt; property are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;all&lt;/code&gt; will discard both &lt;strong&gt;metrics&lt;/strong&gt; and &lt;strong&gt;traces&lt;/strong&gt; which match the &lt;code&gt;ignored_patterns&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;traces&lt;/code&gt; will discard only the &lt;strong&gt;traces&lt;/strong&gt; which match the &lt;code&gt;ignored_patterns&lt;/code&gt;. No metric events will be ignored.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metrics&lt;/code&gt; will discard only the &lt;strong&gt;metrics&lt;/strong&gt; which match the &lt;code&gt;ignored_patterns&lt;/code&gt;. No trace events will be ignored.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Selectively ignoring only certain type of events might be useful in certain scenarios. For example, you may want to
know the performance metrics of your health check API, but you wouldn&amp;rsquo;t want the overhead of those trace records in
your target traces database. In this this example scenario, you would set the &lt;code&gt;ignore_mode&lt;/code&gt; property to &lt;code&gt;traces&lt;/code&gt;, such
that only traces matching the &lt;code&gt;ignored_patterns&lt;/code&gt; will be discarded, while metrics will still be recorded.&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;Env var&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;unmatched&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&amp;ndash;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;wildcard&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies what to do when a trace HTTP path does not match any of the &lt;code&gt;patterns&lt;/code&gt; entries.&lt;/p&gt;
&lt;p&gt;Possible values for the &lt;code&gt;unmatched&lt;/code&gt; property are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;unset&lt;/code&gt; will leave the &lt;code&gt;http.route&lt;/code&gt; property as unset.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;path&lt;/code&gt; will copy the &lt;code&gt;http.route&lt;/code&gt; field property to the path value.
&lt;ul&gt;
&lt;li&gt;🚨 Caution: this option could lead to cardinality explosion at the ingester side.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wildcard&lt;/code&gt; will set the &lt;code&gt;http.route&lt;/code&gt; field property to a generic asterisk based &lt;code&gt;/**&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;heuristic&lt;/code&gt; will automatically derive the &lt;code&gt;http.route&lt;/code&gt; field property from the path value, based on the following rules:
&lt;ul&gt;
&lt;li&gt;Any path components which have numbers or characters outside of the ASCII alphabet (or &lt;code&gt;-&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt;), will be replaced by an asterisk &lt;code&gt;*&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Any alphabetical components which don&amp;rsquo;t look like words, will be replaced by an asterisk &lt;code&gt;*&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;special-considerations-when-using-the-heuristic-route-decorator-mode&#34;&gt;Special considerations when using the &lt;code&gt;heuristic&lt;/code&gt; route decorator mode&lt;/h3&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 certain scenarios.
For example, the GitHub URL paths are a good example where the &lt;code&gt;heuristic&lt;/code&gt; route decorator will not work, since the URL paths
are constructed like a directory tree. In this scenario all paths will remain unique and lead to cardinality explosion.&lt;/p&gt;
&lt;p&gt;On the other hand, if your URL path patterns follow certain structure, and the unique IDs are made up of numbers or random characters,
then the &lt;code&gt;heuristic&lt;/code&gt; decorator may be a low effort configuration option which is suitable for your use-case. For example, the following
mock Google Docs URLs will be 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;will be converted to a low cardinality route:&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;otel-metrics-exporter&#34;&gt;OTEL metrics exporter&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ If you plan to use Beyla to send metrics to Grafana Cloud,
please check the &lt;a href=&#34;#using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Grafana Cloud OTEL exporter for metrics and traces&lt;/a&gt;
section for easier configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;YAML section &lt;code&gt;otel_metrics_export&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This component exports OpenTelemetry metrics to a given endpoint. It will be enabled if
its &lt;code&gt;endpoint&lt;/code&gt; attribute is set (either via an YAML configuration file or via environment variables).&lt;/p&gt;
&lt;p&gt;In addition to the properties exposed in this section, this component implicitly 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 OTEL exporter configuration&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; or&lt;br/&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_ENDPOINT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL&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;p&gt;Specifies the OpenTelemetry endpoint where metrics will be sent. If you plan to send the
metrics directly to the Grafana Cloud OpenTelemetry endpoint, you might prefer to use the
configuration options in the
&lt;a href=&#34;#using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Using the Grafana Cloud OTEL endpoint to ingest metrics and traces&lt;/a&gt;
section.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; environment variable sets a common endpoint for both the metrics and the
&lt;a href=&#34;#otel-traces-exporter&#34;&gt;traces&lt;/a&gt; exporters. The &lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_ENDPOINT&lt;/code&gt; environment variable,
or the &lt;code&gt;endpoint&lt;/code&gt; YAML, property will set the endpoint only for the metrics exporter node,
such that the traces&amp;rsquo; exporter won&amp;rsquo;t be activated unless explicitly specified.&lt;/p&gt;
&lt;p&gt;According to the OpenTelemetry standard, if you set the endpoint via the &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; environment variable,
the OpenTelemetry exporter will automatically add the &lt;code&gt;/v1/metrics&lt;/code&gt; path to the URL. If you want to avoid this
addition, you can use either the &lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_ENDPOINT&lt;/code&gt; environment variable or the &lt;code&gt;environment&lt;/code&gt; YAML
property to use exactly the provided URL without any addition.&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;Env var&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;protocol&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt; or&lt;br/&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_PROTOCOL&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(guessed)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the transport/encoding protocol of the OpenTelemetry endpoint.&lt;/p&gt;
&lt;p&gt;The accepted values, as defined by the &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;OTLP Exporter Configuration document&lt;/a&gt; are &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;/p&gt;
&lt;p&gt;The &lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt; environment variable sets a common protocol for both the metrics and
&lt;a href=&#34;#otel-traces-exporter&#34;&gt;traces&lt;/a&gt; exporters. The &lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_PROTOCOL&lt;/code&gt; environment variable,
or the &lt;code&gt;protocol&lt;/code&gt; YAML property, will set the protocol only for the metrics exporter node.&lt;/p&gt;
&lt;p&gt;If this property is not provided, Beyla will guess it according to the following rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Beyla will guess &lt;code&gt;grpc&lt;/code&gt; if the port ends in &lt;code&gt;4317&lt;/code&gt; (&lt;code&gt;4317&lt;/code&gt;, &lt;code&gt;14317&lt;/code&gt;, &lt;code&gt;24317&lt;/code&gt;, &amp;hellip;),
as &lt;code&gt;4317&lt;/code&gt; is the usual Port number for the OTEL GRPC collector.&lt;/li&gt;
&lt;li&gt;Beyla will guess &lt;code&gt;http/protobuf&lt;/code&gt; if the port ends in &lt;code&gt;4318&lt;/code&gt; (&lt;code&gt;4318&lt;/code&gt;, &lt;code&gt;14318&lt;/code&gt;, &lt;code&gt;24318&lt;/code&gt;, &amp;hellip;),
as &lt;code&gt;4318&lt;/code&gt; is the usual Port number for the OTEL HTTP collector.&lt;/li&gt;
&lt;/ul&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;Env var&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;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_OTEL_INSECURE_SKIP_VERIFY&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Controls whether the OTEL client verifies the server&amp;rsquo;s certificate chain and host name.
If set to &lt;code&gt;true&lt;/code&gt;, the OTEL client accepts any certificate presented by the server
and any host name in that certificate. In this mode, TLS is susceptible to a man-in-the-middle
attacks. This option should be used only for testing and development purposes.&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;Env var&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;interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_METRICS_INTERVAL&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Duration&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;5s&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Configures the intervening time between exports.&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;Env var&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;report_target&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_METRICS_REPORT_TARGET&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies whether the exporter must submit &lt;code&gt;http.target&lt;/code&gt; as a metric attribute.&lt;/p&gt;
&lt;p&gt;According to the standard OpenTelemetry specification, &lt;code&gt;http.target&lt;/code&gt; is the full HTTP request
path and query arguments.&lt;/p&gt;
&lt;p&gt;It is disabled by default to avoid cardinality explosion in paths with IDs. As an alternative,
it is recommended to group these requests in the &lt;a href=&#34;#routes-decorator&#34;&gt;routes&amp;rsquo; node&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;report_peer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_METRICS_REPORT_PEER&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies whether the exporter must submit the caller peer address as a metric attribute.&lt;/p&gt;
&lt;p&gt;It is disabled by default to avoid cardinality explosion.&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;Env var&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;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(n/a)&lt;/td&gt;
              &lt;td&gt;Object&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;buckets&lt;/code&gt; object allows overriding the bucket boundaries of diverse histograms. See
&lt;a href=&#34;#overriding-histogram-buckets&#34;&gt;Overriding histogram buckets&lt;/a&gt; section for more details.&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;Environment variable&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;histogram_aggregation&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION&lt;/code&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;p&gt;Specifies the default aggregation to use for histogram instruments.&lt;/p&gt;
&lt;p&gt;Accepted values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;explicit_bucket_histogram&lt;/code&gt; (default): use &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;Explicit Bucket Histogram Aggregation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;base2_exponential_bucket_histogram&lt;/code&gt;: use &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;Base2 Exponential Bucket Histogram Aggregation&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;overriding-histogram-buckets&#34;&gt;Overriding histogram buckets&lt;/h3&gt;
&lt;p&gt;For both OpenTelemetry and Prometheus metrics exporters, you can override the histogram bucket
boundaries via a configuration file (see &lt;code&gt;buckets&lt;/code&gt; YAML section of your metrics exporter configuration).&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;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;Sets the bucket boundaries for the metrics related to the 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 the value is unset, the default bucket boundaries follow 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;recommendation from the 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;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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Sets the bucket boundaries for the metrics related to request sizes. This is:&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;/ul&gt;
&lt;p&gt;If the value is unset, the default bucket boundaries are:&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;The default values are UNSTABLE and could change if Prometheus or OpenTelemetry semantic
conventions recommend a different set of bucket boundaries.&lt;/p&gt;
&lt;h3 id=&#34;use-native-histograms-and-exponential-histograms&#34;&gt;Use native histograms and exponential histograms&lt;/h3&gt;
&lt;p&gt;For Prometheus, &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; are enabled if you
&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;enable 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. You need to set up 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;#otel-metrics-exporter&#34;&gt;OTEL metrics exporter&lt;/a&gt; section
for more information.&lt;/p&gt;
&lt;h2 id=&#34;otel-traces-exporter&#34;&gt;OTEL traces exporter&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ If you plan to use Beyla to send metrics to Grafana Cloud,
please check the &lt;a href=&#34;#using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Grafana Cloud OTEL exporter for metrics and traces&lt;/a&gt;
section for easier configuration.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;YAML section &lt;code&gt;otel_traces_export&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This component exports OpenTelemetry traces to a given endpoint. It will be enabled if
its &lt;code&gt;endpoint&lt;/code&gt; attribute is set (either via an YAML configuration file or via environment variables).&lt;/p&gt;
&lt;p&gt;In addition to the properties exposed in this section, this component implicitly 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 OTEL exporter configuration&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; or&lt;br/&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;URL&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;p&gt;Specifies the OpenTelemetry endpoint where the traces will be sent. If you plan to send the
metrics directly to the Grafana Cloud OpenTelemetry endpoint, you might prefer to use the
configuration options in the
&lt;a href=&#34;#using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Using the Grafana Cloud OTEL endpoint to ingest metrics and traces&lt;/a&gt;
section.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; environment variable sets a common endpoint for both the
&lt;a href=&#34;#otel-metrics-exporter&#34;&gt;metrics&lt;/a&gt; and the traces exporters. The &lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt; environment variable
or the &lt;code&gt;endpoint&lt;/code&gt; YAML property, will set the endpoint only for the traces&amp;rsquo; exporter node,
so the metrics exporter won&amp;rsquo;t be activated unless explicitly specified.&lt;/p&gt;
&lt;p&gt;According to the OpenTelemetry standard, if you set the endpoint via the &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; environment variable,
the OpenTelemetry exporter will automatically add the &lt;code&gt;/v1/traces&lt;/code&gt; path to the URL. If you want to avoid this
addition, you can use either the &lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt; environment variable or the &lt;code&gt;environment&lt;/code&gt; YAML
property to use exactly the provided URL without any addition.&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;Env var&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;protocol&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt; or&lt;br/&gt;&lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_PROTOCOL&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;(guessed)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the transport/encoding protocol of the OpenTelemetry traces endpoint.&lt;/p&gt;
&lt;p&gt;The accepted values, as defined by the &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;OTLP Exporter Configuration document&lt;/a&gt; are &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;/p&gt;
&lt;p&gt;The &lt;code&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/code&gt; environment variable sets a common protocol for both the metrics and
the &lt;a href=&#34;#otel-traces-exporter&#34;&gt;traces&lt;/a&gt; exporters. The &lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_PROTOCOL&lt;/code&gt; environment variable,
or the &lt;code&gt;protocol&lt;/code&gt; YAML property, will set the protocol only for the traces&amp;rsquo; exporter node.&lt;/p&gt;
&lt;p&gt;If this property is not provided, Beyla will guess it according to the following rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Beyla will guess &lt;code&gt;grpc&lt;/code&gt; if the port ends in &lt;code&gt;4317&lt;/code&gt; (&lt;code&gt;4317&lt;/code&gt;, &lt;code&gt;14317&lt;/code&gt;, &lt;code&gt;24317&lt;/code&gt;, &amp;hellip;),
as &lt;code&gt;4317&lt;/code&gt; is the usual Port number for the OTEL GRPC collector.&lt;/li&gt;
&lt;li&gt;Beyla will guess &lt;code&gt;http/protobuf&lt;/code&gt; if the port ends in &lt;code&gt;4318&lt;/code&gt; (&lt;code&gt;4318&lt;/code&gt;, &lt;code&gt;14318&lt;/code&gt;, &lt;code&gt;24318&lt;/code&gt;, &amp;hellip;),
as &lt;code&gt;4318&lt;/code&gt; is the usual Port number for the OTEL HTTP collector.&lt;/li&gt;
&lt;/ul&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;Env var&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;insecure_skip_verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_OTEL_INSECURE_SKIP_VERIFY&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;bool&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Controls whether the OTEL client verifies the server&amp;rsquo;s certificate chain and host name.
If set to &lt;code&gt;true&lt;/code&gt;, the OTEL client accepts any certificate presented by the server
and any host name in that certificate. In this mode, TLS is susceptible to a man-in-the-middle
attacks. This option should be used only for testing and development purposes.&lt;/p&gt;
&lt;h3 id=&#34;sampling-policy&#34;&gt;Sampling policy&lt;/h3&gt;
&lt;p&gt;Beyla accepts the standard OpenTelemetry environment variables to configure the
sampling ratio of traces.&lt;/p&gt;
&lt;p&gt;In addition, you can configure the sampling under the &lt;code&gt;sampler&lt;/code&gt; YAML subsection of the
&lt;code&gt;otel_traces_export&lt;/code&gt; section. 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_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 are using the Grafana Agent 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;/th&gt;
              &lt;th&gt;Env var&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;&lt;code&gt;OTEL_TRACES_SAMPLER&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the name of the sampler. It accepts the following 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;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;always_on&lt;/code&gt;: samples every trace. Be careful about 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
that is explained below). 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; would sample 50% of the traces.
Fractions &amp;gt;= 1 will always sample. Fractions &amp;lt; 0 are treated as zero. To respect the
parent trace&amp;rsquo;s sampling configuration, the &lt;code&gt;parentbased_traceidratio&lt;/code&gt; sampler should be used.&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 (see
explanation below).&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 (see
explanation below).&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 (see
explanation below).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Parent-based samplers are composite samplers which behave differently based on the
parent of the traced span. If the span has no parent, the root sampler is used to
make sampling decision. If the span has a parent, the sampling configuration
would depend on the sampling parent.&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;Env var&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;arg&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;OTEL_TRACES_SAMPLER_ARG&lt;/code&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;p&gt;Specifies the argument of the selected sampler. Currently, 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, this value MUST be provided as a string, so even if the value
is numeric, make sure that it is enclosed between quotes in the YAML file,
(for example, &lt;code&gt;arg: &amp;quot;0.25&amp;quot;&lt;/code&gt;).&lt;/p&gt;
&lt;h2 id=&#34;using-the-grafana-cloud-otel-endpoint-to-ingest-metrics-and-traces&#34;&gt;Using the Grafana Cloud OTEL endpoint to ingest metrics and traces&lt;/h2&gt;
&lt;p&gt;You can use the standard OpenTelemetry variables to submit the metrics and
traces to any standard OpenTelemetry endpoint, including Grafana Cloud.&lt;/p&gt;
&lt;p&gt;Alternatively, Beyla can be configured to submit OpenTelemetry data to
the Grafana Cloud OTEL endpoint using its own custom variables, allowing an
easier setup of the endpoint and the authentication.&lt;/p&gt;
&lt;p&gt;The properties can be defined via environment variables, or under the
&lt;code&gt;grafana&lt;/code&gt; top-level YAML section, &lt;code&gt;otlp&lt;/code&gt; subsection. 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_zone: prod-eu-west-0
    cloud_instance_id: 123456&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;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;GRAFANA_CLOUD_SUBMIT&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Accepts a list of strings with the kind of data that will be submitted to the
OTLP endpoint. It accepts &lt;code&gt;metrics&lt;/code&gt; and/or &lt;code&gt;traces&lt;/code&gt; as values.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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_zone&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;GRAFANA_CLOUD_ZONE&lt;/code&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;p&gt;The cloud zone of your Grafana endpoint. This will be used to compose the
Grafana OTLP URL. For example, if the value is &lt;code&gt;prod-eu-west-0&lt;/code&gt;, the
used OTLP URL will be &lt;code&gt;https://otlp-gateway-prod-eu-west-0.grafana.net/otlp&lt;/code&gt;.&lt;/p&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 will
override the destination endpoint, so the &lt;code&gt;cloud_zone&lt;/code&gt; configuration option
will be ignored.&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;Env var&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_instance_id&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;GRAFANA_CLOUD_INSTANCE_ID&lt;/code&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;p&gt;Your Grafana user name. It is usually a number but it must be set as a
string inside the YAML file.&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;Env var&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_api_key&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;GRAFANA_CLOUD_API_KEY&lt;/code&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;p&gt;API key of your Grafana Cloud account.&lt;/p&gt;
&lt;h2 id=&#34;prometheus-http-endpoint&#34;&gt;Prometheus HTTP endpoint&lt;/h2&gt;
&lt;p&gt;YAML section &lt;code&gt;prometheus_export&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This component opens an HTTP endpoint in the auto-instrumentation tool
that allows any external scraper to pull metrics in &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt;
format. It will be enabled if the &lt;code&gt;port&lt;/code&gt; property is set.&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;Env var&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;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_PROMETHEUS_PORT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;int&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;p&gt;Specifies the HTTP port for the Prometheus scrape endpoint. If unset or 0,
no Prometheus endpoint will be open.&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;Env var&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;path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_PROMETHEUS_PATH&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the HTTP query path to fetch the list of Prometheus metrics.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;report_target&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_METRICS_REPORT_TARGET&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies whether the exporter must submit &lt;code&gt;http_target&lt;/code&gt; as a metric attribute.&lt;/p&gt;
&lt;p&gt;To be consistent with the OpenTelemetry specification, &lt;code&gt;http_target&lt;/code&gt; is the full HTTP request
path and query arguments.&lt;/p&gt;
&lt;p&gt;It is disabled by default to avoid cardinality explosion in paths with IDs. As an alternative,
it is recommended to group these requests in the &lt;a href=&#34;#routes-decorator&#34;&gt;routes&amp;rsquo; node&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;YAML&lt;/th&gt;
              &lt;th&gt;Env var&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;report_peer&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;BEYLA_METRICS_REPORT_PEER&lt;/code&gt;&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;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies whether the exporter must submit the caller peer address as a metric attribute.&lt;/p&gt;
&lt;p&gt;It is disabled by default to avoid cardinality explosion.&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;Env var&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;buckets&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;(n/a)&lt;/td&gt;
              &lt;td&gt;Object&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;buckets&lt;/code&gt; object allows overriding the bucket boundaries of diverse histograms. See
&lt;a href=&#34;#overriding-histogram-buckets&#34;&gt;Overriding histogram buckets&lt;/a&gt; section for more details.&lt;/p&gt;
&lt;h2 id=&#34;internal-metrics-reporter&#34;&gt;Internal metrics reporter&lt;/h2&gt;
&lt;p&gt;YAML section &lt;code&gt;internal_metrics&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This component will report certain internal metrics about the behavior
of the auto-instrumentation tool, and expose them as a &lt;a href=&#34;https://prometheus.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus&lt;/a&gt;
scraper. It will be enabled if the &lt;code&gt;port&lt;/code&gt; property is set.&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;Env var&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;/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;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the HTTP port for the Prometheus scrape endpoint. If unset or 0,
no Prometheus endpoint will be open and no metrics will be accounted.&lt;/p&gt;
&lt;p&gt;Its value can be the same as &lt;a href=&#34;#prometheus-http-endpoint&#34;&gt;&lt;code&gt;prometheus_export.port&lt;/code&gt;&lt;/a&gt; (both metric families
will share the same HTTP server, though they can be accessed in different paths),
or a different value (two different HTTP servers for the different metric families).&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;Env var&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;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;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Specifies the HTTP query path to fetch the list of Prometheus metrics.
If &lt;a href=&#34;#prometheus-http-endpoint&#34;&gt;&lt;code&gt;prometheus_export.port&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;internal_metrics.port&lt;/code&gt; have the
same values, this &lt;code&gt;internal_metrics.path&lt;/code&gt; value can be
different from &lt;code&gt;prometheus_export.path&lt;/code&gt;, to keep both metric families separated,
or the same (both metric families will be listed in the same scrape endpoint).&lt;/p&gt;
&lt;h2 id=&#34;yaml-file-example&#34;&gt;YAML file example&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;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;open_port: 443
service_name: my-instrumented-service
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;h1 id="beyla-configuration-options">Beyla configuration options&lt;/h1>
&lt;p>Beyla can be configured via environment variables or via
a YAML configuration file that is 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 BEYLA_OPEN_PORT option,
is used to override any open_port settings inside the config.yaml file:&lt;/p></description></item><item><title>Beyla export modes</title><link>https://grafana.com/docs/beyla/v1.3.x/configure/export-modes/</link><pubDate>Mon, 17 Mar 2025 08:44:01 +0100</pubDate><guid>https://grafana.com/docs/beyla/v1.3.x/configure/export-modes/</guid><content><![CDATA[&lt;h1 id=&#34;beyla-export-modes&#34;&gt;Beyla export modes&lt;/h1&gt;
&lt;p&gt;Beyla can export data in two modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Agent mode&lt;/strong&gt; (recommended mode): the auto-instrumentation tool will send the metrics and the traces to the
&lt;a href=&#34;https://github.com/grafana/agent&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Agent&lt;/a&gt;, which will process and send them
to Mimir and Tempo. In this scenario, the Agent takes care of the authentication required by the Grafana Mimir/Tempo endpoints.
This mode also integrates better with some Grafana exclusive features,
such as the &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;/li&gt;
&lt;li&gt;&lt;strong&gt;Direct mode&lt;/strong&gt;: the auto-instrumentation tool can &lt;strong&gt;push&lt;/strong&gt; metrics and/or traces directly to a remote endpoint
(using the OpenTelemetry/OTEL protocols) or expose a Prometheus HTTP endpoint ready to be scraped (i.e. &lt;strong&gt;pull&lt;/strong&gt; mode).
In the direct OTEL push mode, the auto-instrumentation tool needs to be configured with the authentication credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/media/docs/grafana-cloud/beyla/agent-vs-direct.png&#34;
  alt=&#34;Beyla architecture agent vs direct&#34; width=&#34;504&#34;
     height=&#34;325&#34;/&gt;&lt;/p&gt;
&lt;center&gt;&lt;i&gt;Beyla running in Agent mode (left) vs. Direct mode (right)&lt;/i&gt;&lt;/center&gt;
&lt;h2 id=&#34;running-in-direct-mode&#34;&gt;Running in Direct mode&lt;/h2&gt;
&lt;p&gt;You can follow our &lt;a href=&#34;../../tutorial/getting-started/&#34;&gt;getting started tutorial&lt;/a&gt; for a quick introduction
to auto-instrumentation in Direct mode, by using OpenTelemetry. The OTLP endpoint authentication credentials are provided
by using the following 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 by using the Prometheus scrape endpoint, please refer to the
&lt;a href=&#34;../options/&#34;&gt;configuration documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;running-in-agent-mode&#34;&gt;Running in Agent mode&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;ℹ️ This tutorial assumes that both the Agent and the auto-instrumentation tool are installed
as local Linux OS executables. For further examples on downloading and running the
auto-instrumentation tool as an OCI container, you can check the documentation sections on
&lt;a href=&#34;../../setup/docker/&#34;&gt;running the Beyla as a Docker container&lt;/a&gt;
or &lt;a href=&#34;../../setup/kubernetes/&#34;&gt;running Beyla in Kubernetes&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;First, you will need to locally install and configure the &lt;a href=&#34;/docs/agent/latest/flow/&#34;&gt;Grafana Agent in &lt;strong&gt;Flow&lt;/strong&gt; mode, according to the latest documentation&lt;/a&gt;.
Running the Agent in Flow mode will facilitate the ingestion of OpenTelemetry
metrics and traces from the auto-instrumentation tool, as well as process and forward
to the different Grafana product endpoints (Mimir and/or Tempo).&lt;/p&gt;
&lt;h3 id=&#34;configuring-the-agent-pipeline&#34;&gt;Configuring the Agent pipeline&lt;/h3&gt;
&lt;p&gt;Next, you&amp;rsquo;ll need to specify the following nodes by using the
&lt;a href=&#34;/docs/agent/latest/flow/&#34;&gt;River configuration language&lt;/a&gt;:&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.png&#34;
  alt=&#34;Beyla nodes&#34; width=&#34;537&#34;
     height=&#34;524&#34;/&gt;&lt;/p&gt;
&lt;p&gt;You can download the &lt;a href=&#34;/docs/beyla/latest/configure/resources/agent-config.river&#34;&gt;example of the whole River configuration file&lt;/a&gt;, which will be explained in the rest of this section.&lt;/p&gt;
&lt;p&gt;The Agent needs to expose an &lt;strong&gt;OpenTelemetry receiver&lt;/strong&gt; endpoint, such that the
auto-instrumentation tool can forward both metrics and traces. The Agent
configuration file will need to include the following entry:&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;hcl&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-hcl&#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 reception of OpenTelemetry events via GRPC and HTTP, which will be
forwarded to the next stage in the pipeline, the &lt;strong&gt;Batch processor&lt;/strong&gt;, which
will then accumulate the messages and forward them to the 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;hcl&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-hcl&#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;You can export either metrics, traces, or both. If you only want to export a single
type of data, you can just avoid the &lt;code&gt;metrics&lt;/code&gt; or &lt;code&gt;traces&lt;/code&gt; lines in the previous
node definitions, and ignore some of the following exporters.&lt;/p&gt;
&lt;p&gt;The metrics are &lt;strong&gt;exported in Prometheus&lt;/strong&gt; format to &lt;a href=&#34;/oss/mimir/&#34;&gt;Grafana Mimir&lt;/a&gt;.
The configuration entry will need to specify an endpoint with basic
authentication. In the provided example, the endpoint and the credentials are
provided 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;hcl&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-hcl&#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;Assuming you have a configuration file as above, you will need to run the Agent with the environment variables set.
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;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, to &lt;strong&gt;export the traces&lt;/strong&gt;, you will need to set up a
&lt;a href=&#34;/oss/tempo/&#34;&gt;Grafana Tempo&lt;/a&gt; exporter
and an endpoint, also configured 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;hcl&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-hcl&#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;Please 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;To run the agent with the previous configuration (for example, written in a file
named &lt;code&gt;agent-config.river&lt;/code&gt;), you need to run the following command:&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;agent run agent-config.river&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;configuring-and-running-the-auto-instrumentation-tool&#34;&gt;Configuring and running the auto-instrumentation tool&lt;/h3&gt;
&lt;p&gt;Now we can configure the auto-instrumentation tool to forward data to the running Grafana Agent.
In this tutorial we are assuming that both the auto-instrumentation tool and the Agent are
running on the same host, so there is no need to secure the traffic nor provide
authentication in the Agent OTLP receiver.&lt;/p&gt;
&lt;p&gt;You can configure the auto-instrumentation tool both via environment variables or via
a configuration YAML file, which is what we will use in this example.
Please refer to the complete &lt;a href=&#34;../options/&#34;&gt;Configuration documentation&lt;/a&gt; for
more detailed description of each configuration option.&lt;/p&gt;
&lt;p&gt;You can download the whole &lt;a href=&#34;/docs/beyla/latest/configure/resources/instrumenter-config.yml&#34;&gt;example configuration file&lt;/a&gt;,
which we will explain in the rest of this section.&lt;/p&gt;
&lt;p&gt;First, you will need to specify the executable to instrument. If, for example,
the service executable is a process that opens the port &lt;code&gt;443&lt;/code&gt;, you can use the &lt;code&gt;open_port&lt;/code&gt;
property of 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;open_port: 443&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The auto-instrumentation tool will automatically search and instrument the process
listening on port 443.&lt;/p&gt;
&lt;p&gt;Next, you will need to specify where the traces and the metrics will be submitted. If
the Agent is running on the local host, it will use the 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 both &lt;code&gt;otel_metrics_export&lt;/code&gt; and &lt;code&gt;otel_traces_export&lt;/code&gt; properties to
allow exporting both metrics and traces, or only one of them to export either
metrics or traces.&lt;/p&gt;
&lt;p&gt;To run the auto-instrumentation tool (previously downloaded from the &lt;a href=&#34;https://github.com/grafana/beyla/releases&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Beyla releases page&lt;/a&gt;),
you will need to specify the path to the configuration YAML file, 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.
For example &lt;code&gt;instrument-config.yml&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;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="beyla-export-modes">Beyla export modes&lt;/h1>
&lt;p>Beyla can export data in two modes:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Agent mode&lt;/strong> (recommended mode): the auto-instrumentation tool will send the metrics and the traces to the
&lt;a href="https://github.com/grafana/agent" target="_blank" rel="noopener noreferrer">Grafana Agent&lt;/a>, which will process and send them
to Mimir and Tempo. In this scenario, the Agent takes care of the authentication required by the Grafana Mimir/Tempo endpoints.
This mode also integrates better with some Grafana exclusive features,
such as the &lt;a href="/docs/tempo/latest/metrics-generator/span_metrics/">span-to-metrics&lt;/a> and
&lt;a href="/docs/tempo/latest/metrics-generator/service_graphs/">span-to-service graph&lt;/a> converters.&lt;/li>
&lt;li>&lt;strong>Direct mode&lt;/strong>: the auto-instrumentation tool can &lt;strong>push&lt;/strong> metrics and/or traces directly to a remote endpoint
(using the OpenTelemetry/OTEL protocols) or expose a Prometheus HTTP endpoint ready to be scraped (i.e. &lt;strong>pull&lt;/strong> mode).
In the direct OTEL push mode, the auto-instrumentation tool needs to be configured with the authentication credentials.&lt;/li>
&lt;/ul>
&lt;p>&lt;img
class="lazyload d-inline-block"
data-src="https://grafana.com/media/docs/grafana-cloud/beyla/agent-vs-direct.png"
alt="Beyla architecture agent vs direct" width="504"
height="325"/>&lt;/p></description></item></channel></rss>