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
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):
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
Replace SERVICE-XXXXXXXXXXXXXXXX with your actual service entity ID.
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 |
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
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 }
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?
Thanks for the explanation.
With the correct permissions for agentic AI, I get the same response.