30 Sep 2025 11:52 AM
Hi All,
I'm working on a tile for Mean Time To Detect (MTTD) to detect the problem when it occurs first. I wrote a DQL query, but I think the query is not giving the correct results. Can anyone please assist me on this.
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| fieldsAdd time
| fieldsAdd detection_time = toDuration(timestamp - event.start)
//| summarize mean_detection_time = avg(detection_time)
02 Oct 2025 02:20 AM
@sarfarazx01a Depending on your definition of MTTD you can use something like below to calculate MTTD for each of the problems .
fetch events
| filter event.status_transition == "CREATED" AND event.kind == "DAVIS_PROBLEM"
| fieldsAdd `PRB_MTTD` = timestamp - event.start
08 Dec 2025 02:27 PM
Hi @p_devulapalli ,
Thank you for the query, but the query doesn't give the correct MTTD. In my environment, a problem detected at 19:30 and it gave a MTTD as 9.06 min but the problem started analysis at 19:27 so the MTTD would be 3 min, am i correct with the below scenario?
Kindly suggest
09 Dec 2025 08:02 AM
Yes — based on how Dynatrace works internally, your 3-minute interpretation is conceptually correct, but from a DQL perspective the platform only exposes the analysis window start and the problem creation time.
So in practice, the only universally reliable MTTD you can calculate in DQL is:
MTTD = problem creation time – analysis start time
Try this:
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| filter event.status_transition == "CREATED"
| fields
problem_id = event.id,
problem_created = timestamp,
analysis_start = event.start
| fieldsAdd
MTTD = problem_created - analysis_start
| summarize
avg_MTTD = avg(MTTD),
min_MTTD = min(MTTD),
max_MTTD = max(MTTD)
Featured Posts