Skip to content

feat(browser): breadcrumb trail on errors, console forwarding to logs - #1151

Merged
Makisuo merged 4 commits into
feat/browser-sdk-web-vitalsfrom
feat/browser-sdk-breadcrumbs
Sep 29, 2026
Merged

Makisuo merged 4 commits into
feat/browser-sdk-web-vitalsfrom
feat/browser-sdk-breadcrumbs

Merge branch 'feat/browser-sdk-web-vitals' into feat/browser-sdk-brea…

6b8ab64
Select commit
Loading
Failed to load commit list.
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.

  • startBreadcrumbs keeps 50 crumbs and flushBreadcrumbs exports them on error
  • onSessionEvent listener hook added to the browser-session sink
  • logs.captureConsole forwards chosen console levels as logs
  • installConsoleCapture teardown 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 flushBreadcrumbs and in stop, so none is exported twice or without an error (deferred/breadcrumbs.ts:93-105)
  • Clicks honour maskAllText and blocked subtrees, and url.full goes through scrubUrl (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.