Documentation
Capture
Platform hooks catch most errors automatically. Use captureException when you handle them yourself.
Automatic
After init, the SDK registers global handlers — window in the browser,
process in Node, Python global handlers, or the JVM default uncaught handler. See Browser,
Node.js, Python, or Java for what each platform captures.
Same errors group into one issue by fingerprint. Repeated throws bump the event count, not the issue list.
Manual
Errors inside try/catch never reach the global handler:
import { captureException } from '@retrace-kit/sdk';
try {
await saveProfile();
} catch (error) {
captureException(error);
} Per-event overrides:
captureException(error, {
message: 'Profile save failed',
environment: 'staging',
});
On the server there is no page URL. Pass url so the issue has a route:
captureException(err, {
url: _req.url,
}); Never throws into your app. No API key or enabled: false → silent no-op.
Payload
| Field | Source |
|---|---|
message, stacktrace, name | error object |
url | page (browser) or captureException override (server) |
userAgent | navigator or Node.js/… |
release, environment | init |
user | setUser |
breadcrumbs | addBreadcrumb + network patch |
sessionId | session |
tags | setTag |
Skipped
Resource load failures (<img>, <script>) without a JS exception are
ignored — no stack to parse.