Graph the number of requests to a service according to response time

Hello,

Using DQL, I want to create a graph to display the number of requests for a specific service with a response time > 10s.

Similar to the Distributed Tracing app ( but not only Successful requests ).

Could you help me?
Alex

If you are interested how query looks like, you can refer to query id shown in the app:

and then check dt.system.query_exections table for particular query id with:

fetch dt.system.query_executions
| filter query_id == "0b12de7e-2891-4acc-a335-1ae959a054c4"

Hi,

This is possible.  Set filter you want to use in Distributed Trace.  Click 3 dots on right and click on “Edit in Notebook” or “Pin to Dashboard”

Once there, click on Options then Line

Click Run

Dynatrace Assist:

Here’s a DQL query to display the number of requests per time interval for a specific service where response time > 10s, as a timeseries graph — covering all requests (not just successful ones):


DQL Query — Requests with Response Time > 10s (Timeseries)

fetch spans, from: now() - 2h| filter request.is_root_span == true| filter duration > 10s| filter dt.entity.service == “SERVICE-XXXXXXXXXXXXXXXX”| makeTimeseries requests = count(), interval: 1m

:repeat_button: Replace SERVICE-XXXXXXXXXXXXXXXX with your actual service entity ID.


How to Use This in Distributed Tracing
  1. Open the Distributed Tracing app
  2. Click “Run DQL” or open a Notebook / Dashboard tile
  3. Paste the query above
  4. Set the visualization to Bar chart or Line chart

Key Points

Element Explanation

request.is_root_span == true Counts only entry-point requests (like the Distributed Tracing app does), not internal/child spans
duration > 10s Filters spans with response time exceeding 10 seconds (10s is a valid DQL duration literal)
No request.is_failed filter Includes both successful and failed requests
makeTimeseries … count() Produces a time-bucketed series suitable for a graph
interval: 1m Adjust granularity — use 5m, 10m, etc. for longer timeframes

Optional: Filter by Service Name Instead of ID

If you prefer to filter by name rather than entity ID:

fetch spans, from: now() - 2h| filter request.is_root_span == true| filter duration > 10s| fieldsAdd service_name = entityName(dt.entity.service)| filter service_name == “your-service-name”| makeTimeseries requests = count(), interval: 1m


Optional: Break Down by Service (All Services)

To see all services with slow requests in one graph:

fetch spans, from: now() - 2h| filter request.is_root_span == true| filter duration > 10s| fieldsAdd service_name = entityName(dt.entity.service)| makeTimeseries requests = count(), interval: 1m, by: { service_name }

It is also possible to do the same for top chart. I was not able initially to find “three dots” for top chart. When you hover the chart menu open in upper right corner and you can get it directly as in app

Thanks to both of you, @krzysztof_hoja  and @Kenny_Gillette , that’s the result I was looking for.

I now understand that the three dots don’t produce the same DQL query.

@Kenny_Gillette  : I see you’re using Dynatrace Assist. I’ve tried it, but I’ve never managed to get a correct solution. What question did you ask the AI?

Glad we could help you.  I copied your question exactly and put in DT assist

Thanks for the explanation.
With the correct permissions for agentic AI, I get the same response.