Tracewise learns how your system's sessions normally unfold, then turns millions of log lines into a short, ranked queue of incidents, each one explained in terms of the events that broke the pattern.
How it works
Four stages, each one testable on its own.
Mine templates
parser.pyA hand-written Drain parser masks IPs, block ids and numbers, then routes each message through a fixed-depth tree to a template. 11.2M lines become 43 event types.
Learn normal order
model.py · DeepLog + ENDAn LSTM trained only on healthy sessions predicts the next event, including an explicit END token, so a session that stops early is as surprising as one that does something odd.
Fuse with conformal p-values
Fusion · −ln(min p)Sequence surprise and PCA count residuals live on different scales. Both are turned into p-values against held-out normal sessions, and the rarer one wins.
Triage incidents
brief.py · groundedAnomalous sessions that break the same way are grouped into one incident. A local LLM drafts a brief, and the brief is rejected if it cites a template it was never shown.
Evaluation
Ranks incidents almost as well as a model that cheats with labels.
Chronological split of Loghub HDFS_v1: train on the first half of sessions, tune on the next 10%, report on the last 230,025. AUC-PR measures how well the incident queue is ordered. F1 uses a threshold frozen on validation, and there the plain PCA baseline still edges ahead. We report that as measured.
Source data: Loghub HDFS_v1 (Zhu et al., ISSRE 2023), used under CC BY 4.0.
Triage
Every alert shows what it expected instead.
- Sessions that break the same way collapse into one incident with a stable fingerprint.
- The flagged step shows the model's top expectations and their probabilities.
- LLM briefs come from a local model and are rejected unless every cited template was in its context.
- Mark incidents true or false positive. Your measured precision is computed from those verdicts.