<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The Alloy OpenTelemetry Engine on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/</link><description>Recent content in The Alloy OpenTelemetry Engine on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.20/set-up/otel_engine/index.xml" rel="self" type="application/rss+xml"/><item><title>Run the Alloy OpenTelemetry Engine with the CLI</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/cli/</link><pubDate>Tue, 13 Oct 2026 15:26:25 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/cli/</guid><content><![CDATA[&lt;h1 id=&#34;run-the-alloy-opentelemetry-engine-with-the-cli&#34;&gt;Run the Alloy OpenTelemetry Engine with the CLI&lt;/h1&gt;
&lt;p&gt;The OTel Engine is available under the Alloy &lt;code&gt;otel&lt;/code&gt; command.
Use the CLI to experiment locally or to run the OTel Engine on a single host.
Refer to the &lt;a href=&#34;../../../reference/cli/otel/&#34;&gt;&lt;code&gt;otel&lt;/code&gt;&lt;/a&gt; reference documentation for more information.&lt;/p&gt;


&lt;div data-shared=&#34;stability/experimental_otel.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: OTel Engine is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.&lt;/p&gt;
&lt;p&gt;To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn&amp;rsquo;t hidden behind a stability 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you understand the risks involved before using an experimental feature in your production environments.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have Alloy installed.
Refer to &lt;a href=&#34;../../install/&#34;&gt;Install Grafana Alloy&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h2 id=&#34;run-the-otel-engine&#34;&gt;Run the OTel Engine&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a configuration file named &lt;code&gt;config.yaml&lt;/code&gt;.
The following example accepts traces over &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/protocol/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OTLP&lt;/a&gt; and prints it to the console:&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;receivers:
  otlp:
    protocols:
      grpc: {}
      http: {}

processors:
  batch:
    timeout: 1s
    send_batch_size: 512

exporters:
  debug:
    verbosity: detailed

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the configuration:&lt;/p&gt;

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

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;alloy otel --config=config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To pass extra command-line flags, refer to the &lt;a href=&#34;../../../reference/cli/otel/&#34;&gt;&lt;code&gt;otel&lt;/code&gt; command reference&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the OTel Engine runs:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;curl http://localhost:8888/metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Alloy then accepts incoming OTLP traces on &lt;code&gt;localhost:4317&lt;/code&gt; for gRPC and &lt;code&gt;localhost:4318&lt;/code&gt; for HTTP requests.
Metrics are also available on the default collector port and endpoint at &lt;code&gt;localhost:8888/metrics&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The Default Engine isn&amp;rsquo;t running, so its UI at &lt;code&gt;localhost:12345&lt;/code&gt; and its metrics at &lt;code&gt;localhost:12345/metrics&lt;/code&gt; aren&amp;rsquo;t available.&lt;/p&gt;
&lt;h2 id=&#34;send-data-to-grafana-cloud&#34;&gt;Send data to Grafana Cloud&lt;/h2&gt;
&lt;p&gt;The following example configuration accepts telemetry over OTLP and sends it to Grafana Cloud:&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;extensions:
  basicauth/my_auth:
    client_auth:
      username: &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
      password: &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;

receivers:
  otlp:
    protocols:
      grpc: {}
      http: {}

processors:
  batch:
    timeout: 1s
    send_batch_size: 512

exporters:
  otlp_http/my_backend:
    endpoint: &amp;lt;URL&amp;gt;
    auth:
      authenticator: basicauth/my_auth

service:
  extensions: [basicauth/my_auth]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp_http/my_backend]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud instance ID.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud API token.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud OTLP endpoint URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information about where to find these values, refer to &lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/send-data-otlp/&#34;&gt;Send data using OpenTelemetry Protocol&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;manage-with-grafana-fleet-management&#34;&gt;Manage with Grafana Fleet Management&lt;/h2&gt;
