Day 049 / DevOps / Incident Review

Incident Timeline Builder

View source ↗Scroll to explore ↓
Incident Timeline Builder project cover
/ Overview

A dependency-free Python CLI that orders sanitized incident events by UTC instant and reports exact elapsed time, event gaps and the supplied timeline span.

NameIncident Timeline Builder

ClientIndependent daily build

IndustriesInfrastructure and reliability tooling

DateDay 049 · October 18, 2026

/ Challenge

Incident notes collected from different timezones may arrive out of order. A review needs a consistent chronology and visible gaps, without treating the first-to-last event span as independently verified downtime or recovery time.

/ Provided services

Clear thinking.
Practical delivery.

01

Chronology for review

Places supplied events in a consistent UTC sequence while retaining annotations and input order for equal timestamps.

02

Explicit timing

Separates the span of supplied events, elapsed time from the first event and the gap from the previous event.

03

Bounded local reporting

Rejects malformed records and duplicate keys or IDs, omits unrecognized fields, and uses generic CLI errors without input excerpts.

Incident Timeline Builder feature visual
/ Solution

Incident Timeline Builder validates a bounded local JSON event record, normalizes explicit timezone offsets to UTC, sorts events stably and calculates exact decimal-second elapsed times and gaps. It preserves input order for tied instants and prints only recognized fields. IDs and labels are intentionally included, so records must be sanitized before use. It does not connect to infrastructure, infer missing events, establish causality, enforce incident-state transitions or alter source files.

/ Impact

Timezone-aware UTC chronology

Stable ordering for tied instants

Exact microsecond duration strings

Elapsed time and per-event gaps

Unique event IDs and strict timestamp shape

1,000-event and 1 MB input limits

Text and JSON reports

Eleven standard-library tests

/ Tech stack

Python standard library

Datetime, argparse, JSON and integer microsecond arithmetic provide a dependency-free read-only CLI.

Defensive validation

Requires explicit timezone offsets, bounded labels and valid event kinds. Labels are not automatically redacted; authorized sanitized inputs are required.

Unittest

Eleven tests cover timezone sorting, stable ties, exact fractions, invalid records, data minimization and real CLI output and errors.

Next project

Uptime SLA Calculator

View case study ↗