Log patterns
How Rocketgraph groups log lines into patterns and notices the ones it has never seen before.
Log patterns
A log pattern is a log line with the parts that change masked out: numbers, UUIDs, hex IDs and IP addresses. So these two lines are one pattern:
timeout after 30.2s for user 8813
timeout after 9.1s for user 22
A pattern that appears for the first time usually means new code or a new way of failing.
New patterns during detection
When a service trips the error-rate or latency check (see Anomaly detection), Rocketgraph reads that service's error logs for the current window and for the same window an hour earlier. It collapses the lines into patterns and compares them with every pattern it has seen for that service before.
A pattern counts as new when it has never been seen for that service and appears at least 3 times in the window.
New patterns add to a cycle's score but can't get anything flagged on their own. One new pattern counts for a little, three or more count for the most. A deploy that adds new log lines and breaks nothing stays quiet.
The Patterns page
Patterns in the sidebar lists log patterns seen for the first time in the last 6, 24 or 72 hours. Each one shows:
- the service it came from
- when it was first seen
- the pattern, and an example line
This page reads stored results, so it shows the same answer each time you load it.
Log patterns on the Overview page
When your backend supports it, the top of Overview shows the last ten minutes of logs grouped into patterns, with two lists beside it:
- New: patterns in the last ten minutes that did not appear at all in the hour before. An error line only needs to appear once. A sampled info or warning line needs at least 3 lines read.
- Stopped: patterns missing from the last ten minutes, where the hour before says at least 5 should have appeared. A line that only shows up once an hour is not counted as stopped.
Every error line is read. Info and warning lines are sampled evenly up to 100,000 lines per window, and the counts are then estimates. The page says so when that happens.
In incidents
Each incident carries the log patterns for its affected services, new ones first and then the busiest error patterns. They appear on the incident page, in the Slack message and in the ticket. See Incidents.
Known limits
- New patterns during detection are only collected for services that already tripped a metric check, and for at most 5 services per cycle. Reading logs for every service every five minutes would not scale.
- The Patterns page is empty until something has tripped. On a healthy system that is expected.
- The Overview log pattern section works with Datadog today. With other backends it says log patterns aren't available yet.
- Patterns need log data in your backend. A backend without logs gives you the metric signals only.
- Rocketgraph remembers up to 5,000 patterns per service.