User ManualError tracking

Error tracking

Error tracking captures uncaught exceptions and unhandled promise rejections from your front-end, groups them by stack-trace fingerprint, and lists them in a dashboard so you can spot the loudest bugs.

⚠️

Error tracking is currently behind a feature flag. The Errors sidebar entry only appears when NEXT_PUBLIC_FEATURE_ERROR_TRACKING=true is set on the dashboard. Speak to your account owner if you do not see the page.

Enabling capture in the SDK

Errors are off by default. Turn them on in the SDK config:

new TrackCrumb({
  apiKey: process.env.TRACKCRUMB_API_KEY,
  errorTracking: true,
  release: "v2.4.1", // optional but recommended
});

Once enabled, the SDK attaches window.onerror and unhandledrejection listeners. Each captured error fires a $exception event with the type, message, stack, and (optionally) the release you configured.

Sourcemap upload

Production builds usually ship minified JavaScript, so raw stacks are unreadable. Upload sourcemaps tagged with the same release string to get de-minified stacks in the dashboard:

curl -X POST https://api.trackcrumb.com/api/v1/sourcemaps \
  -H "Authorization: Bearer $API_KEY" \
  -F "release=v2.4.1" \
  -F "file=@dist/main.js.map" \
  -F "url=https://app.example.com/static/main.js"

Wire this into your CI/CD step after the production bundle is built but before the deploy.

Browsing errors

Open Errors in the sidebar (/errors). The list view groups occurrences by fingerprint — a hash over the exception type and the top three stack frames.

ColumnWhat it shows
TypeTypeError, ReferenceError, etc.
MessageThe error message (truncated)
EventsTotal occurrences in the date range
UsersDistinct users affected
Last seenMost recent occurrence
Trend7-day sparkline of occurrence count

Filters: date range, optional release.

Click a row to expand the group. The occurrence view shows the de-minified stack (if a sourcemap matches), the user distinct_id, browser, OS, and URL of each occurrence.

Limits & gotchas

  • Sourcemap matching is by release string — case-sensitive. Mismatched releases mean raw minified stacks.
  • Fingerprint collisions can group different errors with similar stacks. Use the message + stack to disambiguate before acting.
  • Network errors (failed fetch, 5xx responses) are not captured automatically — handle them in your code and call track("$exception", …) if you want them surfaced here.
  • Web Vitals — same SDK config surface, different metric family
  • Alerts — alert on a spike in $exception count