📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

After an incident on your .NET API, you're asked to lead the root cause analysis. Why does the incident timeline come first? How do you build it from logs, deployment history, alerts, chat and traces, what goes on it, and what problems (clock skew, missing data, hindsight bias) do you watch for?

Building an incident timeline for an RCA: why it comes first, the data sources (deploy history, alerts, Activity Log, Application Insights, chat), what each entry records, UTC and clock skew, and avoiding hindsight bias.

Intermediate Theory Intermediate incident-response incident-timeline kql postmortem production rca

🎯 Key points

  • Timeline first: facts before causes, so the analysis argues from evidence not memory
  • Sources: deploy and config history, Azure Activity Log, alert history, incident chat, status page
  • KQL on AppRequests / AzureActivity gives the per-minute impact window and every change in it
  • Each entry: UTC timestamp, source, what happened, who knew, link to evidence
  • Key markers: trigger, impact start, detection, mitigation, recovery; derive TTD, TTM, TTR (all in UTC)
  • Pitfalls: mixed time zones, clock skew, log ingestion delay (TimeGenerated vs _TimeReceived), retention
  • Record what people knew at the time, not what we know now (hindsight bias)
  • The slowest phase (detect, mitigate or recover) sets the priority of the actions

⏱ 30-second answer

The timeline comes first because every later step (root cause, contributing factors, actions) has to be argued from evidence, and memories after a stressful night are wrong in predictable ways. I build it from deployment and config history, the Azure Activity Log, alert history, KQL queries over Application Insights / Log Analytics for the per-minute failure rate, and the incident chat channel. Each entry has a UTC timestamp, the source, what happened and a link to the evidence. I mark the key moments, trigger, impact start, detection, mitigation, recovery, which give time to detect, mitigate and recover. I watch for clock skew and log ingestion delay, which can put a cause after its effect, and I record what responders knew at the time to avoid hindsight bias. The trade-off: a thorough timeline takes hours, so I build a skeleton within a day while data is still retained and refine it before the review.

🗣 Full answer (senior)

How I would answer this in an interview

"The timeline is the foundation of the RCA because it separates facts from opinions. After an incident everyone has a theory, and people remember the order of events wrongly, especially after a 2 am page. If I start the analysis with 'what was the root cause?', the loudest theory wins. If I start with 'what happened, minute by minute, and how do we know?', the cause usually shows up in the gaps: the config change ten minutes before the error rate climbed, or the alert that fired but nobody saw for forty minutes.

I pull the timeline from systems first and people second. Systems: the pipeline's deployment history, the Azure Activity Log for infrastructure and config changes, App Configuration and Key Vault change history, the alert history in Azure Monitor, and Log Analytics or Application Insights queries for when errors and latency actually changed. People: the incident channel in Teams or Slack, the pager log, and short interviews. Every entry gets a UTC timestamp, the source, what happened, and a link to the query or screenshot that proves it. Then I mark the moments that matter: the trigger, when customers were first affected, when we detected it, when we mitigated and when we were fully recovered. Those give me time to detect, time to mitigate and time to recover, which are the numbers the actions will try to improve.

The mistake I see is writing the timeline from memory a week later, in local time, with the answer already known. Logs expire, clocks disagree, and hindsight makes every decision look obviously wrong. So I capture the raw data within a day, normalise everything to UTC, and write down what people knew at each point, not what we know now. A good timeline makes the root cause boring to find."


What goes on the timeline

Marker Question it answers Typical source
Trigger What change or event started it? Deploy history, Activity Log, App Configuration history, vendor status page
Impact start When were users first affected? Application Insights failed requests, SLI burn
Detection When did we know? How (alert, customer, support)? Alert history, support tickets, pager
Response Who joined, what did they try, what did they believe? Incident chat, bridge notes
Mitigation When did impact stop growing / stop? Deploy or flag change, metrics recovering
Recovery When were we back to normal, including backlogs? SLI back within SLO, queue depth zero
All-clear When was the incident closed? Incident tool

