<?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 Help me convert span-based P90 downstream duration query to metric-based Timeseries DQL in milliseconds? in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Help-me-convert-span-based-P90-downstream-duration-query-to/m-p/301287#M5833</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to convert the following &lt;STRONG&gt;span-based DQL query&lt;/STRONG&gt; into a &lt;STRONG&gt;metric-based Timeseries query&lt;/STRONG&gt; using OpenPipeline metric extraction. The goal is to build a dashboard panel that shows the &lt;STRONG&gt;P90 duration of downstream calls&lt;/STRONG&gt;, grouped by scope name.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;U&gt;Original span-based query&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| filter service.name == "Service_Name"
| filter in(Service.domain, array($Service_Domain))
| filter in(Service.node, array($Service_Node))
| fieldsAdd scope_name = toString(otel.scope.name)
| summarize duration_p90 = percentile(duration, 90), by:{scope_name}
| sort duration_p90 desc&lt;/LI-CODE&gt;&lt;P&gt;This query gives the expected P90 duration values in &lt;STRONG&gt;milliseconds&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have created a custom metric through OpenPipeline:&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;spans.service_request_durations&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I am now trying to replicate the same logic using the metric-based Timeseries query below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries duration_p90_ns_series = percentile(
    spans.service_request_durations,
    percentile: 90,
    rollup: avg
  ),
  by: {otel.scope.name, Service.domain, Service.node}
| filter in(Service.domain, array($Service_Domain))
| filter in(Service.node, array($Service_Node))
| fieldsAdd scope_name = toString(otel.scope.name)
| fieldsAdd duration_p90_ms_value = arrayAvg(iCollectArray(toDouble(duration_p90_ns_series[]))) / 1000000.0
| filter isNotNull(duration_p90_ms_value)
| summarize duration_p90_ms = avg(duration_p90_ms_value), by: {scope_name}
| fieldsAdd duration_p90_ms = round(duration_p90_ms, decimals: 2)
| sort duration_p90_ms desc&lt;/LI-CODE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, when I run this Timeseries query, the value of duration_p90_ms_value is displayed in &lt;STRONG&gt;ps&lt;/STRONG&gt;, whereas the original fetch spans query shows the duration correctly in &lt;STRONG&gt;ms&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Could someone please help me understand the correct way to convert this metric-based Timeseries result into &lt;STRONG&gt;milliseconds&lt;/STRONG&gt;, while keeping the same logic as the original span-based query?&lt;/P&gt;</description>
    <pubDate>Sun, 28 Jun 2026 04:09:03 GMT</pubDate>
    <dc:creator>S1012</dc:creator>
    <dc:date>2026-06-28T04:09:03Z</dc:date>
    <item>
      <title>Help me convert span-based P90 downstream duration query to metric-based Timeseries DQL in milliseconds?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Help-me-convert-span-based-P90-downstream-duration-query-to/m-p/301287#M5833</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to convert the following &lt;STRONG&gt;span-based DQL query&lt;/STRONG&gt; into a &lt;STRONG&gt;metric-based Timeseries query&lt;/STRONG&gt; using OpenPipeline metric extraction. The goal is to build a dashboard panel that shows the &lt;STRONG&gt;P90 duration of downstream calls&lt;/STRONG&gt;, grouped by scope name.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;U&gt;Original span-based query&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch spans
| filter service.name == "Service_Name"
| filter in(Service.domain, array($Service_Domain))
| filter in(Service.node, array($Service_Node))
| fieldsAdd scope_name = toString(otel.scope.name)
| summarize duration_p90 = percentile(duration, 90), by:{scope_name}
| sort duration_p90 desc&lt;/LI-CODE&gt;&lt;P&gt;This query gives the expected P90 duration values in &lt;STRONG&gt;milliseconds&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have created a custom metric through OpenPipeline:&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;spans.service_request_durations&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I am now trying to replicate the same logic using the metric-based Timeseries query below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries duration_p90_ns_series = percentile(
    spans.service_request_durations,
    percentile: 90,
    rollup: avg
  ),
  by: {otel.scope.name, Service.domain, Service.node}
| filter in(Service.domain, array($Service_Domain))
| filter in(Service.node, array($Service_Node))
| fieldsAdd scope_name = toString(otel.scope.name)
| fieldsAdd duration_p90_ms_value = arrayAvg(iCollectArray(toDouble(duration_p90_ns_series[]))) / 1000000.0
| filter isNotNull(duration_p90_ms_value)
| summarize duration_p90_ms = avg(duration_p90_ms_value), by: {scope_name}
| fieldsAdd duration_p90_ms = round(duration_p90_ms, decimals: 2)
| sort duration_p90_ms desc&lt;/LI-CODE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, when I run this Timeseries query, the value of duration_p90_ms_value is displayed in &lt;STRONG&gt;ps&lt;/STRONG&gt;, whereas the original fetch spans query shows the duration correctly in &lt;STRONG&gt;ms&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Could someone please help me understand the correct way to convert this metric-based Timeseries result into &lt;STRONG&gt;milliseconds&lt;/STRONG&gt;, while keeping the same logic as the original span-based query?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2026 04:09:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Help-me-convert-span-based-P90-downstream-duration-query-to/m-p/301287#M5833</guid>
      <dc:creator>S1012</dc:creator>
      <dc:date>2026-06-28T04:09:03Z</dc:date>
    </item>
  </channel>
</rss>

