Event contract
Fields the query expects
| Field | Type | Why it exists |
|---|---|---|
| timestamp_utc | Timestamp | Browser error time in UTC. |
| route_template | Utf8 | Stable client-side route without identifiers. |
| release | Utf8 | Frontend build or release identifier. |
| error_fingerprint | Utf8 | Normalized error class and frame signature. |
| session_id | Utf8 | Privacy-safe session identifier. |
| environment | Utf8 | Deployment environment. |
Copy the query
SELECT
route_template,
release,
error_fingerprint,
COUNT(*) AS errors,
COUNT(DISTINCT session_id) AS affected_sessions
FROM frontend_error_events
WHERE timestamp_utc >= now() - INTERVAL '24 hours'
AND environment = 'production'
GROUP BY route_template, release, error_fingerprint
ORDER BY affected_sessions DESC, errors DESC
LIMIT 20;This read-only query is planned and executed against an empty typed table with Apache DataFusion 45.2.0. The deterministic sample output is synthetic and reviewed separately; validate field types, thresholds, and business definitions against your own data. Read the testing methodology.
Query result
Affected sessions by frontend error
The checkout rendering error has both the widest session impact and the highest repeat volume.
| route_template | release | error_fingerprint | errors | affected_sessions |
|---|---|---|---|---|
| /checkout | web-103 | payment-form-render | 184 | 121 |
| /projects/:id | web-103 | editor-state-null | 96 | 74 |
| /search | web-102 | result-card-image | 58 | 51 |
Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.
Reproduce the example
Download the public fixture
The JSON bundle includes the typed event contract, illustrative input rows, exact SQL, expected output, review notes, and engine version. The CSV contains the displayed result.
How the SQL works
- 1Route templates and normalized fingerprints prevent URLs and stack-line details from fragmenting one failure.
- 2Distinct sessions estimate blast radius separately from repeated errors in one broken browser session.
- 3Release grouping makes a regression visible without assuming the newest build caused every current error.
Edge cases to decide
- Do not send raw page contents, form values, access tokens, or complete URLs in browser error events.
- Source-map and fingerprint changes can split the same defect across releases.
- Sampling must preserve a documented rate if counts are compared over time.
Recommended dashboard
- Bars: affected_sessions by error fingerprint
- Trend: errors by release
- Table: newest errors with safe browser context
Alert guidance
Alert when a new fingerprint affects a reviewed number of production sessions after a release.
Read alert setupPut the recipe to work
Related instrumentation and guides
Continue the analysis
Compare Core Web Vitals by Route and Release
Compare LCP, INP, and CLS samples by stable route and release while keeping the percentage of passing samples visible.
Open recipeMeasure SPA Navigation Latency by Route
Compare typical and tail client-side navigation time by destination route and frontend release.
Open recipeCalculate Browser Long-Task Rate by Route
Measure main-thread blocking events and their total blocked time by route and frontend release.
Open recipeRun it on real events
Create a table, adapt the fields, and save the result
Start free, send structured events, and use the query result as a chart, shared dashboard widget, or alert input.