Investigating with error groups
Load this file when the investigation concerns error groups, exception patterns, or crash analysis.
When to reach for error groups
- The user reports a crash, exception, or regression
- You need to understand scope of impact (users affected, frequency, timeline)
- You're hunting for a recent regression and need to find the first-seen timestamp
- You have an error group ID and want to pull its stack trace and associated sessions
Error groups collapse many individual errors into a single entity by stack-trace similarity. That's your unit of investigation.
Tool guidance (query-error-groups)
The query-error-groups tool returns error groups with frequency, stack traces, and attributes.
start_dateis required; ISO format.end_datedefaults to now.queryfilters by attributes — e.g.error_type='RuntimeError' AND environment=production.countdefaults to 10, max 50.pagefor pagination.
Important query note. Do NOT use the event attribute — it's not valid. Use exception.message to filter on error message content:
query="exception.message=\"Cannot use 'in' operator*\" and service_name=gonfalon-web"Typical patterns
- New error detection — compare two time windows via
query-aggregationswithproduct_type="errors"andgroup_by="error_type"; investigate error types with higher counts in the recent window. - Regression hunt — query error groups in the last N hours, note
first_seentimestamps, cross-reference with deploy/flag-flip timeline. - Blast-radius estimate — for a specific error group, count distinct session IDs via
query-sessionswithquery="error_group_id=<id>". - Stack-trace analysis — read the trace as a narrative. The originating frame is the lowest-level application code frame (not framework code).
Interpreting results
- Scope first, cause second. One user hitting a RuntimeError in a rare code path is different from a regression affecting 30% of traffic.
- Look for a change that correlates with onset — a deploy, a flag flip, a dependency upgrade, a traffic spike, a time-of-day pattern.
- Cite the error group ID, affected count, and first-seen timestamp in your summary.
- If the stack points into a third-party dependency, say so — the fix may not be in our code.
Common mistakes
- Using
eventin the query. Useexception.message. - Reporting "many errors" without specifying which error group or how many. Always quantify.
- Ignoring the distinction between error onset (new regression) and persistent errors (ongoing bug). They call for different remediation.