<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Use traces in Grafana on Grafana Labs</title><link>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/</link><description>Recent content in Use traces in Grafana on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/index.xml" rel="self" type="application/rss+xml"/><item><title>Link to a trace ID</title><link>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/link-trace-id/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/link-trace-id/</guid><content><![CDATA[&lt;h1 id=&#34;link-to-a-trace-id&#34;&gt;Link to a trace ID&lt;/h1&gt;
&lt;p&gt;You can link to Tempo traces from logs or metrics.&lt;/p&gt;
&lt;h2 id=&#34;link-to-a-trace-id-from-logs&#34;&gt;Link to a trace ID from logs&lt;/h2&gt;
&lt;p&gt;You can link to Tempo traces from logs in Loki, Elasticsearch, Splunk, and other logs data sources by configuring an internal link.&lt;/p&gt;
&lt;p&gt;To configure this feature, refer to the 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/loki/configure-loki-data-source/#derived-fields&#34;&gt;Derived fields&lt;/a&gt; section of the Loki data source docs or the 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/elasticsearch/configure/#data-links&#34;&gt;Data links&lt;/a&gt; section of the Elasticsearch or Splunk data source docs.&lt;/p&gt;
&lt;h2 id=&#34;link-to-a-trace-id-from-metrics&#34;&gt;Link to a trace ID from metrics&lt;/h2&gt;
&lt;p&gt;You can link to Tempo traces from metrics in Prometheus data sources by configuring an exemplar.&lt;/p&gt;
&lt;p&gt;To configure this feature, refer to the 
    &lt;a href=&#34;/docs/grafana/v12.4/fundamentals/exemplars/&#34;&gt;Exemplars&lt;/a&gt; documentation.&lt;/p&gt;
]]></content><description>&lt;h1 id="link-to-a-trace-id">Link to a trace ID&lt;/h1>
&lt;p>You can link to Tempo traces from logs or metrics.&lt;/p>
&lt;h2 id="link-to-a-trace-id-from-logs">Link to a trace ID from logs&lt;/h2>
&lt;p>You can link to Tempo traces from logs in Loki, Elasticsearch, Splunk, and other logs data sources by configuring an internal link.&lt;/p></description></item><item><title>Upload a JSON trace file</title><link>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/json-trace-file/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/json-trace-file/</guid><content><![CDATA[&lt;h1 id=&#34;upload-a-json-trace-file&#34;&gt;Upload a JSON trace file&lt;/h1&gt;
&lt;p&gt;You can upload a JSON file that contains a single trace and visualize it.
If the file has multiple traces, Grafana visualizes the first trace.&lt;/p&gt;
&lt;p&gt;To upload a trace file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;Explore&lt;/strong&gt; in Grafana.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Import trace&lt;/strong&gt; in the right corner.&lt;/li&gt;
&lt;li&gt;Upload your JSON trace file.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;download-a-trace-or-service-graph&#34;&gt;Download a trace or service graph&lt;/h2&gt;
&lt;p&gt;To download a trace or Service Graph through the 
    &lt;a href=&#34;/docs/grafana/v12.4/explore/explore-inspector/&#34;&gt;Inspector panel&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the inspector.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Data&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Download traces&lt;/strong&gt; or &lt;strong&gt;Download Service Graph&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;trace-json-example&#34;&gt;Trace JSON 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;JSON&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-json&#34;&gt;{
  &amp;#34;batches&amp;#34;: [
    {
      &amp;#34;resource&amp;#34;: {
        &amp;#34;attributes&amp;#34;: [
          { &amp;#34;key&amp;#34;: &amp;#34;service.name&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;db&amp;#34; } },
          { &amp;#34;key&amp;#34;: &amp;#34;job&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;tns/db&amp;#34; } },
          { &amp;#34;key&amp;#34;: &amp;#34;opencensus.exporterversion&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;Jaeger-Go-2.22.1&amp;#34; } },
          { &amp;#34;key&amp;#34;: &amp;#34;host.name&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;63d16772b4a2&amp;#34; } },
          { &amp;#34;key&amp;#34;: &amp;#34;ip&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;0.0.0.0&amp;#34; } },
          { &amp;#34;key&amp;#34;: &amp;#34;client-uuid&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;39fb01637a579639&amp;#34; } }
        ]
      },
      &amp;#34;instrumentationLibrarySpans&amp;#34;: [
        {
          &amp;#34;instrumentationLibrary&amp;#34;: {},
          &amp;#34;spans&amp;#34;: [
            {
              &amp;#34;traceId&amp;#34;: &amp;#34;AAAAAAAAAABguiq7RPE&amp;#43;rg==&amp;#34;,
              &amp;#34;spanId&amp;#34;: &amp;#34;cmteMBAvwNA=&amp;#34;,
              &amp;#34;parentSpanId&amp;#34;: &amp;#34;OY8PIaPbma4=&amp;#34;,
              &amp;#34;name&amp;#34;: &amp;#34;HTTP GET - root&amp;#34;,
              &amp;#34;kind&amp;#34;: &amp;#34;SPAN_KIND_SERVER&amp;#34;,
              &amp;#34;startTimeUnixNano&amp;#34;: &amp;#34;1627471657255809000&amp;#34;,
              &amp;#34;endTimeUnixNano&amp;#34;: &amp;#34;1627471657256268000&amp;#34;,
              &amp;#34;attributes&amp;#34;: [
                { &amp;#34;key&amp;#34;: &amp;#34;http.status_code&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;intValue&amp;#34;: &amp;#34;200&amp;#34; } },
                { &amp;#34;key&amp;#34;: &amp;#34;http.method&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;GET&amp;#34; } },
                { &amp;#34;key&amp;#34;: &amp;#34;http.url&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;/&amp;#34; } },
                { &amp;#34;key&amp;#34;: &amp;#34;component&amp;#34;, &amp;#34;value&amp;#34;: { &amp;#34;stringValue&amp;#34;: &amp;#34;net/http&amp;#34; } }
              ],
              &amp;#34;status&amp;#34;: {}
            }
          ]
        }
      ]
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="upload-a-json-trace-file">Upload a JSON trace file&lt;/h1>
&lt;p>You can upload a JSON file that contains a single trace and visualize it.
If the file has multiple traces, Grafana visualizes the first trace.&lt;/p></description></item><item><title>Trace correlations</title><link>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/trace-correlations/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/tempo/traces-in-grafana/trace-correlations/</guid><content><![CDATA[&lt;h1 id=&#34;trace-correlations&#34;&gt;Trace correlations&lt;/h1&gt;
&lt;p&gt;You can use Grafana 
    &lt;a href=&#34;/docs/grafana/v12.4/administration/correlations/&#34;&gt;correlations&lt;/a&gt; to embed interactive correlation links in your trace view to jump from spans to related logs, metrics, profiles, or external systems. This guide explains how to configure and manage Trace correlations in Grafana.&lt;/p&gt;
&lt;h2 id=&#34;what-are-trace-correlations&#34;&gt;What are trace correlations?&lt;/h2&gt;
&lt;p&gt;Trace correlations let you define rules that inject context-sensitive links into your trace spans. When viewing traces in Explore or the Traces panel, users can click these links to navigate directly to relevant queries or URLs. Correlations are similar but more flexible to the 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/tempo/configure-tempo-data-source/&#34;&gt;trace to logs, metrics, and profiles links you can configure for the Tempo data source&lt;/a&gt;.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
    style=&#34;max-width: 900px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link&#34;
        href=&#34;/media/docs/tempo/screenshot-trace-view-correlations.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload &#34;
          data-src=&#34;/media/docs/tempo/screenshot-trace-view-correlations.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-trace-view-correlations.png?w=320 320w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=550 550w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=750 750w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=900 900w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=1040 1040w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=1240 1240w, /media/docs/tempo/screenshot-trace-view-correlations.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Using correlations for a trace&#34;width=&#34;1400&#34;height=&#34;1170&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/tempo/screenshot-trace-view-correlations.png&#34;
            alt=&#34;Using correlations for a trace&#34;width=&#34;1400&#34;height=&#34;1170&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;To use trace correlations, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grafana 12 or later&lt;/li&gt;
&lt;li&gt;A 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/tempo/configure-tempo-data-source/&#34;&gt;Tempo data source&lt;/a&gt; configured in Grafana&lt;/li&gt;
&lt;li&gt;Admin access to configuration settings or provisioning files in Grafana&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;set-up-a-trace-correlation&#34;&gt;Set up a trace correlation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Log in to Grafana with an admin account.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to &lt;strong&gt;Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Plugins &amp;amp; data&lt;/strong&gt; &amp;gt; &lt;strong&gt;Correlations&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select &lt;strong&gt;Add correlation&lt;/strong&gt; or &lt;strong&gt;Add new&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 1, provide a &lt;strong&gt;label&lt;/strong&gt; for the correlation, and an optional &lt;strong&gt;description&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 2, configure the correlation &lt;strong&gt;target&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select the &lt;strong&gt;Type&lt;/strong&gt; drop-down list and choose &lt;strong&gt;Query&lt;/strong&gt; to link to another data source or choose &lt;strong&gt;External&lt;/strong&gt; for a custom URL.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For a query &lt;strong&gt;Target&lt;/strong&gt;, select the target drop-down list and select the data source that should be queried when the link is clicked. Define the target query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For an external &lt;strong&gt;Target&lt;/strong&gt;, enter the &lt;strong&gt;External URL&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For both query and external targets, you can use the following variables based on trace data. Object variables must be parsed into a value variable with a regular expression transformation.&lt;/p&gt;
&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;Variable&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;traceId&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String&lt;/td&gt;
              &lt;td&gt;Trace identifier&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;spanID&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String&lt;/td&gt;
              &lt;td&gt;Span identifier&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;parentSpanID&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String&lt;/td&gt;
              &lt;td&gt;Parent span identifier&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceName&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;String&lt;/td&gt;
              &lt;td&gt;Service name&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;serviceTags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
              &lt;td&gt;Resource attributes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
              &lt;td&gt;Span attributes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
              &lt;td&gt;Trace events&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;references&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Object&lt;/td&gt;
              &lt;td&gt;Trace links&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
       style=&#34;max-width: 900px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link&#34;
           href=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload &#34;
             data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Setting up a correlation for a Loki target using trace variables&#34;width=&#34;1824&#34;height=&#34;1226&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-2.png&#34;
               alt=&#34;Setting up a correlation for a Loki target using trace variables&#34;width=&#34;1824&#34;height=&#34;1226&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 3, configure the correlation data source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select your Tempo data source in the &lt;strong&gt;Source&lt;/strong&gt; drop-down list.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the trace data variable you use for the correlation in the &lt;strong&gt;Results field&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optionally, add one or more &lt;strong&gt;Transformations&lt;/strong&gt; to parse the trace data into additional variables. You can use these variables to configure the correlation &lt;strong&gt;Target&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
       style=&#34;max-width: 900px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link&#34;
           href=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload &#34;
             data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Setting up a correlation for a Loki data source&#34;width=&#34;1826&#34;height=&#34;1060&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/media/docs/tempo/screenshot-grafana-trace-correlations-loki-step-3.png&#34;
               alt=&#34;Setting up a correlation for a Loki data source&#34;width=&#34;1826&#34;height=&#34;1060&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select &lt;strong&gt;Save&lt;/strong&gt; to save the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;verifying-correlations-in-explore&#34;&gt;Verifying correlations in Explore&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open &lt;strong&gt;Explore&lt;/strong&gt; and select your Tempo tracing source.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run a query to load spans.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hover over the span links menu or open the span details to reveal the correlation link buttons.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
       style=&#34;max-width: 900px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link&#34;
           href=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload &#34;
             data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-view-correlations.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Using correlations for a trace&#34;width=&#34;1400&#34;height=&#34;1170&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations.png&#34;
               alt=&#34;Using correlations for a trace&#34;width=&#34;1400&#34;height=&#34;1170&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click a correlation link to open a split view or navigate to your target system or query.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Below are several practical correlation configurations to get you started.&lt;/p&gt;
&lt;h3 id=&#34;example-1-trace-to-logs-by-service-name-and-trace-identifier&#34;&gt;Example 1: Trace to logs by service name and trace identifier&lt;/h3&gt;
&lt;p&gt;In this example, you configure trace to logs by service name and a trace identifier.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On step 1, add a new correlation with the label &lt;strong&gt;Logs for this service and trace&lt;/strong&gt; and an optional description.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
       style=&#34;max-width: 900px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link&#34;
           href=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload &#34;
             data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Using correlations for a trace&#34;width=&#34;1812&#34;height=&#34;562&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-1.png&#34;
               alt=&#34;Using correlations for a trace&#34;width=&#34;1812&#34;height=&#34;562&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 2, configure the correlation target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select the target type &lt;strong&gt;Query&lt;/strong&gt; and select your Loki data source as &lt;strong&gt;Target&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Define the Loki query, using &lt;code&gt;serviceName&lt;/code&gt; and &lt;code&gt;traceID&lt;/code&gt; as variables derived from the span data:&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;{service_name=&amp;#34;$serviceName&amp;#34;} | trace_id=`$traceID` |= ``&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;figure
         class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
         style=&#34;max-width: 900px;&#34;
         itemprop=&#34;associatedMedia&#34;
         itemscope=&#34;&#34;
         itemtype=&#34;http://schema.org/ImageObject&#34;
       &gt;&lt;a
             class=&#34;lightbox-link&#34;
             href=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png&#34;
             itemprop=&#34;contentUrl&#34;
           &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
               class=&#34;lazyload &#34;
               data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Using correlations for a trace&#34;width=&#34;1816&#34;height=&#34;1370&#34;/&gt;
             &lt;noscript&gt;
               &lt;img
                 src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-2.png&#34;
                 alt=&#34;Using correlations for a trace&#34;width=&#34;1816&#34;height=&#34;1370&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
             &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 3, configure the correlation source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select your Tempo data source as &lt;strong&gt;Source&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;traceID&lt;/code&gt; as &lt;strong&gt;Results field&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a new transformation to extract the &lt;code&gt;serviceName&lt;/code&gt; from the span &lt;code&gt;serviceTags&lt;/code&gt; using the regular expression:&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;{(?=[^\}]*\bkey&amp;#34;:&amp;#34;service.name&amp;#34;)[^\}]*\bvalue&amp;#34;:&amp;#34;(.*?)&amp;#34;.*}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
       style=&#34;max-width: 900px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link&#34;
           href=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload &#34;
             data-src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png&#34;data-srcset=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=320 320w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=550 550w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=750 750w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=900 900w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=1040 1040w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=1240 1240w, /media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Using correlations for a trace&#34;width=&#34;1812&#34;height=&#34;1050&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/media/docs/tempo/screenshot-grafana-trace-view-correlations-example-1-step-3.png&#34;
               alt=&#34;Using correlations for a trace&#34;width=&#34;1812&#34;height=&#34;1050&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;example-2-trace-to-custom-url&#34;&gt;Example 2: Trace to custom URL&lt;/h3&gt;
&lt;p&gt;In this example, you configure trace corrections with a custom URL.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On step 1, add a new correlation with the label &lt;strong&gt;Open custom URL&lt;/strong&gt; and an optional description.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 2, configure the correlation target:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select the target type &lt;strong&gt;External&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Define your target URL, using variables derived from the span data. In this example, we are using &lt;code&gt;serviceName&lt;/code&gt; and &lt;code&gt;traceID&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;https://my-server.example.com/service=$serviceName&amp;amp;trace=$traceID&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On step 3, configure the correlation source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select your Tempo data source as &lt;strong&gt;Source&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;traceID&lt;/code&gt; as &lt;strong&gt;Results field&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a new transformation to extract the &lt;code&gt;serviceName&lt;/code&gt; from the span &lt;code&gt;serviceTags&lt;/code&gt; using the regular expression:&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;{(?=[^\}]*\bkey&amp;#34;:&amp;#34;service.name&amp;#34;)[^\}]*\bvalue&amp;#34;:&amp;#34;(.*?)&amp;#34;.*}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;best-practices&#34;&gt;Best practices&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Name clearly:&lt;/strong&gt; Use descriptive names indicating source and target. For example: &lt;strong&gt;Trace to errors in logs&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Limit scope&lt;/strong&gt;: For high-cardinality fields (like &lt;code&gt;traceID&lt;/code&gt;), ensure your target system can handle frequent queries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Template wisely:&lt;/strong&gt; Use multiple &lt;code&gt;$variable&lt;/code&gt; tokens if you need to inject more than one field.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="trace-correlations">Trace correlations&lt;/h1>
&lt;p>You can use Grafana
&lt;a href="/docs/grafana/v12.4/administration/correlations/">correlations&lt;/a> to embed interactive correlation links in your trace view to jump from spans to related logs, metrics, profiles, or external systems. This guide explains how to configure and manage Trace correlations in Grafana.&lt;/p></description></item></channel></rss>