Error Monitoring
A full Sentry replacement built into the Experience Platform. Errors are captured automatically and sent via protobuf. When a page crashes, users can optionally submit a comment for debug context.
Error Capture (Automatic)
The SDK hooks into:
window.onerror— runtime JS errorswindow.onunhandledrejection— unhandled Promise rejectionsReact ErrorBoundary— React render errors (React SDK only)fetch/XMLHttpRequestwrappers — network errors (4xx, 5xx, timeouts)
Each error captures:
- Error message + stack trace
- Source file, line, column
- Page URL + page context
- Browser context (user agent, browser, OS, screen size, device type)
- Breadcrumbs (last 50 actions leading up to the error)
- Session events (from tracking, for full context)
- Severity:
INFO,WARNING,ERROR,FATAL
Breadcrumbs
Breadcrumbs are a chronological trail of what happened before an error. The SDK maintains a ring buffer of the last 50 breadcrumbs:
| Category | What's Captured |
|---|---|
navigation | Page navigations (URL changes) |
click | User clicks (element tag + text) |
console | console.warn and console.error calls |
fetch | HTTP requests (method, URL, status code, duration) |
xhr | XMLHttpRequest calls (same as fetch) |
ui | React component lifecycle errors |
Example Breadcrumb Trail
10:42:01 [navigation] → /checkout
10:42:02 [click] → button "Add to cart"
10:42:02 [fetch] → POST /api/cart/add → 200 (142ms)
10:42:03 [click] → button "Proceed to payment"
10:42:03 [fetch] → POST /api/payment/init → 500 (2301ms)
10:42:03 [console] → Error: Payment service unavailable
10:42:03 [ERROR] → Unhandled: PaymentError: Gateway timeoutError Grouping (Fingerprinting)
Individual error occurrences are grouped by fingerprint to avoid drowning in duplicates. The fingerprint is computed from:
- Error message (with variable parts normalized — numbers, IDs, URLs replaced with placeholders)
- Top 3 stack frames (file + function name, without line numbers)
- Error type (runtime, render, network)
Example: 500 users hit the same bug → 1 error group with "500 occurrences", not 500 separate errors.
Each error group tracks:
- First seen / last seen timestamps
- Total occurrence count
- Affected profile count
- Status:
new→investigating→resolved→ignored - Team comments thread
User Crash Comment Flow
When a fatal error or React render failure occurs:
1. Error caught by ErrorBoundary / window.onerror
│
2. Error sent to Experience (without comment)
│
3. Crash UI displayed to user:
┌─────────────────────────────────────┐
│ 😔 Something went wrong │
│ │
│ Help us fix this? │
│ Tell us what you were doing: │
│ ┌─────────────────────────────┐ │
│ │ I was trying to upload a │ │
│ │ photo and clicked save... │ │
│ └─────────────────────────────┘ │
│ │
│ [Send Report] [Dismiss] │
└─────────────────────────────────────┘
│
4. If user submits comment:
- PATCH error with user_comment
- Comment visible in dashboard alongside stack trace
│
5. If user dismisses:
- Error already sent (step 2)
- No comment attachedCrash UI Details
- Rendered by the SDK, not the app (works even when React is broken)
- Falls back to native browser
prompt()if the React crash UI itself fails - Styled with inline styles (no dependency on CSS that might be broken)
- Non-intrusive: small panel, not a full-page takeover
- Customisable: builders can provide their own fallback component
Manual Error Capture
// JS SDK
exp.captureError(new Error('Payment failed'), {
tags: { module: 'checkout' },
extra: { orderId: '12345' }
});
exp.captureMessage('Unusual cart value detected', 'warning');// React SDK
<ErrorBoundary
fallback={<CrashPage />}
showCommentForm={true}
onError={(error) => console.log(error)}
>
<App />
</ErrorBoundary>See the JS SDK and React SDK for full usage.
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /api/v1/errors/ingest | API Key | Ingest protobuf ErrorBatch |
POST | /api/v1/errors/ingest/json | API Key | Ingest JSON errors (debug) |
GET | /api/v1/errors | Bearer | List error groups |
GET | /api/v1/errors/:id | Bearer | Error group detail |
PUT | /api/v1/errors/:id | Bearer | Update status |
POST | /api/v1/errors/:id/comment | Bearer | Add team comment |
GET | /api/v1/errors/stats | Bearer | Error rate stats |
See the full API Reference and Data Models for schemas.