<?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 Log query and usage costs in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/278004#M1344</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting familiar with OOTS Log Query and Usage Costs dashboard and when changing the timeframe to 2hours I usually get strange results in the "Top 10 queries by volume". Some of the entries are "null". What is the reason for this?&lt;BR /&gt;&lt;BR /&gt;I can see that there is a query behind it that pulls billing_usage_event.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;fetch dt.system.events&lt;BR /&gt;| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Log Management &amp;amp; Analytics - Query" and event.version == "1.0"&lt;BR /&gt;| filter in("ALL", $User) OR in(user.email, $User)&lt;BR /&gt;| filter in("ALL", $Application) OR in(client.application_context, $Application)&lt;BR /&gt;| sort billed_bytes desc&lt;BR /&gt;| limit 10&lt;BR /&gt;| lookup [&lt;BR /&gt;fetch dt.system.query_executions&lt;BR /&gt;],&lt;BR /&gt;sourceField: query_id,&lt;BR /&gt;lookupField: query_id,&lt;BR /&gt;prefix: "executiondata.",&lt;BR /&gt;executionOrder:leftFirst&lt;BR /&gt;| fields&lt;BR /&gt;timestamp=toTimestamp(executiondata.timestamp),&lt;BR /&gt;query_string=executiondata.query_string,&lt;BR /&gt;query_volume=toDouble(billed_bytes),&lt;BR /&gt;query_cost = toDouble(billed_bytes)/1024/1024/1024*toDouble($Price),&lt;BR /&gt;User=user.email,&lt;BR /&gt;App=client.application_context&lt;BR /&gt;| fieldsRename `Query string`=query_string, `Query volume`=query_volume, `Query cost`=query_cost&lt;BR /&gt;| sort `Query volume` desc&lt;BR /&gt;&lt;BR /&gt;I use Demo Live environment.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalBojko_0-1748247648765.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28194i07D45FCD8290DC44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalBojko_0-1748247648765.png" alt="MichalBojko_0-1748247648765.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2025 06:44:50 GMT</pubDate>
    <dc:creator>MichalBojko</dc:creator>
    <dc:date>2025-05-30T06:44:50Z</dc:date>
    <item>
      <title>Log query and usage costs</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/278004#M1344</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting familiar with OOTS Log Query and Usage Costs dashboard and when changing the timeframe to 2hours I usually get strange results in the "Top 10 queries by volume". Some of the entries are "null". What is the reason for this?&lt;BR /&gt;&lt;BR /&gt;I can see that there is a query behind it that pulls billing_usage_event.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;fetch dt.system.events&lt;BR /&gt;| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Log Management &amp;amp; Analytics - Query" and event.version == "1.0"&lt;BR /&gt;| filter in("ALL", $User) OR in(user.email, $User)&lt;BR /&gt;| filter in("ALL", $Application) OR in(client.application_context, $Application)&lt;BR /&gt;| sort billed_bytes desc&lt;BR /&gt;| limit 10&lt;BR /&gt;| lookup [&lt;BR /&gt;fetch dt.system.query_executions&lt;BR /&gt;],&lt;BR /&gt;sourceField: query_id,&lt;BR /&gt;lookupField: query_id,&lt;BR /&gt;prefix: "executiondata.",&lt;BR /&gt;executionOrder:leftFirst&lt;BR /&gt;| fields&lt;BR /&gt;timestamp=toTimestamp(executiondata.timestamp),&lt;BR /&gt;query_string=executiondata.query_string,&lt;BR /&gt;query_volume=toDouble(billed_bytes),&lt;BR /&gt;query_cost = toDouble(billed_bytes)/1024/1024/1024*toDouble($Price),&lt;BR /&gt;User=user.email,&lt;BR /&gt;App=client.application_context&lt;BR /&gt;| fieldsRename `Query string`=query_string, `Query volume`=query_volume, `Query cost`=query_cost&lt;BR /&gt;| sort `Query volume` desc&lt;BR /&gt;&lt;BR /&gt;I use Demo Live environment.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalBojko_0-1748247648765.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28194i07D45FCD8290DC44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalBojko_0-1748247648765.png" alt="MichalBojko_0-1748247648765.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 06:44:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/278004#M1344</guid>
      <dc:creator>MichalBojko</dc:creator>
      <dc:date>2025-05-30T06:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Log query and usage costs</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/278043#M1345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/56037"&gt;@MichalBojko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I’ve checked the same scenario in the demo environment, and it appears that the issue is due to the query_id not matching between dt.system.events and dt.system.query_executions.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Mohamed&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 05:40:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/278043#M1345</guid>
      <dc:creator>Mohamed_Hamdy</dc:creator>
      <dc:date>2025-05-27T05:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Log query and usage costs</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/280417#M1386</link>
      <description>&lt;P&gt;Thanks ! This help in a way, It is not my local problem. &lt;BR /&gt;What I heard is that two datasets used in the query are not synchronized, meaning one is "refreshed" more frequently than the other. For that reason this situation is "as expected". Way to overcome is to use 24h timeframe.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 08:10:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Log-query-and-usage-costs/m-p/280417#M1386</guid>
      <dc:creator>MichalBojko</dc:creator>
      <dc:date>2025-06-30T08:10:56Z</dc:date>
    </item>
  </channel>
</rss>

