<?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: Confused about :sum behavior on gauge metric (memory_working_set) at 1-day resolution in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Confused-about-sum-behavior-on-gauge-metric-memory-working-set/m-p/282792#M37235</link>
    <description>&lt;P&gt;We have the answer from internal support team &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;The Issue&lt;/STRONG&gt;:&lt;BR /&gt;I was using :sum on the metric builtin:kubernetes.workload.memory_working_set&amp;nbsp;(it's the default metric used by dynatrace ) expecting it to sum all values over the day. But the result (e.g., 92 GiB) seemed too low, especially when there were higher values (like 210 GiB) earlier in the day.&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;What’s Actually Happening&lt;/STRONG&gt;:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;If the metric &lt;STRONG&gt;does not support :sum aggregation&lt;/STRONG&gt; natively, Dynatrace &lt;STRONG&gt;falls back to the default aggregation&lt;/STRONG&gt;, which is usually :avg.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Then, if you're using :splitBy(...), it &lt;STRONG&gt;sums up the average values&lt;/STRONG&gt;, not the original raw data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;So, the final number you see is &lt;STRONG&gt;not the true sum&lt;/STRONG&gt; of all 5-minute snapshots — it's &lt;STRONG&gt;sum of the averages per split&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;To get the &lt;STRONG&gt;true total usage&lt;/STRONG&gt;, you need to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Set your resolution to &lt;STRONG&gt;5 minutes&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Append :fold(sum) to the query&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;builtin:kubernetes.workload.memory_working_set:filter(...):splitBy(...):fold(sum) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;Key Takeaway&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The :sum aggregation at 1-day resolution &lt;STRONG&gt;can be misleading&lt;/STRONG&gt; if the metric doesn't support it directly.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If there was a spike earlier in the day (e.g., memory usage was 210 GiB and dropped to 90 GiB later), you won't notice it from the 1-day aggregated view.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For &lt;STRONG&gt;more accurate insights&lt;/STRONG&gt;, it's better to use &lt;STRONG&gt;5-minute resolution&lt;/STRONG&gt; and analyze usage over time — hour by hour.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 01 Aug 2025 09:22:04 GMT</pubDate>
    <dc:creator>Aboud1</dc:creator>
    <dc:date>2025-08-01T09:22:04Z</dc:date>
    <item>
      <title>Confused about :sum behavior on gauge metric (memory_working_set) at 1-day resolution</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Confused-about-sum-behavior-on-gauge-metric-memory-working-set/m-p/282348#M37176</link>
      <description>&lt;P&gt;Hi Dynatrace Community &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;,&lt;/P&gt;
&lt;P&gt;I'm trying to understand how the :sum aggregation works with the &lt;STRONG&gt;gauge&lt;/STRONG&gt; metric builtin:kubernetes.workload.memory_working_set when using &lt;STRONG&gt;1-day resolution&lt;/STRONG&gt; in Data Explorer.&lt;/P&gt;
&lt;P&gt;Here’s what I observed:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;For most of the day, the memory usage (working set) was steady around &lt;STRONG&gt;92 GiB&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;At the &lt;STRONG&gt;beginning&lt;/STRONG&gt; of the day, there was a &lt;STRONG&gt;spike over 210 GiB&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;I used :sum aggregation on the metric.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Still, the &lt;STRONG&gt;final daily value&lt;/STRONG&gt; shown is &lt;STRONG&gt;only ~99.6 GiB&lt;/STRONG&gt;, which doesn’t make sense to me if this is a &lt;EM&gt;sum&lt;/EM&gt; of all buckets during the day.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Dynatrace used this metric query (by default - in the data explorer view):&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;builtin&lt;/SPAN&gt;:kubernetes.workload.memory_working_set:splitBy(&lt;SPAN class=""&gt;"dt.entity.cloud_application_namespace"&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Example screenshot (attached):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aboud1_0-1753541399043.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/29202iDA9EF946EEC8CB2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aboud1_0-1753541399043.png" alt="Aboud1_0-1753541399043.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aboud1_1-1753541509705.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/29203iA2CDE6771C7FFD9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aboud1_1-1753541509705.png" alt="Aboud1_1-1753541509705.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can clearly see that the values stayed stable around 90 for several hours.&lt;/P&gt;
&lt;HR /&gt;
&lt;H3&gt;My question:&lt;/H3&gt;
&lt;P&gt;If the metric is gauge-based, and I apply :sum at 1-day resolution, shouldn't I expect a higher number — i.e., the sum of all 5-min snapshots across 24 hours?&lt;/P&gt;
&lt;P&gt;Or is :sum on a gauge metric just showing the last bucket value?&lt;/P&gt;
&lt;P&gt;Appreciate any clarification &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 06:49:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Confused-about-sum-behavior-on-gauge-metric-memory-working-set/m-p/282348#M37176</guid>
      <dc:creator>Aboud1</dc:creator>
      <dc:date>2025-07-29T06:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Confused about :sum behavior on gauge metric (memory_working_set) at 1-day resolution</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Confused-about-sum-behavior-on-gauge-metric-memory-working-set/m-p/282792#M37235</link>
      <description>&lt;P&gt;We have the answer from internal support team &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;The Issue&lt;/STRONG&gt;:&lt;BR /&gt;I was using :sum on the metric builtin:kubernetes.workload.memory_working_set&amp;nbsp;(it's the default metric used by dynatrace ) expecting it to sum all values over the day. But the result (e.g., 92 GiB) seemed too low, especially when there were higher values (like 210 GiB) earlier in the day.&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;What’s Actually Happening&lt;/STRONG&gt;:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;If the metric &lt;STRONG&gt;does not support :sum aggregation&lt;/STRONG&gt; natively, Dynatrace &lt;STRONG&gt;falls back to the default aggregation&lt;/STRONG&gt;, which is usually :avg.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Then, if you're using :splitBy(...), it &lt;STRONG&gt;sums up the average values&lt;/STRONG&gt;, not the original raw data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;So, the final number you see is &lt;STRONG&gt;not the true sum&lt;/STRONG&gt; of all 5-minute snapshots — it's &lt;STRONG&gt;sum of the averages per split&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;To get the &lt;STRONG&gt;true total usage&lt;/STRONG&gt;, you need to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Set your resolution to &lt;STRONG&gt;5 minutes&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Append :fold(sum) to the query&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;builtin:kubernetes.workload.memory_working_set:filter(...):splitBy(...):fold(sum) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":small_blue_diamond:"&gt;🔹&lt;/span&gt; &lt;STRONG&gt;Key Takeaway&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The :sum aggregation at 1-day resolution &lt;STRONG&gt;can be misleading&lt;/STRONG&gt; if the metric doesn't support it directly.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If there was a spike earlier in the day (e.g., memory usage was 210 GiB and dropped to 90 GiB later), you won't notice it from the 1-day aggregated view.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For &lt;STRONG&gt;more accurate insights&lt;/STRONG&gt;, it's better to use &lt;STRONG&gt;5-minute resolution&lt;/STRONG&gt; and analyze usage over time — hour by hour.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 01 Aug 2025 09:22:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Confused-about-sum-behavior-on-gauge-metric-memory-working-set/m-p/282792#M37235</guid>
      <dc:creator>Aboud1</dc:creator>
      <dc:date>2025-08-01T09:22:04Z</dc:date>
    </item>
  </channel>
</rss>

