Skip to content
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 . We checked the SQL syntax, required event fields, sample results, and limits on using the query. Who reviews this page

Question answered

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

Record a stable error fingerprint, route template, release, and privacy-safe session identifier. This query uses those fields to rank repeated browser failures without grouping on raw stack traces.

Event schema

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. We review the synthetic sample output separately. Check field types, thresholds, and counting rules 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
Download this SVG chart of the sample results for an article, runbook, or design review. Please credit Telemetry.

Reproduce the example

Download the sample data

The JSON bundle includes the event schema with field types, 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 check

  • 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

Set up the events this query needs

Related instrumentation and guides

Continue the analysis

Run it on your 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