Three tools, three questions
The difference between an error you fix in five minutes and one you stare at for an hour is the context around it. Crossdeck gives you three tools, each answering a different question:
- Tags — short key/value labels you filter and group by. "Show me every error in the
checkoutflow onplan: pro." - Context — named blocks of structured state captured at crash time. The cart contents, the feature flags, the request that was in flight.
- Breadcrumbs — the trail of steps the user took just before it broke. The last 50 ride along on the next error automatically.
Set the scope; the next error inherits it
You set these before an error happens; whatever's in scope at capture time travels with it:
// a label to filter and group by
Crossdeck.setTag("flow", "checkout");
// a named block of state, captured if an error fires
Crossdeck.setContext("cart", { items: 3, total: 49.0, currency: "USD" });
// a step on the trail — the last 50 ride along on the next error
Crossdeck.addBreadcrumb({ category: "ui", message: "clicked Pay" });
And when you need to keep something out of the payload — a token in a URL, an email in a message — register a beforeSend hook that scrubs or rewrites each error on its way out:
Crossdeck.setErrorBeforeSend((error) => {
// mutate to scrub, or return null to drop the event entirely
delete error.context?.cart;
return error;
});
Ambient scope, snapshotted at capture
Tags, context, and breadcrumbs are ambient — you set them as your app runs, and they sit in scope. When an error fires (caught or uncaught), Crossdeck snapshots whatever's there and attaches it. Breadcrumbs are a rolling buffer of the most recent 50, so the trail is always "the last 50 things that happened," without you managing the list.
The beforeSend hook is your last gate before anything leaves the device: it receives the fully-assembled error, and you can mutate it to scrub a field or return null to drop the event entirely. Combined with last lesson's identity attribution, this is what makes a Crossdeck error reproducible — you know who hit it, what they'd done, and the exact state they were in — while keeping anything sensitive off the wire.
An error you can actually reproduce
Open any issue and the right-hand detail now reads like a report: the tags you can pivot on, the context block with the state at crash time, and the breadcrumb trail of the user's last moves — everything you need to reproduce it without a single "can you tell me the steps?" email.
Tagged flow: checkout, cart state attached, and the breadcrumb trail ending in "clicked Pay" — reproducible at a glance.