&lt;p&gt;Use the embedded &lt;code&gt;otel-supervisor&lt;/code&gt; command to manage the OTel Engine through Grafana Fleet Management.
The supervisor starts Alloy and receives OpenTelemetry Collector configuration from Grafana Fleet Management through OpAMP.&lt;/p&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../../reference/cli/otel-supervisor/&#34;&gt;&lt;code&gt;otel-supervisor&lt;/code&gt;&lt;/a&gt; for setup instructions and required environment variables.&lt;/p&gt;
]]></content><description>&lt;h1 id="run-the-alloy-opentelemetry-engine-with-the-cli">Run the Alloy OpenTelemetry Engine with the CLI&lt;/h1>
&lt;p>The OTel Engine is available under the Alloy &lt;code>otel&lt;/code> command.
Use the CLI to experiment locally or to run the OTel Engine on a single host.
Refer to the &lt;a href="../../../reference/cli/otel/">&lt;code>otel&lt;/code>&lt;/a> reference documentation for more information.&lt;/p></description></item><item><title>Run the Grafana Alloy Engine extension</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/engine-extension/</link><pubDate>Tue, 13 Oct 2026 15:26:25 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/engine-extension/</guid><content><![CDATA[&lt;h1 id=&#34;run-the-grafana-alloy-engine-extension&#34;&gt;Run the Grafana Alloy Engine extension&lt;/h1&gt;
&lt;p&gt;You can run the OTel Engine and the Default Engine in the same process.
Add the &lt;code&gt;alloyengine&lt;/code&gt; extension to your OpenTelemetry Collector configuration to start a Default Engine pipeline alongside the OTel Engine pipeline.
The two engines run in parallel and can&amp;rsquo;t exchange data with each other. If required, they can still communicate over the network via components like the OTLP exporter and receiver&lt;/p&gt;
&lt;p&gt;Set exactly one of &lt;code&gt;config.path&lt;/code&gt; or &lt;code&gt;config.inline.content&lt;/code&gt;.
The extension fails to start if you set both or neither.&lt;/p&gt;


&lt;div data-shared=&#34;stability/experimental_otel.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: OTel Engine is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.&lt;/p&gt;
&lt;p&gt;To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn&amp;rsquo;t hidden behind a stability 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you understand the risks involved before using an experimental feature in your production environments.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An OpenTelemetry Collector configuration. To create one, refer to &lt;a href=&#34;../cli/&#34;&gt;Run the OTel Engine with the CLI&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A Default Engine configuration file or directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;run-both-engines&#34;&gt;Run both engines&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add the &lt;code&gt;alloyengine&lt;/code&gt; extension to your Collector configuration, and enable it in the &lt;code&gt;service&lt;/code&gt; block:&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;extensions:
  alloyengine:
    config:
      path: &amp;lt;ALLOY_CONFIG_PATH&amp;gt;
    flags:
      server.http.listen-addr: 0.0.0.0:12345

service:
  extensions: [alloyengine]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;ALLOY_CONFIG_PATH&amp;gt;&lt;/code&gt;&lt;/em&gt; with the path to your Default Engine configuration file or directory.
If you provide a directory, Alloy loads the &lt;code&gt;*.alloy&lt;/code&gt; files in that directory as a single configuration source and ignores subdirectories.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;flags&lt;/code&gt; map passes command-line flags to the Default Engine.
Refer to &lt;a href=&#34;#pass-flags-to-the-default-engine&#34;&gt;Pass flags to the Default Engine&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;Keep your other &lt;code&gt;extensions&lt;/code&gt; and &lt;code&gt;service.extensions&lt;/code&gt; entries, and add &lt;code&gt;alloyengine&lt;/code&gt; to them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start both engines:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;alloy otel --config=config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The output of both engines is visible in the logs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the Default Engine runs by opening its UI at &lt;code&gt;localhost:12345&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;pass-flags-to-the-default-engine&#34;&gt;Pass flags to the Default Engine&lt;/h2&gt;
&lt;p&gt;Use the optional &lt;code&gt;flags&lt;/code&gt; map to pass command-line flags to the Default Engine.
Write each flag without the leading &lt;code&gt;--&lt;/code&gt;.
The example sets &lt;code&gt;server.http.listen-addr&lt;/code&gt; to &lt;code&gt;0.0.0.0:12345&lt;/code&gt; so the Default Engine UI accepts connections from other hosts.
The default address, &lt;code&gt;127.0.0.1:12345&lt;/code&gt;, accepts connections only from the local host.
Refer to the &lt;a href=&#34;../../../reference/cli/run/&#34;&gt;run command reference&lt;/a&gt; for the available flags.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;../../../get-started/clustering/&#34;&gt;Clustering&lt;/a&gt; is also supported this way, using the same &lt;code&gt;cluster.*&lt;/code&gt; flags as the standalone Default Engine.&lt;/p&gt;
&lt;h2 id=&#34;provide-the-configuration-inline&#34;&gt;Provide the configuration inline&lt;/h2&gt;
&lt;p&gt;To provide the Default Engine configuration inline, use &lt;code&gt;config.inline.content&lt;/code&gt; instead of &lt;code&gt;config.path&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;extensions:
  alloyengine:
    config:
      inline:
        content: |
          logging {
            level = &amp;#34;info&amp;#34;
          }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;module_path&lt;/code&gt; Alloy configuration keyword resolves to the value of &lt;code&gt;config.inline.module_path&lt;/code&gt;.
If you don&amp;rsquo;t set &lt;code&gt;config.inline.module_path&lt;/code&gt;, &lt;code&gt;module_path&lt;/code&gt; resolves to the current working directory of the Collector process.&lt;/p&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;The Default Engine runs with some features disabled in extension mode.
The &lt;code&gt;remotecfg&lt;/code&gt; block isn&amp;rsquo;t supported, and configuration reload isn&amp;rsquo;t available.
Use OpenTelemetry OpAMP for configuration management instead.&lt;/p&gt;
&lt;p&gt;If the Default Engine configuration fails to load, the extension retries with exponential backoff, starting at 2 seconds and capping at 15 seconds.
The Collector still reports the extension as ready, so a broken configuration doesn&amp;rsquo;t stop the OTel Engine.
Check the &lt;code&gt;/-/ready&lt;/code&gt; and &lt;code&gt;/-/healthy&lt;/code&gt; endpoints of the Default Engine HTTP server for its actual state.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Only one &lt;code&gt;alloyengine&lt;/code&gt; extension can be active per process.
If you configure more than one, the first extension to start succeeds, the rest fail, and the Collector doesn&amp;rsquo;t start.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;embed-the-extension-in-another-distribution&#34;&gt;Embed the extension in another distribution&lt;/h2&gt;
&lt;p&gt;You can embed the &lt;code&gt;alloyengine&lt;/code&gt; extension into any other OpenTelemetry Collector distribution with the OpenTelemetry Collector Builder (OCB).
Refer to &lt;a href=&#34;https://github.com/grafana/alloy/blob/main/extension/alloyengine/README.md#include-alloyengine-extension-in-an-ocb-distribution&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Include &lt;code&gt;alloyengine&lt;/code&gt; extension in an OCB distribution&lt;/a&gt; for instructions.&lt;/p&gt;
]]></content><description>&lt;h1 id="run-the-grafana-alloy-engine-extension">Run the Grafana Alloy Engine extension&lt;/h1>
&lt;p>You can run the OTel Engine and the Default Engine in the same process.
Add the &lt;code>alloyengine&lt;/code> extension to your OpenTelemetry Collector configuration to start a Default Engine pipeline alongside the OTel Engine pipeline.
The two engines run in parallel and can&amp;rsquo;t exchange data with each other. If required, they can still communicate over the network via components like the OTLP exporter and receiver&lt;/p></description></item><item><title>Run the Alloy OpenTelemetry Engine with the OpenTelemetry Collector Helm chart</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/helm/</link><pubDate>Tue, 13 Oct 2026 15:26:25 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/helm/</guid><content><![CDATA[&lt;h1 id=&#34;run-the-alloy-opentelemetry-engine-with-the-opentelemetry-collector-helm-chart&#34;&gt;Run the Alloy OpenTelemetry Engine with the OpenTelemetry Collector Helm chart&lt;/h1&gt;
&lt;p&gt;Use the upstream &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector Helm chart&lt;/a&gt; to run the OTel Engine on Kubernetes.
The chart deploys the Alloy image with the standard upstream chart values, so you configure it the same way you configure any OpenTelemetry Collector deployment.&lt;/p&gt;


&lt;div data-shared=&#34;stability/experimental_otel.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: OTel Engine is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.&lt;/p&gt;
&lt;p&gt;To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn&amp;rsquo;t hidden behind a stability 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you understand the risks involved before using an experimental feature in your production environments.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://helm.sh&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm&lt;/a&gt; installed on your computer&lt;/li&gt;
&lt;li&gt;A Kubernetes cluster that you can use for Alloy&lt;/li&gt;
&lt;li&gt;A local Kubernetes context that points at the cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;run-the-otel-engine&#34;&gt;Run the OTel Engine&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add the OpenTelemetry Collector Helm chart repository:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;values.yaml&lt;/code&gt; file.
The following example runs the configuration from &lt;a href=&#34;../cli/#send-data-to-grafana-cloud&#34;&gt;Send data to Grafana Cloud&lt;/a&gt; in a Kubernetes Deployment:&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;image:
  repository: grafana/alloy
  tag: &amp;lt;ALLOY_VERSION&amp;gt;

command:
  name: &amp;#34;bin/otelcol&amp;#34;

mode: deployment

ports:
  metrics:
    enabled: true

config:
  extensions:
    basicauth/my_auth:
      client_auth:
        username: &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;
        password: &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;

  receivers:
    otlp:
      protocols:
        grpc: {}
        http: {}
    jaeger: null
    zipkin: null
    prometheus: null

  processors:
    batch:
      timeout: 1s
      send_batch_size: 512

  exporters:
    debug: null
    otlp_http/my_backend:
      endpoint: &amp;lt;URL&amp;gt;
      auth:
        authenticator: basicauth/my_auth

  service:
    telemetry:
      metrics:
        readers:
          - pull:
              exporter:
                prometheus:
                  host: 0.0.0.0
                  port: 8888
    extensions: [basicauth/my_auth, health_check]
    pipelines:
      logs: null
      metrics: null
      traces:
        receivers: [otlp]
        processors: [batch]
        exporters: [otlp_http/my_backend]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;ALLOY_VERSION&amp;gt;&lt;/code&gt;&lt;/em&gt;: The Alloy release you want to run, for example v1.20.1.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud instance ID.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud API token.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana Cloud OTLP endpoint URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information about where to find the Grafana Cloud values, refer to &lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/send-data-otlp/&#34;&gt;Send data using OpenTelemetry Protocol&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The chart runs &lt;code&gt;/&amp;lt;COMMAND_NAME&amp;gt;&lt;/code&gt; as the container command, so &lt;code&gt;bin/otelcol&lt;/code&gt; resolves to &lt;code&gt;/bin/otelcol&lt;/code&gt;.
This path is a compatibility entrypoint in the Alloy image that runs &lt;code&gt;alloy otel&lt;/code&gt;.
Without this setting, the chart runs the image&amp;rsquo;s default entrypoint, which starts the Default Engine.&lt;/p&gt;
&lt;p&gt;The example sets the chart defaults it doesn&amp;rsquo;t need to &lt;code&gt;null&lt;/code&gt; and uses the chart&amp;rsquo;s own &lt;code&gt;health_check&lt;/code&gt; extension without redefining it.
Refer to the &lt;a href=&#34;https://opentelemetry.io/docs/platforms/kubernetes/helm/collector/#configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm chart documentation&lt;/a&gt; for how &lt;code&gt;config&lt;/code&gt; combines with the chart&amp;rsquo;s defaults.&lt;/p&gt;
&lt;p&gt;The example also sets the metrics endpoint host to &lt;code&gt;0.0.0.0&lt;/code&gt; so it listens on all interfaces inside the Pod.
The chart&amp;rsquo;s default binds the Pod IP, which other Pods in the cluster can already reach.
Set &lt;code&gt;0.0.0.0&lt;/code&gt; when you also want to reach the endpoint on &lt;code&gt;127.0.0.1&lt;/code&gt; inside the Pod, for example from a sidecar container.
Set &lt;code&gt;ports.metrics.enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; to expose port &lt;code&gt;8888&lt;/code&gt; on the Pod and the Service.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the chart:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;helm install &amp;lt;RELEASE_NAME&amp;gt; open-telemetry/opentelemetry-collector --values values.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;RELEASE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt; with a name for your Helm release.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the Pod runs:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;kubectl get pods&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Pod reaches &lt;code&gt;Running&lt;/code&gt; status once the OTel Engine starts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configuration-options&#34;&gt;Configuration options&lt;/h2&gt;
&lt;p&gt;Configure the OTel Engine through the chart&amp;rsquo;s &lt;code&gt;config&lt;/code&gt; field, as the preceding example does.
The &lt;a href=&#34;https://opentelemetry.io/docs/platforms/kubernetes/helm/collector/#configuration&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm chart documentation&lt;/a&gt; describes this field and how your values combine with the chart&amp;rsquo;s defaults.&lt;/p&gt;
&lt;p&gt;The chart also provides &lt;code&gt;alternateConfig&lt;/code&gt;, which replaces the chart&amp;rsquo;s default configuration instead of combining with it.
Upstream provides that field for use as a subchart and doesn&amp;rsquo;t recommend it when you install the chart directly.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://opentelemetry.io/docs/platforms/kubernetes/helm/collector/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;upstream documentation&lt;/a&gt; for more information about configuring the Helm chart for your use case.&lt;/p&gt;
]]></content><description>&lt;h1 id="run-the-alloy-opentelemetry-engine-with-the-opentelemetry-collector-helm-chart">Run the Alloy OpenTelemetry Engine with the OpenTelemetry Collector Helm chart&lt;/h1>
&lt;p>Use the upstream &lt;a href="https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector" target="_blank" rel="noopener noreferrer">OpenTelemetry Collector Helm chart&lt;/a> to run the OTel Engine on Kubernetes.
The chart deploys the Alloy image with the standard upstream chart values, so you configure it the same way you configure any OpenTelemetry Collector deployment.&lt;/p></description></item><item><title>Run the Alloy OpenTelemetry Engine with service installations</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/service-installations/</link><pubDate>Tue, 13 Oct 2026 15:26:25 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/service-installations/</guid><content><![CDATA[&lt;h1 id=&#34;run-the-alloy-opentelemetry-engine-with-service-installations&#34;&gt;Run the Alloy OpenTelemetry Engine with service installations&lt;/h1&gt;
&lt;p&gt;The Alloy service installations for Linux, macOS, and Windows can run the OTel Engine instead of the Default Engine.
Set &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;yes&lt;/code&gt;, or &lt;code&gt;on&lt;/code&gt; to run the OTel Engine.
Matching is case-insensitive.
If you don&amp;rsquo;t set &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt;, or you set it to any other value, Alloy runs the Default Engine.&lt;/p&gt;
&lt;p&gt;No service installer exposes an install-time flag for this setting.
Set it with the platform-specific mechanism below, then restart the service.&lt;/p&gt;


&lt;div data-shared=&#34;stability/experimental_otel.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: OTel Engine is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.&lt;/p&gt;
&lt;p&gt;To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn&amp;rsquo;t hidden behind a stability 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you understand the risks involved before using an experimental feature in your production environments.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alloy installed as a service. Refer to &lt;a href=&#34;../../install/&#34;&gt;Install Grafana Alloy&lt;/a&gt; for more information.&lt;/li&gt;
&lt;li&gt;An OpenTelemetry Collector configuration. To create one, refer to &lt;a href=&#34;../cli/&#34;&gt;Run the OTel Engine with the CLI&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;linux&#34;&gt;Linux&lt;/h2&gt;
&lt;p&gt;Alloy is &lt;a href=&#34;../../run/linux/&#34;&gt;installed&lt;/a&gt; as a systemd service on Linux.
It reads &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt; from the systemd environment file.&lt;/p&gt;
&lt;p&gt;To run the OTel Engine on Linux:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the environment file for the service:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debian or Ubuntu: Edit &lt;code&gt;/etc/default/alloy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;RHEL/Fedora or SUSE/openSUSE: Edit &lt;code&gt;/etc/sysconfig/alloy&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;ALLOY_OTEL_MODE=1&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the sample OpenTelemetry Collector configuration the package installs at &lt;code&gt;/etc/alloy/config.yaml&lt;/code&gt;.
The sample receives OTLP data and sends it to the &lt;code&gt;debug&lt;/code&gt; exporter, which only writes to the console.
Replace the &lt;code&gt;debug&lt;/code&gt; exporter with a real backend.
To use a different file, set &lt;code&gt;OTEL_CONFIG_FILE&lt;/code&gt; to its path.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Set &lt;code&gt;OTEL_CUSTOM_ARGS&lt;/code&gt; to pass additional command-line flags to the OTel Engine.
This setting works the same way as &lt;code&gt;CUSTOM_ARGS&lt;/code&gt; does for the Default Engine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the configuration, and replace &lt;em&gt;&lt;code&gt;&amp;lt;OTEL_CONFIG_FILE&amp;gt;&lt;/code&gt;&lt;/em&gt; with the path configured above:&lt;/p&gt;

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

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;sudo systemctl restart alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the OTel Engine runs:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;curl http://localhost:8888/metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../../configure/linux/#pass-additional-command-line-flags&#34;&gt;Pass additional command-line flags&lt;/a&gt; for more information about the environment file.&lt;/p&gt;
&lt;h2 id=&#34;macos&#34;&gt;macOS&lt;/h2&gt;
&lt;p&gt;Alloy is &lt;a href=&#34;../../run/macos/&#34;&gt;installed&lt;/a&gt; as a launchd service on macOS.
It reads &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt; from the Homebrew environment file.&lt;/p&gt;
&lt;p&gt;To run the OTel Engine on macOS:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the file at &lt;code&gt;$(brew --prefix)/etc/alloy/config.env&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;ALLOY_OTEL_MODE=1&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create your OpenTelemetry Collector configuration at &lt;code&gt;$(brew --prefix)/etc/alloy/config.yaml&lt;/code&gt;.
The Homebrew formula doesn&amp;rsquo;t create this file, and the service always loads it.&lt;/p&gt;
&lt;p&gt;To load an additional file, add &lt;code&gt;--config=&amp;lt;PATH&amp;gt;&lt;/code&gt; to &lt;code&gt;$(brew --prefix)/etc/alloy/otel-extra-args.txt&lt;/code&gt;.
Alloy applies this flag after the default, so its values override the installer&amp;rsquo;s default where they overlap.
Create &lt;code&gt;config.yaml&lt;/code&gt; even when you use this option.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Add command-line flags for the OTel Engine to &lt;code&gt;$(brew --prefix)/etc/alloy/otel-extra-args.txt&lt;/code&gt;.
This file works the same way as &lt;code&gt;extra-args.txt&lt;/code&gt; does for the Default Engine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;alloy otel validate --config=$(brew --prefix)/etc/alloy/config.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the service:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;brew services restart grafana/grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the OTel Engine runs:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;curl http://localhost:8888/metrics&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../../configure/macos/#configure-environment-variables&#34;&gt;Configure environment variables&lt;/a&gt; for more information about the environment file.&lt;/p&gt;
&lt;h2 id=&#34;windows&#34;&gt;Windows&lt;/h2&gt;
&lt;p&gt;Alloy is &lt;a href=&#34;../../run/windows/&#34;&gt;installed&lt;/a&gt; as a Windows Service.
It reads &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt; from the Windows registry at &lt;code&gt;HKLM\Software\GrafanaLabs\Alloy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To run the OTel Engine on Windows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Registry Editor and navigate to &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\GrafanaLabs\Alloy&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the string value &lt;code&gt;ALLOY_OTEL_MODE&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the sample OpenTelemetry Collector configuration the installer creates at &lt;code&gt;%PROGRAMFILES%\GrafanaLabs\Alloy\config.yaml&lt;/code&gt;.
The sample receives OTLP data and sends it to the &lt;code&gt;debug&lt;/code&gt; exporter, which only writes to the log.
Replace the &lt;code&gt;debug&lt;/code&gt; exporter with a real backend.
To use a different file, add &lt;code&gt;--config=&amp;lt;PATH&amp;gt;&lt;/code&gt; to the multi-string value &lt;code&gt;OTelArguments&lt;/code&gt;.
Alloy applies this flag after the default, so its values override the installer&amp;rsquo;s default where they overlap.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Add command-line flags for the OTel Engine to the multi-string value &lt;code&gt;OTelArguments&lt;/code&gt;.
This value works the same way as &lt;code&gt;Arguments&lt;/code&gt; does for the Default Engine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;powershell&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-powershell&#34;&gt;&amp;amp; &amp;#34;$env:PROGRAMFILES\GrafanaLabs\Alloy\alloy-windows-amd64.exe&amp;#34; otel validate --config=&amp;#34;$env:PROGRAMFILES\GrafanaLabs\Alloy\config.yaml&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the &lt;strong&gt;Alloy&lt;/strong&gt; service from the Windows Services manager.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify that the OTel Engine runs:&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;powershell&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-powershell&#34;&gt;Invoke-WebRequest http://localhost:8888/metrics -UseBasicParsing&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer to &lt;a href=&#34;../../install/windows/#service-configuration&#34;&gt;Service configuration&lt;/a&gt; for more information about the registry values Alloy uses.&lt;/p&gt;
]]></content><description>&lt;h1 id="run-the-alloy-opentelemetry-engine-with-service-installations">Run the Alloy OpenTelemetry Engine with service installations&lt;/h1>
&lt;p>The Alloy service installations for Linux, macOS, and Windows can run the OTel Engine instead of the Default Engine.
Set &lt;code>ALLOY_OTEL_MODE&lt;/code> to &lt;code>1&lt;/code>, &lt;code>true&lt;/code>, &lt;code>yes&lt;/code>, or &lt;code>on&lt;/code> to run the OTel Engine.
Matching is case-insensitive.
If you don&amp;rsquo;t set &lt;code>ALLOY_OTEL_MODE&lt;/code>, or you set it to any other value, Alloy runs the Default Engine.&lt;/p></description></item><item><title>Build a custom Grafana Alloy binary with the OpenTelemetry Collector Builder (OCB)</title><link>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/custom-builds/</link><pubDate>Tue, 13 Oct 2026 15:26:25 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.20/set-up/otel_engine/custom-builds/</guid><content><![CDATA[&lt;h1 id=&#34;build-a-custom-grafana-alloy-binary-with-the-opentelemetry-collector-builder-ocb&#34;&gt;Build a custom Grafana Alloy binary with the OpenTelemetry Collector Builder (OCB)&lt;/h1&gt;
&lt;p&gt;Grafana builds the OTel Engine from a declarative &lt;a href=&#34;https://opentelemetry.io/docs/collector/custom-collector/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector Builder (OCB)&lt;/a&gt; manifest.
If you need additional components or want to remove bundled components, edit the manifest and build a customized Alloy binary.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Grafana doesn&amp;rsquo;t offer commercial support for custom builds.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;



&lt;div data-shared=&#34;stability/experimental_otel.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: OTel Engine is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.&lt;/p&gt;
&lt;p&gt;To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn&amp;rsquo;t hidden behind a stability 
    &lt;a href=&#34;/docs/alloy/v1.20/reference/cli/run/&#34;&gt;flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure that you understand the risks involved before using an experimental feature in your production environments.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Go 1.26.7 or later&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Docker, if you want to build the container image&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The build compiles C dependencies, so you also need the following for your platform:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On Linux, the systemd headers.
On Debian-based distributions, run &lt;code&gt;sudo apt-get install libsystemd-dev&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On Windows, a 64-bit &lt;a href=&#34;https://www.mingw-w64.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;mingw-w64&lt;/a&gt; gcc toolchain.
Grafana recommends the &lt;a href=&#34;https://winlibs.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;WinLibs&lt;/a&gt; build.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;build-a-custom-binary&#34;&gt;Build a custom binary&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Clone the Alloy repository and change to the repository root.
The following steps assume you run commands from this directory.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;git clone https://github.com/grafana/alloy.git
cd alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To build from a specific release, fetch tags and check out the tag after you clone:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;git fetch --tags
git checkout &amp;lt;RELEASE_TAG&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;RELEASE_TAG&amp;gt;&lt;/code&gt;&lt;/em&gt; with the &lt;a href=&#34;https://github.com/grafana/alloy/releases&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;release tag&lt;/a&gt; you want.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add or remove components by editing the OCB manifest in &lt;a href=&#34;https://github.com/grafana/alloy/blob/main/collector/builder-config.yaml&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;collector/builder-config.yaml&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To remove a component, delete its entire entry from the appropriate section.
To add a component, append an entry that points at the module path and version you want.
Follow the same &lt;code&gt;- gomod:&lt;/code&gt; pattern as the other entries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build the full Alloy binary.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;make alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command regenerates the collector distribution from the manifest before it builds, so your manifest edits take effect.
The binary in &lt;code&gt;build/&lt;/code&gt; behaves like a standard &lt;code&gt;alloy&lt;/code&gt; build.
To skip the UI build when the UI assets already exist, run &lt;code&gt;SKIP_UI_BUILD=1 make alloy&lt;/code&gt;.
Use &lt;a href=&#34;../../../reference/cli/otel/&#34;&gt;&lt;code&gt;alloy otel&lt;/code&gt;&lt;/a&gt; to run collector YAML against your custom bundle.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Confirm that your components are in the build.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;./build/alloy otel components&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The command lists each bundled component with its module path, version, and stability level.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Build the Alloy Docker image.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;shell&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-shell&#34;&gt;make alloy-image ALLOY_IMAGE=&amp;lt;REGISTRY&amp;gt;/&amp;lt;IMAGE_NAME&amp;gt;:&amp;lt;TAG&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Set &lt;code&gt;ALLOY_IMAGE&lt;/code&gt; to your own registry and image name.&lt;/p&gt;
&lt;p&gt;Replace the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;REGISTRY&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your container registry.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;IMAGE_NAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your image name.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;TAG&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your image tag.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="build-a-custom-grafana-alloy-binary-with-the-opentelemetry-collector-builder-ocb">Build a custom Grafana Alloy binary with the OpenTelemetry Collector Builder (OCB)&lt;/h1>
&lt;p>Grafana builds the OTel Engine from a declarative &lt;a href="https://opentelemetry.io/docs/collector/custom-collector/" target="_blank" rel="noopener noreferrer">OpenTelemetry Collector Builder (OCB)&lt;/a> manifest.
If you need additional components or want to remove bundled components, edit the manifest and build a customized Alloy binary.&lt;/p></description></item></channel></rss>