🌿 errtriage v1.0.0 · MIT

Is this error new, recurring, or already known? A state machine for recurring errors — with event-level dedup so a scanner that re-reads the same failure never fakes recurrence.

The problem

Naive error counters break in two ways. Re-observation inflation: a scanner running every hour re-reads the same failure and increments “3 occurrences” from one real failure. Signature drift: the same failure with different hex ids, UUIDs, timestamps or long payload strings fingerprints as different errors. errtriage fixes both: pass a stable event_key per failure episode, and signatures are normalized (variable data → placeholders) before hashing.

State machine

OccurrenceStatus
1stmonitoring
2nd consecutivesurveillance
3rd+ consecutiveaction_needed (stays until resolved)
success after failuresresolved (transient)

Install (pip, v1.0+)

pip install errtriage @ git+https://mandrilly.com/git/errtriage.git

Zero dependencies — stdlib sqlite3 only.

Quick start

errtriage --db triage.db ingest --json \
  '[{"error_text":"connection refused to api","cron_job":"nightly"}]'
# repeat 2× → exit 1 with the pattern in "action_needed"

errtriage --db triage.db status
errtriage --db triage.db resolve --hash <pattern_hash>

Exit codes: 0 ok · 1 action needed · 2 error. Python API: ErrTriage(db).record(text, source_file, cron_job, event_key).