feat(browser): breadcrumb trail on errors, console forwarding to logs - #1151
Merged
Makisuo merged 4 commits intoSep 29, 2026
Merged
Maple Review Bot / Maple / review
succeeded
Sep 29, 2026 in 9m 2s
Confidence 4/5 · No issues found
Confidence 4/5 · likely safe to merge
The two files the kickoff lists as changed since the last review are not in this head's diff, so no new code was added to review.
quality 100/100 · no findings · tests covered · risk medium · 2/2 new units observable
Adds an in-memory breadcrumb trail (clicks, inputs, navigations, console) exported as OTel logs linked to an error's span, plus logs.captureConsole forwarding. The head carries no code newer than the previous review; nothing new to object to.
startBreadcrumbskeeps 50 crumbs andflushBreadcrumbsexports them on erroronSessionEventlistener hook added to the browser-session sinklogs.captureConsoleforwards chosen console levels as logsinstallConsoleCaptureteardown now only undoes its own wrapper
What was checked
- Input breadcrumbs carry only
targetSelector, no value (capture/interactions.ts:24-29) - Crumbs are cleared in
flushBreadcrumbsand in stop, so none is exported twice or without an error (deferred/breadcrumbs.ts:93-105) - Clicks honour
maskAllTextand blocked subtrees, andurl.fullgoes throughscrubUrl(deferred/breadcrumbs.ts:121)
Observability coverage: 2 of 2 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| Breadcrumb trail export as OTel log records | outbound telemetry | yes | emitLog with explicit spanContext links each record to the error span (deferred/breadcrumbs.ts:102-124) |
| Console forwarding as log records | outbound telemetry | yes | emitConsole sets maple.log.source and the active span context (deferred/breadcrumbs.ts:44-55) |
6b8ab64 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.
Loading