Telemetry
Frontend reliability SQL recipe

Rank JavaScript Errors by Route and Release

Find frontend releases and routes with the most repeated JavaScript failures and affected sessions.

Beginnerfrontend_error_eventsReviewed 2026-07-28Tested with Apache DataFusion 45.2.0

Reviewed by the Telemetry product team on . SQL compatibility, event contract, synthetic output, and operational caveats. Editorial ownership

Question answered

Which route and frontend release produces the broadest JavaScript error impact?

A browser error becomes actionable when it retains a stable fingerprint, route template, release, and privacy-safe session identifier. This query ranks repeated failures without grouping on raw stack traces.

Event contract

Fields the query expects

FieldTypeWhy it exists
timestamp_utcTimestampBrowser error time in UTC.
route_templateUtf8Stable client-side route without identifiers.
releaseUtf8Frontend build or release identifier.
error_fingerprintUtf8Normalized error class and frame signature.
session_idUtf8Privacy-safe session identifier.
environmentUtf8Deployment environment.
DataFusion SQL

Copy the query

sql
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_templatereleaseerror_fingerprinterrorsaffected_sessions
/checkoutweb-103payment-form-render184121
/projects/:idweb-103editor-state-null9674
/searchweb-102result-card-image5851

Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.

Affected sessions by frontend error: static chart of synthetic affected_sessions values from the Rank JavaScript Errors by Route and Release example result
Indexable SVG of the deterministic example output. Download it for an article, runbook, or design review with attribution.

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

  1. 1Route templates and normalized fingerprints prevent URLs and stack-line details from fragmenting one failure.
  2. 2Distinct sessions estimate blast radius separately from repeated errors in one broken browser session.
  3. 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 setup

Put the recipe to work

Related instrumentation and guides

Continue the analysis

Run 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.

Get an API key