Experience Platform
Error Monitoring

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 errors
  • window.onunhandledrejection — unhandled Promise rejections
  • React ErrorBoundary — React render errors (React SDK only)
  • fetch/XMLHttpRequest wrappers — 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:

CategoryWhat's Captured
navigationPage navigations (URL changes)
clickUser clicks (element tag + text)
consoleconsole.warn and console.error calls
fetchHTTP requests (method, URL, status code, duration)
xhrXMLHttpRequest calls (same as fetch)
uiReact 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 timeout

Error Grouping (Fingerprinting)

Individual error occurrences are grouped by fingerprint to avoid drowning in duplicates. The fingerprint is computed from:

  1. Error message (with variable parts normalized — numbers, IDs, URLs replaced with placeholders)
  2. Top 3 stack frames (file + function name, without line numbers)
  3. 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: newinvestigatingresolvedignored
  • 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 attached

Crash 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

MethodPathAuthDescription
POST/api/v1/errors/ingestAPI KeyIngest protobuf ErrorBatch
POST/api/v1/errors/ingest/jsonAPI KeyIngest JSON errors (debug)
GET/api/v1/errorsBearerList error groups
GET/api/v1/errors/:idBearerError group detail
PUT/api/v1/errors/:idBearerUpdate status
POST/api/v1/errors/:id/commentBearerAdd team comment
GET/api/v1/errors/statsBearerError rate stats

See the full API Reference and Data Models for schemas.


© 2026 Shell Technology. All rights reserved.