Derived measures

Measure From Why it matters
Time to detect impact start → detection Monitoring and alert quality
Time to mitigate detection → mitigation Runbooks, rollback speed, access
Time to recover impact start → recovery What the customer felt
Duration of impact impact start → recovery Blast radius and SLA credits

Data quality traps

Trap Effect Counter
Mixed time zones (AEST/AEDT vs UTC) Events appear in the wrong order Normalise to UTC, note the original
Clock skew between hosts A cause appears after its effect Prefer server-side ingestion time for ordering, flag gaps
Log ingestion delay Alert seems to fire before errors Use TimeGenerated vs _TimeReceived in Log Analytics
Log retention or sampling Evidence gone or thin Export key queries and screenshots within 24 hours
Hindsight bias Decisions judged on information nobody had Add a "what we believed" column

Production example

In a typical case a checkout API's error rate rose from 0.2% to 11% for 47 minutes. The first draft timeline, written from memory, put the deployment after the errors started. Rebuilt from the pipeline history and Application Insights in UTC, it showed a Key Vault secret rotation 6 minutes before the first failure, and that the alert had fired 3 minutes in but routed to an unmonitored channel, so time to detect was 31 minutes, not the 3 everyone remembered.

🔍 What the interviewer is checking

Checks whether the candidate grounds an RCA in evidence and understands the data sources and pitfalls of reconstructing events.

Green flags

  • Says the timeline comes before any causal discussion and explains why
  • Names concrete sources: deploy history, Activity Log, alert history, KQL, chat
  • Mentions UTC, clock skew or ingestion delay
  • Derives time to detect, mitigate and recover from the timeline
  • Records what responders believed at the time

Red flags

  • Writes the timeline from memory or only from the chat channel
  • Jumps straight to "the root cause was"
  • Treats the timeline as a formality after the fix

📚 Learn in depth

1. Why facts must come before causes

Root cause analysis is reasoning backwards from an outcome. Without an agreed sequence of events, people pattern-match on their favourite theory. A timeline forces the team to agree on what happened before discussing why, and makes gaps visible: a period nobody can account for is where the analysis needs to dig.

facts (timeline)  ->  causal analysis  ->  contributing factors  ->  actions
     ^ evidence links         ^ argued from the timeline, not memory

2. The anatomy of an entry

| UTC time            | Source            | Event                                  | Evidence      |
|---------------------|-------------------|----------------------------------------|---------------|
| 2026-03-04 22:51:10 | Azure DevOps      | Release 412 to prod (config change)    | link          |
| 2026-03-04 22:57:40 | App Insights      | First 500s on POST /orders             | KQL link      |
| 2026-03-04 23:00:40 | Azure Monitor     | Alert 'orders 5xx > 2%' fired          | alert id      |
| 2026-03-04 23:28:00 | Teams #inc-1432   | On-call acknowledges; believes DB slow | message link  |
| 2026-03-04 23:41:00 | Azure DevOps      | Rollback to release 411                | link          |
| 2026-03-04 23:44:30 | App Insights      | Error rate back under 0.5%             | KQL link      |

The "believes DB slow" note is deliberate: it records the responder's mental model, which explains why the next 13 minutes went where they did.

3. Getting the numbers from telemetry

The impact window should come from data, not from when someone noticed. In Log Analytics (workspace-based Application Insights) the AppRequests table gives a per-minute failure rate:

AppRequests
| where TimeGenerated between (datetime(2026-03-04 22:30) .. datetime(2026-03-05 00:30))
| where Name == "POST /orders"
| summarize total = count(), failed = countif(Success == false) by bin(TimeGenerated, 1m)
| extend failRate = round(100.0 * failed / total, 2)
| order by TimeGenerated asc

Changes come from the Azure Activity Log and the pipeline:

