<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Grafana Alloy on Grafana Labs</title><link>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/</link><description>Recent content in Grafana Alloy on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/index.xml" rel="self" type="application/rss+xml"/><item><title>Migrate to Alloy</title><link>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/migrate-alloy/</link><pubDate>Thu, 09 Apr 2026 14:59:14 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/migrate-alloy/</guid><content><![CDATA[&lt;h1 id=&#34;migrate-to-alloy&#34;&gt;Migrate to Alloy&lt;/h1&gt;
&lt;p&gt;Grafana Labs has provided tools and migration documentation to assist you in migrating to Grafana Alloy.&lt;/p&gt;
&lt;p&gt;Read more about why we recommend migrating to &lt;a href=&#34;/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/&#34;&gt;Grafana Alloy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This section provides links to documentation for how to migrate to Alloy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-static/&#34;&gt;Migrate from Grafana Agent Static&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-flow/&#34;&gt;Migrate from Grafana Agent Flow&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-operator/&#34;&gt;Migrate from Grafana Agent Operator&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-otelcol/&#34;&gt;Migrate from OpenTelemetry Collector&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-prometheus/&#34;&gt;Migrate from Prometheus&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.10.x/tasks/migrate/from-promtail/&#34;&gt;Migrate from Promtail&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="migrate-to-alloy">Migrate to Alloy&lt;/h1>
&lt;p>Grafana Labs has provided tools and migration documentation to assist you in migrating to Grafana Alloy.&lt;/p>
&lt;p>Read more about why we recommend migrating to &lt;a href="/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/">Grafana Alloy&lt;/a>.&lt;/p></description></item><item><title>Set up Alloy to remote-write to Tempo</title><link>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/remote-write-tempo/</link><pubDate>Thu, 09 Apr 2026 14:59:14 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/remote-write-tempo/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-alloy-to-remote-write-to-tempo&#34;&gt;Set up Alloy to remote-write to Tempo&lt;/h1&gt;


&lt;div data-shared=&#34;alloy-remote-write-tempo.md&#34;&gt;
            &lt;!-- Use Alloy to remote-write traces to Tempo shared file. --&gt;
&lt;p&gt;This section uses a 
    &lt;a href=&#34;/docs/alloy/v2.10.x/set-up/install/kubernetes/&#34;&gt;Grafana Alloy Helm chart&lt;/a&gt; deployment to send traces to Tempo.&lt;/p&gt;
&lt;p&gt;To do this, you need to create a configuration that can be used by Alloy to receive and export traces in OTLP &lt;code&gt;protobuf&lt;/code&gt; format.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new &lt;code&gt;values.yaml&lt;/code&gt; file which we&amp;rsquo;ll use as part of the Alloy install.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the &lt;code&gt;values.yaml&lt;/code&gt; file and add the following configuration to it:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;alloy:
  extraPorts:
    - name: otlp-grpc
      port: 4317
      targetPort: 4317
      protocol: TCP
  configMap:
    create: true
    content: |-
      // Creates a receiver for OTLP gRPC.
      // You can easily add receivers for other protocols by using the correct component
      // from the reference list at: https://grafana.com/docs/alloy/latest/reference/components/
      otelcol.receiver.otlp &amp;#34;otlp_receiver&amp;#34; {
        // Listen on all available bindable addresses on port 4317 (which is the
        // default OTLP gRPC port) for the OTLP protocol.
        grpc {
          endpoint = &amp;#34;0.0.0.0:4317&amp;#34;
        }

        // Output straight to the OTLP gRPC exporter. We would usually do some processing
        // first, most likely batch processing, but for this example we pass it straight
        // through.
        output {
          traces = [
            otelcol.exporter.otlp.tempo.input,
          ]
        }
      }

      // Define an OTLP gRPC exporter to send all received traces to GET.
      // The unique label &amp;#39;tempo&amp;#39; is added to uniquely identify this exporter.
      otelcol.exporter.otlp &amp;#34;tempo&amp;#34; {
          // Define the client for exporting.
          client {
              // Send to the locally running Tempo instance, on port 4317 (OTLP gRPC).
              endpoint = &amp;#34;http://tempo-cluster-distributor.tempo.svc.cluster.local:4317&amp;#34;
              // Disable TLS for OTLP remote write.
              tls {
                  // The connection is insecure.
                  insecure = true
                  // Do not verify TLS certificates when connecting.
                  insecure_skip_verify = true
              }
          }
      }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Ensure that you use the specific namespace you&amp;rsquo;ve installed Tempo in for the OTLP exporter. In the line:&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;endpoint = &amp;#34;http://tempo-cluster-distributor.tempo.svc.cluster.local:3100&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;change &lt;code&gt;tempo&lt;/code&gt; to reference the namespace where Tempo is installed, for example: &lt;code&gt;http://tempo-cluster-distributor.my-tempo-namespaces.svc.cluster.local:3100&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy Alloy using Helm:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm install -f values.yaml grafana-alloy grafana/alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you deploy Alloy into a specific namespace, create the namespace first and specify it to Helm by appending &lt;code&gt;--namespace=&amp;lt;grafana-alloy-namespace&amp;gt;&lt;/code&gt; to the end of the command.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="set-up-alloy-to-remote-write-to-tempo">Set up Alloy to remote-write to Tempo&lt;/h1>
