Crossdeck University
Watch — turn "it crashed" into "here's exactly what happened" Film in production
0:00 / 0:00
Lesson 2 of 5 · Errors

Breadcrumbs, tags & context

A stack trace tells you where it broke. These three tools tell you why — what state the app was in, and the trail of steps that led there. They turn "it crashed" into "here's exactly what happened."

5 min Web

When you're done: every error arrives reproducible — filterable, with the state and the trail attached.

1 What this is & why it matters

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 checkout flow on plan: 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.
2 How to set them

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;
});
3 How it works, piece by piece

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.

4 The green result in your dashboard

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.

app.cross-deck.com · issues · detail
tags · context · trail

Tagged flow: checkout, cart state attached, and the breadcrumb trail ending in "clicked Pay" — reproducible at a glance.

setTag to filter and group, setContext for state at crash time, addBreadcrumb for the trail (last 50, automatic). All ambient — snapshotted when an error fires. setErrorBeforeSend is your last gate: mutate to scrub, or return null to drop. Together they make every error reproducible.