AzureActivity
| where TimeGenerated between (datetime(2026-03-04 20:00) .. datetime(2026-03-05 00:30))
| where OperationNameValue has_any ("write", "delete", "action")
| project TimeGenerated, Caller, OperationNameValue, ResourceGroup, _ResourceId
| order by TimeGenerated asc

4. Clocks, ingestion and ordering

Each host stamps logs with its own clock; NTP keeps them close but not identical, and client-side telemetry can be minutes off. Log Analytics also has ingestion delay (usually under a few minutes, longer under load). For ordering close events, prefer one consistent clock (for example server-side request telemetry) and treat sub-minute ordering across systems with suspicion.

5. Hindsight bias and the "second story"

Once the cause is known, earlier signals look obvious. The "first story" says the engineer should have seen the alert. The "second story" asks why did the alert land where nobody looked, and why did the dashboard point at the database? Recording what people believed at each step is how you get to the second story, which is where durable fixes live.

6. Speed versus completeness

Retention, sampling and chat history mean evidence decays. A practical rhythm: a skeleton timeline within 24 hours (changes, impact window, detection, mitigation), enriched with interviews over the next few days, and frozen before the review meeting.

Try it yourself

  1. Write the KQL above against your own Application Insights resource for a past spike and find the exact impact start and end.
  2. Query AzureActivity for the same window and list every change, then check whether any of them lines up.
  3. Compare TimeGenerated with _TimeReceived for a busy table and measure your ingestion delay.
  4. Take a past incident write-up and add a "what we believed at the time" column; note where it changes your view of a decision.
  5. Calculate time to detect, mitigate and recover for your last three incidents and see which one dominates.

💻 Code

A small helper that merges events from several sources into one UTC-ordered timeline and derives the key measures; the point is that ordering and the measures come from data, not memory.

namespace Incidents.Timeline;

public enum Marker { None, Trigger, ImpactStart, Detected, Mitigated, Recovered }

public sealed record TimelineEvent(
    DateTimeOffset At,      // stored with offset so AEST/AEDT inputs normalise safely
    string Source,          // "Azure DevOps", "App Insights", "Teams"
    string What,
    Marker Marker = Marker.None,
    string? Believed = null, // what responders thought at the time (hindsight guard)
    Uri? Evidence = null);

public sealed record IncidentMeasures(TimeSpan? TimeToDetect, TimeSpan? TimeToMitigate, TimeSpan? TimeToRecover);

public static class TimelineBuilder
{
    public static IReadOnlyList<TimelineEvent> Merge(params IEnumerable<TimelineEvent>[] sources) =>
        sources.SelectMany(s => s)
               .Select(e => e with { At = e.At.ToUniversalTime() }) // one clock for ordering
               .OrderBy(e => e.At)
               .ToList();

    public static IncidentMeasures Measure(IReadOnlyList<TimelineEvent> timeline)
    {
        DateTimeOffset? First(Marker m) => timeline.FirstOrDefault(e => e.Marker == m)?.At;

        var impact = First(Marker.ImpactStart);
        var detected = First(Marker.Detected);
        var mitigated = First(Marker.Mitigated);
        var recovered = First(Marker.Recovered);

        return new IncidentMeasures(
            TimeToDetect: detected - impact,
            TimeToMitigate: mitigated - detected,
            TimeToRecover: recovered - impact);
    }
}
// Usage: events exported from the pipeline, App Insights and the incident channel
var aest = TimeSpan.FromHours(11); // AEDT, as typed into chat by responders
var timeline = TimelineBuilder.Merge(
    [new(new DateTimeOffset(2026, 3, 4, 22, 51, 10, TimeSpan.Zero), "Azure DevOps", "Release 412", Marker.Trigger)],
    [new(new DateTimeOffset(2026, 3, 4, 22, 57, 40, TimeSpan.Zero), "App Insights", "First 500s", Marker.ImpactStart),
     new(new DateTimeOffset(2026, 3, 4, 23, 44, 30, TimeSpan.Zero), "App Insights", "Errors < 0.5%", Marker.Recovered)],
    [new(new DateTimeOffset(2026, 3, 5, 10, 28, 0, aest), "Teams", "On-call acks", Marker.Detected, Believed: "DB is slow"),
     new(new DateTimeOffset(2026, 3, 5, 10, 41, 0, aest), "Azure DevOps", "Rollback to 411", Marker.Mitigated)]);

