<?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: Fetch Spans to Calculate Duration as shown in Distributed Tracing in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275580#M1967</link>
    <description>&lt;P&gt;I think you can get the main trace if you look for spans where the span.parent_id value is not present (null).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In its simplest form and without any additional filters, the DQL might look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch spans
| filter isNull(span.parent_id)
| fields start_time, trace.id, dt.entity.service, endpoint.name, duration&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Apr 2025 23:05:31 GMT</pubDate>
    <dc:creator>marco_irmer</dc:creator>
    <dc:date>2025-04-21T23:05:31Z</dc:date>
    <item>
      <title>Fetch Spans to Calculate Duration in Distributed Traces Using DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275575#M1965</link>
      <description>&lt;P&gt;I'm trying to mimic the way duration of a trace is shown in the Distributed Tracing apps. I'm getting very, very close but seem to be missing something. I realize this may be slightly different depending on the application, but I'd like to know if anyone has had any success with this or if anyone from Dynatrace would like to chime in and describe how it's calculated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My trouble is some of the spans seem to be duplicated to represent code functions and if I don't exclude them from my query they will contribute to the overall sum of the durations.&lt;/P&gt;
&lt;P&gt;The reason this is important is because I'd like to calculate duration of a trace, but without certain specific spans and their sub-spans. I'm trying to recreate the duration in DQL as a start.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:55:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275575#M1965</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-12-18T10:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Spans to Calculate Duration as shown in Distributed Tracing</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275580#M1967</link>
      <description>&lt;P&gt;I think you can get the main trace if you look for spans where the span.parent_id value is not present (null).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In its simplest form and without any additional filters, the DQL might look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch spans
| filter isNull(span.parent_id)
| fields start_time, trace.id, dt.entity.service, endpoint.name, duration&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Apr 2025 23:05:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275580#M1967</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-04-21T23:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Spans to Calculate Duration as shown in Distributed Tracing</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275666#M1973</link>
      <description>&lt;P&gt;That doesn't seem to work because my beginning span also has a span.parent_id&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 13:54:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/275666#M1973</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-04-22T13:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Spans to Calculate Duration as shown in Distributed Tracing</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/291792#M2928</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/53298"&gt;@StrangerThing&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN&gt;I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know what works best for you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:54:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/291792#M2928</guid>
      <dc:creator>IzabelaRokita</dc:creator>
      <dc:date>2025-12-18T10:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Spans to Calculate Duration as shown in Distributed Tracing</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/291838#M2947</link>
      <description>&lt;P&gt;I've built out something that works, however I'd still like a way to differentiate between async and sync spans&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 14:03:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Spans-to-Calculate-Duration-in-Distributed-Traces-Using/m-p/291838#M2947</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-12-18T14:03:28Z</dc:date>
    </item>
  </channel>
</rss>

