<?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: Traces on Grail: getting the &amp;quot;processing&amp;quot; time in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/264940#M34992</link>
    <description>&lt;P&gt;anyone figured this out?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2024 19:54:43 GMT</pubDate>
    <dc:creator>imrj99</dc:creator>
    <dc:date>2024-12-10T19:54:43Z</dc:date>
    <item>
      <title>Traces on Grail: getting the "processing" time</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/242779#M31887</link>
      <description>&lt;P&gt;I was just asking myself how to get the overall processing time of a trace. In Grail spans and traces all have a duration field but there is no knowledge of what runs asynchronously or sequentially.&lt;/P&gt;&lt;P&gt;Imagine this trace in the UI:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="r_weber_0-1713279094517.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18931iF5B56AF224CCBAE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="r_weber_0-1713279094517.png" alt="r_weber_0-1713279094517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the async stuff going on the "response time" is 30.7ms. One can see this on the root span of the trace as well. But then there are a lot of async calls and the actual time I'd be interested is the "Processing time" which is ~1s.&lt;/P&gt;&lt;P&gt;If I want to know how much time is spent on a individual service int total I can't just sum up the "duration" of these service calls, neither can I add up all span durations for the overall duration of the trace?&lt;/P&gt;&lt;P&gt;Any ideas how to solve this? How could one get the duration/processing time of this trace using a query?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 14:55:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/242779#M31887</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2024-04-16T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Traces on Grail: getting the "processing" time</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/264940#M34992</link>
      <description>&lt;P&gt;anyone figured this out?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 19:54:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/264940#M34992</guid>
      <dc:creator>imrj99</dc:creator>
      <dc:date>2024-12-10T19:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Traces on Grail: getting the "processing" time</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/268330#M35503</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/35901"&gt;@r_weber&lt;/a&gt;&amp;nbsp;the processing time as you describe it would be the difference of the earliest start and latest end time of the spans of a trace when I got your question right. If you want to have this also for the spans of a the services within a trace you need to make a multi step summarize query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this in DQL and would get this result.&lt;/P&gt;&lt;PRE&gt;fetch spans&lt;BR /&gt;| summarize {request.start_time = min(start_time), &lt;BR /&gt;request.end_time = max(end_time)}, by: {trace.id, dt.entity.service}&lt;BR /&gt;| summarize {trace.start_time = min(request.start_time), &lt;BR /&gt;trace.end_time = max(request.end_time), &lt;BR /&gt;request.processing_times = collectArray(record(dt.entity.service, request.start_time, request.end_time, request.processing_time = request.end_time-request.start_time))}, by: {trace.id}&lt;BR /&gt;| fieldsAdd trace.processing_time = trace.end_time - trace.start_time&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andreas_Gruber_1-1737725274796.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/25944iB3D634AD8549FB2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Andreas_Gruber_1-1737725274796.png" alt="Andreas_Gruber_1-1737725274796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does this help? For a single trace you could add a trace.id filter right after the fetch.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 13:28:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Traces-on-Grail-getting-the-quot-processing-quot-time/m-p/268330#M35503</guid>
      <dc:creator>Andreas_Gruber</dc:creator>
      <dc:date>2025-01-24T13:28:18Z</dc:date>
    </item>
  </channel>
</rss>

