<?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: Interesting Behavior when using queryExecutionClient.queryExecute in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231689#M717</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67077"&gt;@DeeJay&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Could it be that it's just because you don't have services with both number of callers and called services are greater than 1 in the whort time period?&lt;/P&gt;&lt;P&gt;I would suggest first display the values without increasing the timerange to make sure its correct.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 06:58:08 GMT</pubDate>
    <dc:creator>gilgi</dc:creator>
    <dc:date>2023-12-13T06:58:08Z</dc:date>
    <item>
      <title>Interesting Behavior when using queryExecutionClient.queryExecute</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231679#M716</link>
      <description>&lt;P&gt;I recently watched&amp;nbsp;"A Practitioners Guide to "Dynatrace AppEngine: Everything thinkable is now possible"&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=D5SDmLx6Aj4" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=D5SDmLx6Aj4&lt;/A&gt;. where Stefan Wassebauer did a technical demo of fetching dt.entity.service and getting the called and calling services.&amp;nbsp; &amp;nbsp;I thought I would replicate his work to cement my knowledge.&amp;nbsp; Without the code and some of the DQL being off screen.&amp;nbsp; I started with Notebooks in my environment to make sure I knew where to start.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the DQL that I ended up with:&lt;/P&gt;&lt;P&gt;fetch dt.entity.service&lt;/P&gt;&lt;P&gt;| fieldsAdd num_callers = arraySize(called_by[dt.entity.service]), num_called = arraySize(calls[dt.entity.service])&lt;BR /&gt;| filter num_callers &amp;gt; 1&lt;BR /&gt;| filter num_called &amp;gt; 1&lt;BR /&gt;| limit 20&lt;/P&gt;&lt;P&gt;when I added this to my code for app Engine&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;export&lt;/SPAN&gt; &lt;SPAN&gt;default&lt;/SPAN&gt; &lt;SPAN&gt;async&lt;/SPAN&gt; &lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; () {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;queryExecutionClient&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryExecute&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;query&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"fetch dt.entity.service | fieldsAdd num_callers = arraySize(called_by[dt.entity.service]), num_called = arraySize(calls[dt.entity.service]) | filter num_callers &amp;gt; 1 | filter num_called &amp;gt; 1 | limit 10"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;requestTimeoutMilliseconds&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;30000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I found that I was only getting 1 record returned,&amp;nbsp; after a little experimenting with different DQLs including some Logs,&amp;nbsp; I found I needed to add a ", from:now() - 100d" into my DQL,&amp;nbsp; I am only a couple of months into working with Dynatrace and DQL is still new to me but I don't understand why I would need a time range in my DQL when working with dt.entities.&amp;nbsp; Can someone point me to the explanation&amp;nbsp;of this?&amp;nbsp; Code change to make it work&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;export&lt;/SPAN&gt; &lt;SPAN&gt;default&lt;/SPAN&gt; &lt;SPAN&gt;async&lt;/SPAN&gt; &lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; () {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;queryExecutionClient&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryExecute&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;query&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"fetch dt.entity.service &lt;STRONG&gt;&lt;EM&gt;, from:now() - 100d&lt;/EM&gt;&lt;/STRONG&gt; | fieldsAdd num_callers = arraySize(called_by[dt.entity.service]), num_called = arraySize(calls[dt.entity.service]) | filter num_callers &amp;gt; 1 | filter num_called &amp;gt; 1 | limit 10"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;requestTimeoutMilliseconds&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;30000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;</description>
      <pubDate>Tue, 12 Dec 2023 23:16:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231679#M716</guid>
      <dc:creator>DeeJay</dc:creator>
      <dc:date>2023-12-12T23:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Interesting Behavior when using queryExecutionClient.queryExecute</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231689#M717</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67077"&gt;@DeeJay&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Could it be that it's just because you don't have services with both number of callers and called services are greater than 1 in the whort time period?&lt;/P&gt;&lt;P&gt;I would suggest first display the values without increasing the timerange to make sure its correct.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 06:58:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231689#M717</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2023-12-13T06:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Interesting Behavior when using queryExecutionClient.queryExecute</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231775#M718</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/12008"&gt;@gilgi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comment,&amp;nbsp; the issue I am having is caused by an assumption on my part.&amp;nbsp; I was testing my DQL in Notebooks and I assumed the time range was the same as the default in my appEngine app.&amp;nbsp; By default a new Notebook Query Grail on my system is Last 7 days, and clearly in the&amp;nbsp;&lt;SPAN&gt;queryExecutionClient&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryExecute the time range is less.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other assumption I was making is that a dt.entity.service didn't have a time range but when I did a&lt;BR /&gt;describe dt.entity.service in my notebook,&amp;nbsp; I found the lifetime field which is a TIMEFRAME which makes sense now that I think about it.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 13:58:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Interesting-Behavior-when-using-queryExecutionClient/m-p/231775#M718</guid>
      <dc:creator>DeeJay</dc:creator>
      <dc:date>2023-12-13T13:58:50Z</dc:date>
    </item>
  </channel>
</rss>

