<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to heatmap a timeseries? in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/290514#M5539</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried to build the heatmap you described and here are the findings.&lt;/P&gt;&lt;P&gt;Using metrics alone (e.g., avg(duration) and sum(calls)) it’s not possible to derive a distribution of calls across duration buckets. Timeseries metrics don’t contain per-call durations, so DQL can’t “unwind” them into individual events.&lt;/P&gt;&lt;P&gt;To calculate the distribution correctly you need to use span-level data, which contains the actual duration of every call.&lt;BR /&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| fieldsAdd
    day_of_week     = getDayOfWeek(start_time),
    duration_bucket = range(duration, duration(100, "ms"))
| summarize calls = count(), by: { day_of_week, duration_bucket }
| sort day_of_week asc&lt;/LI-CODE&gt;&lt;P&gt;This produces a clean distribution table (day of week × duration bucket × calls).&lt;BR /&gt;However, Dynatrace heatmap does not support span-based queries, so even with correctly shaped data this cannot be visualized as a heatmap.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1764345540429.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31052iE7AF68A2BC8FFE43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_0-1764345540429.png" alt="t_pawlak_0-1764345540429.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I also tried converting the buckets into strings:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| fieldsAdd
    day = formatTimestamp(start_time, format:"EEE"),
    bucket = concat(
        toLong(duration / duration(100,"ms")) * 100,
        "-",
        toLong(duration / duration(100,"ms")) * 100 + 100,
        " ms"
    )
| summarize calls = count(), by: { day, bucket }
| sort day asc, bucket asc&lt;/LI-CODE&gt;&lt;P&gt;This gives the right structure (string/string/number), but heatmap still rejects it because the heatmap visualization currently works only for metric-based queries, not for span/log/event queries.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_1-1764345630653.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31053i89B0F5CF26A0BA9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_1-1764345630653.png" alt="t_pawlak_1-1764345630653.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can try this on your data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Nov 2025 16:00:51 GMT</pubDate>
    <dc:creator>t_pawlak</dc:creator>
    <dc:date>2025-11-28T16:00:51Z</dc:date>
    <item>
      <title>How to heatmap a timeseries?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/285822#M5366</link>
      <description>&lt;P&gt;I have timeseries metrics with common meta-data.&amp;nbsp; The first is the count of "calls", the second is duration of calls.&amp;nbsp; I'd like to create a heat map with the data to quickly identify distribution of call volume by response time across a full week.&amp;nbsp; To do this would have x-axis as `day of the week`, y-axis as `range of durations`, and the value the number of calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm thinking something like:&lt;/P&gt;
&lt;P&gt;Starting with this: `timeseries { avg=avg(otel.tyk.duration), calls=sum(otel.tyk.calls) }&amp;nbsp;&lt;BR /&gt;...&lt;BR /&gt;Finishing with this: `| summarize calls=sum(calls), by:{range(duration), 100ms, day_of_week}`&lt;/P&gt;
&lt;P&gt;Unsure of the middle and how to unwind the 2 timeseries metrics to get the day of week range, that would allow me to finish...&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2025 09:57:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/285822#M5366</guid>
      <dc:creator>ronmacdonald</dc:creator>
      <dc:date>2025-09-24T09:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to heatmap a timeseries?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/290501#M5536</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/5224"&gt;@ronmacdonald&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a documentation page about &lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/dashboards-and-notebooks/edit-visualizations/visualization-heatmap" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Heatmap visualization&lt;/STRONG&gt;&lt;/A&gt; in the Dynatrace Documentation. Can you take a look at this please and let us know whether is it helping your issue in any way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for collaboration!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 12:04:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/290501#M5536</guid>
      <dc:creator>Michal_Gebacki</dc:creator>
      <dc:date>2025-11-28T12:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to heatmap a timeseries?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/290514#M5539</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried to build the heatmap you described and here are the findings.&lt;/P&gt;&lt;P&gt;Using metrics alone (e.g., avg(duration) and sum(calls)) it’s not possible to derive a distribution of calls across duration buckets. Timeseries metrics don’t contain per-call durations, so DQL can’t “unwind” them into individual events.&lt;/P&gt;&lt;P&gt;To calculate the distribution correctly you need to use span-level data, which contains the actual duration of every call.&lt;BR /&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| fieldsAdd
    day_of_week     = getDayOfWeek(start_time),
    duration_bucket = range(duration, duration(100, "ms"))
| summarize calls = count(), by: { day_of_week, duration_bucket }
| sort day_of_week asc&lt;/LI-CODE&gt;&lt;P&gt;This produces a clean distribution table (day of week × duration bucket × calls).&lt;BR /&gt;However, Dynatrace heatmap does not support span-based queries, so even with correctly shaped data this cannot be visualized as a heatmap.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1764345540429.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31052iE7AF68A2BC8FFE43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_0-1764345540429.png" alt="t_pawlak_0-1764345540429.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I also tried converting the buckets into strings:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| fieldsAdd
    day = formatTimestamp(start_time, format:"EEE"),
    bucket = concat(
        toLong(duration / duration(100,"ms")) * 100,
        "-",
        toLong(duration / duration(100,"ms")) * 100 + 100,
        " ms"
    )
| summarize calls = count(), by: { day, bucket }
| sort day asc, bucket asc&lt;/LI-CODE&gt;&lt;P&gt;This gives the right structure (string/string/number), but heatmap still rejects it because the heatmap visualization currently works only for metric-based queries, not for span/log/event queries.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_1-1764345630653.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31053i89B0F5CF26A0BA9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_1-1764345630653.png" alt="t_pawlak_1-1764345630653.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can try this on your data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 16:00:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-heatmap-a-timeseries/m-p/290514#M5539</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-28T16:00:51Z</dc:date>
    </item>
  </channel>
</rss>