var m = TimelineBuilder.Measure(timeline);
Console.WriteLine($"TTD {m.TimeToDetect}, TTM {m.TimeToMitigate}, TTR {m.TimeToRecover}");

⚠ Common mistakes

  • Mistake: Writing the timeline from memory a week later. Why it is wrong: Logs age out, sampling hides detail and memory reorders events. Instead: Capture changes, the impact window and chat links within 24 hours.
  • Mistake: Mixing local time and UTC. Why it is wrong: AEST/AEDT entries from chat interleave wrongly with UTC telemetry, so a deployment can appear an hour after the errors it caused; the review then clears the real trigger and chases a wrong one, and TTD/TTR come out wrong. Instead: Normalise every entry to UTC, keep the original time in a note, and compute all measures in UTC.
  • Mistake: Ordering events seconds apart across different systems. Why it is wrong: Clock skew and ingestion delay make sub-minute ordering unreliable. Instead: Order with one consistent clock where possible and flag close calls as uncertain.
  • Mistake: Starting with the root cause and filling in the timeline to fit. Why it is wrong: It is confirmation bias with a table. Instead: Agree the facts first, then reason about causes.
  • Mistake: Only recording technical events. Why it is wrong: The detection and response delays are usually human and process problems. Instead: Include alerts, pages, acknowledgements, decisions and what people believed.
  • Mistake: Using "when someone noticed" as impact start. Why it is wrong: It hides the detection gap, often the biggest improvement. Instead: Take impact start from SLI or request telemetry.
  • Mistake: Ignoring changes outside your pipeline. Why it is wrong: Secret rotations, certificate renewals, platform maintenance and vendor changes are frequent triggers. Instead: Check the Activity Log, App Configuration and Key Vault history and vendor status pages.
  • Mistake: No links to evidence. Why it is wrong: The review turns into arguments about whose memory is right. Instead: Every entry links to a query, screenshot or message.

🏛 Senior insight: trade-offs

A senior treats the timeline as the main product of the first day after an incident, not as paperwork. The derived numbers drive priorities: if time to detect was 31 minutes and time to mitigate was 4, the next quarter's work is alerting and routing, not faster rollbacks. If detection was fast but mitigation slow, the actions are runbooks, access and rollback automation. Tracking TTD, TTM and TTR across incidents shows whether those improvements actually worked. The "what we believed" column is what turns a blame story into a systems story.

I also keep the timeline proportional. A Sev 3 gets a ten-line timeline; a Sev 1 with customer impact and a possible Notifiable Data Breaches assessment gets a full one, because the regulator and customers may ask for exact times.

