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
- DuckDB as an embedded analytics store: no server needed.
- Report weak results as they are, with plots, instead of tuning until the numbers look nice.
- A robust spread estimate (median absolute deviation) for the seasonal detector, so one past spike doesn’t hide the next.
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.