The incident is closed, on-call is tired, and the review meeting turns into a hunt for the culprit. A blameless postmortem changes the question: no longer « who made the mistake? », but « what in the system made the mistake possible and its detection slow? ». This tutorial provides a document template and the DQL queries to fill it with facts taken from Dynatrace.
Goal: by the end you will have a postmortem template ready to copy, a timeline rebuilt from Davis problems, metrics, logs and spans, and a measure of the impact on the error budget. The DQL queries apply to Dynatrace SaaS (Grail, Notebooks). On Dynatrace Managed, the template still applies; gathering the facts goes through the problems UI, the data explorer and the API v2, as shown below.
To review how Davis groups events into problems, see the Davis and problems module of the SaaS course.
The problem: postmortems built on memories
Without data, the timeline is rebuilt from memory, in a chat thread. Times are approximate, detection looks faster than it was, and the discussion drifts towards people. A postmortem based on replayable queries is verifiable, comparable from one incident to the next, and points actions at the system. The « Postmortem Culture » chapter of Google’s SRE book sets out the principles; this tutorial gives you the tooling.
Prerequisites
- A Dynatrace SaaS environment with access to Notebooks and read access to problems, logs, spans and metrics in Grail.
- The ID of the Davis problem linked to the incident (format
P-XXXXXX). - An existing SLO on the affected service, ideally with SLO burn rate alerts.
- A shared space for the document (wiki, Git repository, shared Notebook).
The blameless postmortem template
Copy this skeleton at the start of every review. Each section refers to a query in the tutorial.
# Postmortem — <short title, no person's name> Status: draft | reviewed | closed Davis problem: P-XXXXXX Severity: ... ## Summary (3 lines) ## Impact - Users affected, duration, error budget consumed (query 3) ## Timeline (UTC) - Degradation start / detection / alert / mitigation / resolution (queries 1 and 2) ## Contributing factors - Technical, organisational, detection — never "human error" alone ## What went well ## Actions | Action | Type (prevent/detect/mitigate) | Owner | Due date | The writing rule: describe actions and decisions with the context available at that moment. « The deployment was started because the pre-production check was green » rather than « Paul deployed without checking ».
Step 1: rebuild the problem timeline
Davis problems can be queried in Grail. This query returns the timestamps and the entities involved:
fetch dt.davis.problems | filter display_id == "P-XXXXXX" | fields event.start, event.end, event.status, event.name, root_cause_entity_id, affected_entity_ids | sort event.start asc Several rows may appear for the same problem, because its state is updated over time: keep the most recent one for event.end. Field names can change; if one is missing, remove the fields line to see the full record.
Step 2: find the real start of the degradation
The problem opens when Davis detects an anomaly, often after the real start. Go back in time with service metrics:
timeseries { total = sum(dt.service.request.count), failures = sum(dt.service.request.failure_count) }, from: "2026-09-30T13:00:00Z", to: "2026-09-30T17:00:00Z", interval: 1m, filter: { in(dt.entity.service, "SERVICE-0123456789ABCDEF") } | fieldsAdd taux_erreur = 100 * failures[] / total[] The first interval where taux_erreur (the error rate) departs from its baseline gives the « degradation start ». The gap between that moment and the problem opening is your detection delay, one of the main levers on MTTR. Add the error logs from the same window:
fetch logs, from: "2026-09-30T13:00:00Z", to: "2026-09-30T17:00:00Z" | filter loglevel == "ERROR" | filter dt.entity.service == "SERVICE-0123456789ABCDEF" | summarize erreurs = count(), by: { bin(timestamp, 1m), content } | sort erreurs desc | limit 20 To group similar messages rather than identical content, see log pattern analysis.
Step 3: quantify the impact on the error budget
Count the failed requests during the incident and compare them with the budget for the SLO window:
timeseries { total = sum(dt.service.request.count), failures = sum(dt.service.request.failure_count) }, from: "2026-09-30T13:42:00Z", to: "2026-09-30T15:10:00Z", filter: { in(dt.entity.service, "SERVICE-0123456789ABCDEF") } | fieldsAdd t = arraySum(total), f = arraySum(failures) | fields t, f Worked example: a 99.9% SLO over 30 days, 50 million requests over the window, hence a budget of 50,000 failures. If f is 12,000, the incident consumed 24% of the budget. This number, more telling than a duration, feeds the decision whether to freeze releases: see error budget and release gate.
Step 4: find representative traces
One or two failed traces make the postmortem concrete for developers:
fetch spans, from: "2026-09-30T13:42:00Z", to: "2026-09-30T15:10:00Z" | filter dt.entity.service == "SERVICE-0123456789ABCDEF" | filter request.is_failed == true | fields start_time, trace.id, span.name, duration | sort duration desc | limit 5 Paste the trace.id values into the document: anyone can open the distributed trace and check the reasoning.
What about Dynatrace Managed?
Without Grail, fetch the problem timeline with the API v2:
curl -s "https://YOUR-CLUSTER/e/ENV-ID/api/v2/problems?problemSelector=displayId(\"P-XXXXXX\")" \ -H "Authorization: Api-Token $DT_TOKEN" \ | jq '.problems[] | {displayId, title, startTime, endTime, rootCauseEntity}' The token needs the problems read scope (problems.read). Error curves come from the data explorer, logs from the log viewer. The document template does not change.
How to check that it works
- Every timestamp in the timeline is linked to a replayable query, not to a memory.
- Two people re-running the queries get the same impact figures.
- The document contains no person’s name in the « Contributing factors » and « Actions » sections, only roles and systems.
- Every action has an owner and a due date, and a follow-up is scheduled at the next review.
Best practices
- Save the queries in a Notebook dedicated to the incident and link it from the document.
- Classify actions as prevent, detect, mitigate: a postmortem without a detection action is often incomplete.
- Write quickly: a draft within 48 hours, while data and context are fresh.
- Share widely: a postmortem read by other teams prevents the same outage elsewhere.
- Track the trend: follow the detection delay from one incident to the next; it shows whether your actions work.
Frequently asked questions
Does a blameless postmortem mean nobody is accountable?
No. Actions have owners and due dates. What disappears is punishing a person for a reasonable decision made with the information they had.
Does every Davis problem need a postmortem?
No. Keep it for incidents that consume a significant share of the error budget or affect customers. Set the threshold in advance, for example 10% of the budget.
Can data collection be automated?
Partly, yes: a Workflow triggered when a problem closes can run the queries and pre-fill a draft. Check the triggers and actions available in your SaaS environment’s documentation.
Conclusion
A blameless postmortem rests on two pillars: a tone focused on the system and verifiable facts. The DQL queries in this tutorial turn the timeline, the impact and the traces into replayable data, and the error budget gives a shared measure to set priorities.
span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of its owner. SaaS features evolve quickly: check their availability in your environment and in the official documentation.
Originally published on span.observer. French version: https://span.observer/fr/postmortem-sans-blame-dynatrace-dql/.
