Back to all projects

TraceLite Insights

Analytics for TraceLite that finds abnormal error spikes and measures three detectors against labelled incidents.

Status
In progress. Detectors and evaluation are done, related-issue analysis has started
Tests
448 tests passing with 100% coverage (run 28 Nov 2026)
Stack
Python 3.12, DuckDB, NumPy, scikit-learn, httpx, Typer
Code on GitHub
expected + spreadspike flaggedhourly error count

Demo

Demo coming soon. A one-minute walkthrough of TraceLite Insights will go here.

Until then, the code and the README are on GitHub.

What it does

Insights pulls error data from TraceLite, or simulates it, into a DuckDB store and turns it into hourly error counts per issue. Three detectors look for spikes in those counts: a rolling z-score, a seasonal detector that compares each hour with the same hour in previous weeks, and an isolation forest. An evaluation harness scores each one against incidents the simulator labelled on purpose.

Architecture

A Python CLI built with Typer, with commands to simulate, load, sync, detect, evaluate, tune and analyse dispersion. The simulator generates realistic traffic for checkout, catalogue and auth services, with daily and weekly cycles and injected incidents, and can send it to a running TraceLite. Sync is incremental, inserts are idempotent, and the fingerprint matches TraceLite’s exactly.

The hard part

Knowing whether a detector is any good. I tuned thresholds on separate simulator seeds so the score isn’t measured on the same data used to pick it. The honest result: all three are weak on this simulation. The seasonal detector is best with an F1 of 0.29, the z-score gets 0.26 and the isolation forest about 0.11. The statistics doc explains why: the counts are over-dispersed, so the variance is much larger than a simple model assumes.

Decisions

Testing

23 test files with 361 test functions that expand to 448 cases, at 100% coverage. Ruff lint and format checks run in CI.

Next

Finding related issues that fingerprinting keeps apart. Text normalisation is done; similarity and grouping come next, then a small API and dashboard.