Approach When it fits Cost When not to
Skeleton timeline in 24h, refined later Most Sev 1/2 incidents A few hours Trivial Sev 4s
Full timeline with interviews Customer-facing or data incidents A day or more Low-impact internal incidents
Automated timeline from the incident tool High incident volume Tool setup, chat discipline When the tool misses out-of-band changes
Slowest phase Where the actions go
Detect SLI-based alerts, routing, synthetic checks
Mitigate Runbooks, rollback automation, feature flags, access
Recover Backlog draining, reconciliation tooling, capacity

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions using the timeline in a postmortem meeting Why: Checks they can run the review itself blamelessly, not just gather the facts.
    How to answer

    A blameless postmortem starts from the assumption that everyone acted reasonably with what they knew at the time, so the question is "how did our system make this easy to get wrong?", not "who broke it?". That's what makes people tell the truth, and without the truth you fix the wrong thing.

    I build the timeline from evidence — alerts, deployment history, Azure Activity Log, KQL queries, the incident channel — then look for contributing factors across the trigger, detection, response and recovery, not a single root cause. The output is a short list of specific, owned, dated corrective actions that change the system (a test, a guard rail, an alert), tracked in the backlog and reviewed until done. The trade-off: thoroughness versus speed — a good-enough review within a week beats a perfect one in a month.

  2. When: Candidate mentions detection, mitigation and recovery markers Why: Checks they know the full incident lifecycle the timeline reflects.
    How to answer

    An incident moves through detect → triage → mitigate → resolve → review. Detection should come from alerts on customer-facing symptoms (error rate, latency, SLO burn), not from customers ringing support. Triage decides how bad it is (severity), who leads it (the incident commander) and who else is needed. Mitigation stops the customer pain as fast as possible — roll back, turn a feature flag off, fail over — guided by a working hypothesis about what changed, without waiting for a proven root cause. Resolution is when the SLIs are back inside their SLOs and stay there. Review is the blameless postmortem that produces owned, dated fixes. Communication to stakeholders runs through every stage.

    The timestamps between the stages give you time to detect, time to mitigate and time to resolve. The main trade-off is speed versus understanding: you restore service first and investigate second.

  3. When: Candidate mentions severity deciding how detailed the timeline is Why: Checks they can judge severity and triage consistently.
    How to answer

    Severity describes customer and business impact, not the technical cause: how many users, which function (checkout versus a report), whether data or security is at risk, and whether it is getting worse. Teams write down 3–5 levels with examples — a Sev 1 is 'checkout down for everyone' or 'personal data exposed', a Sev 3 is 'one admin report is slow'. Severity then decides who is paged, which roles are filled and how often you communicate.

    For anything Sev 2 or above, one person becomes the incident commander (IC): they own decisions, roles and communication, and deliberately don't debug. An ops lead investigates, a comms lead updates stakeholders, a scribe keeps the timeline. Rule of thumb: declare high and downgrade — the cost of over-staffing for 20 minutes is small compared with an under-staffed outage.

🛠 Real-world problems: how you handle them

Timeline exposes a 31-minute detection gap hidden by memory
Situation
A checkout API for [an Australian retailer] on Azure App Service had 47 minutes of elevated 500 errors on a weeknight. Around [N] orders failed. The team believed a database slowdown caused it and that the alert had been handled within minutes.
Signals
Error rate on POST /orders rose from 0.2% to 11%; an Azure Monitor alert fired; support tickets arrived next morning; the first draft write-up said 'detected immediately'.
Investigation
Exported the pipeline release history and the `AzureActivity` and Key Vault audit logs for the window; ran a per-minute failure-rate KQL query on `AppRequests`; pulled alert history and the pager acknowledgement log; collected the incident channel messages; normalised everything to UTC and added a 'believed' column from short interviews.
Resolution
The timeline showed a Key Vault secret rotation 6 minutes before impact (trigger), an alert that fired at minute 3 but routed to an unmonitored channel, and acknowledgement at minute 31. The actual fix (updating the secret reference) had already been done by rollback; the timeline redirected the actions to alert routing and rotation process.
Prevention
Alert action groups reviewed and tested monthly; secret rotations logged as change events on the deployment dashboard; a timeline template with UTC and evidence columns added to the incident process; skeleton timeline due within 24 hours.

How to tell it (STAR)

**S:** At [company], our checkout API had a 47-minute spike of failed orders one night, and the story in the team was that the database was slow and we'd caught it straight away. **T:** I was asked to lead the RCA, and I wanted it based on evidence rather than the overnight story. **A:** Before any discussion of causes I built a UTC timeline from the pipeline history, the Azure Activity Log, Key Vault audit events, a KQL failure-rate query and the incident chat, with a column for what people believed at each point. **R:** It showed a secret rotation six minutes before impact and an alert that had fired but gone to a dead channel, so detection took 31 minutes, not 3. We fixed alert routing and rotation tracking, and our next comparable incident was detected in [4] minutes.

↩ Usually asked after

More in RCA

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me