Breadcrumbs

The trail of clicks, navigation, requests, and app events recorded before an error, showing how the user reached the crash.

breadcrums before an errorwhat the user did before the crashtrail of actions before an exceptionlast clicks before the app brokethe crash report says nothing about what they clickedsentry breadcrumbssteps leading up to the errorrecent events attached to a crash report

See it

Live demo coming soon

What it is

In error tracking, breadcrumbs are a short ordered trail of events that happened before an exception: navigation, button clicks, console messages, network requests, or an application event such as 'cart updated'. Sentry popularized the label. The stack trace shows where the code failed; breadcrumbs supply the missing story of how the app got there.

Reach for them when a bug depends on a sequence that the final error cannot explain, especially in browser and mobile apps. Let the SDK capture common events, then add a few domain breadcrumbs around state changes such as signing in, applying a coupon, or switching accounts. Give each one a stable category, a short message, a level, and small structured data fields so the trail can be scanned quickly.

Gotcha: breadcrumbs can quietly become surveillance or a data leak. URLs may contain tokens, console messages may contain user data, and request bodies rarely belong in an error report. Redact before capture, drop repetitive events, and record outcomes rather than every keystroke. A hundred noisy crumbs can hide the one action that mattered.

Ask AI for it

Add Sentry breadcrumbs to this app. Keep the SDK's navigation and HTTP breadcrumbs, and call Sentry.addBreadcrumb for important domain state changes such as sign-in, account switch, checkout start, and payment result. Give every custom breadcrumb a stable category, concise message, level, timestamp, and a small data object containing IDs or enums needed for diagnosis. Use Sentry's beforeBreadcrumb hook to strip query strings, authorization headers, cookies, email addresses, tokens, and request bodies, and drop health checks, polling requests, and repeated console noise. Add a test error that verifies the final event contains the expected ordered trail.

You might have meant

error trackingstack traceerror groupingpii scrubbingcorrelation id