&lt;div data-shared="alloy-remote-write-tempo.md">
&lt;!-- Use Alloy to remote-write traces to Tempo shared file. -->
&lt;p>This section uses a
&lt;a href="/docs/alloy/v2.10.x/set-up/install/kubernetes/">Grafana Alloy Helm chart&lt;/a> deployment to send traces to Tempo.&lt;/p></description></item><item><title>Automatic logging: Trace discovery through logs</title><link>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/automatic-logging/</link><pubDate>Thu, 09 Apr 2026 14:59:14 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.10.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/automatic-logging/</guid><content><![CDATA[&lt;h1 id=&#34;automatic-logging-trace-discovery-through-logs&#34;&gt;Automatic logging: Trace discovery through logs&lt;/h1&gt;
&lt;p&gt;Running instrumented distributed systems is a very powerful way to gain
understanding over a system, but it brings its own challenges. One of them is
discovering which traces exist.&lt;/p&gt;
&lt;p&gt;Using the span logs connector, you can use Alloy to perform automatic logging.&lt;/p&gt;
&lt;p&gt;In the beginning of Tempo, querying for a trace was only possible if you knew
the ID of the trace you were looking for. One solution was automatic logging.
Automatic logging provides an easy and fast way of discovering trace IDs
through log messages.
Well-formatted log lines are written to a logs exporter
for each span, root, or process that passes through the tracing
pipeline. This allows for automatically building a mechanism for trace discovery.
On top of that, you can also get metrics from traces using a logs source, and
allow quickly jumping from a log message to the trace view in Grafana.&lt;/p&gt;
&lt;p&gt;While this approach is useful, it isn&amp;rsquo;t as powerful as TraceQL.
If you are here because you know you want to log the
trace ID, to enable jumping from logs to traces, then read on.&lt;/p&gt;
&lt;p&gt;If you want to query the system directly, read the 
    &lt;a href=&#34;/docs/tempo/v2.10.x/traceql/&#34;&gt;TraceQL
documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;For high throughput systems, logging for every span may generate too much volume.
In such cases, logging per root span or process is recommended.&lt;/p&gt;
&lt;p align=&#34;center&#34;&gt;&lt;img src=&#34;/media/docs/tempo/intro/tempo-auto-log.svg&#34; alt=&#34;Automatic logging overview&#34;&gt;&lt;/p&gt;
&lt;p&gt;Automatic logging searches for a given set of span or resource attributes in the spans and logs them as key-value pairs.
This allows searching by those key-value pairs in Loki.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;To configure automatic logging, you need to configure the &lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; connector with
appropriate options.&lt;/p&gt;
&lt;p&gt;To see all the available configuration options, refer to the &lt;code&gt;otelcol.connector.spanlogs&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v2.10.x/reference/components/otelcol/otelcol.connector.spanlogs/&#34;&gt;components reference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This simple example logs trace roots before exporting them to the Grafana OTLP gateway,
and is a good way to get started using automatic logging:&lt;/p&gt;

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

  output {
    traces = [otelcol.connector.spanlogs.default.input]
  }
}

otelcol.connector.spanlogs &amp;#34;default&amp;#34; {
  roots = true

  output {
    logs = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp &amp;#34;default&amp;#34; {
  client {
    endpoint = env(&amp;#34;OTLP_ENDPOINT&amp;#34;)
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example logs all trace roots, adding the &lt;code&gt;http.method&lt;/code&gt; and &lt;code&gt;http.target&lt;/code&gt; attributes to the log line,
then pushes logs to a local Loki instance:&lt;/p&gt;

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

  output {
    traces = [otelcol.connector.spanlogs.default.input]
  }
}

otelcol.connector.spanlogs &amp;#34;default&amp;#34; {
  roots           = true
  span_attributes = [&amp;#34;http.method&amp;#34;, &amp;#34;http.target&amp;#34;]

  output {
    logs = [otelcol.exporter.loki.default.input]
  }
}

otelcol.exporter.loki &amp;#34;default&amp;#34; {
  forward_to = [loki.write.local.receiver]
}

loki.write &amp;#34;local&amp;#34; {
  endpoint {
    url = &amp;#34;loki:3100&amp;#34;
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p align=&#34;center&#34;&gt;&lt;img src=&#34;../automatic-logging-example-query.png&#34; alt=&#34;Automatic logging overview&#34;&gt;&lt;/p&gt;
&lt;p align=&#34;center&#34;&gt;&lt;img src=&#34;../automatic-logging-example-results.png&#34; alt=&#34;Automatic logging overview&#34;&gt;&lt;/p&gt;
]]></content><description>&lt;h1 id="automatic-logging-trace-discovery-through-logs">Automatic logging: Trace discovery through logs&lt;/h1>
&lt;p>Running instrumented distributed systems is a very powerful way to gain
understanding over a system, but it brings its own challenges. One of them is
discovering which traces exist.&lt;/p></description></item></channel></rss>