Skip to content

chore(demo): add live span/log waterfall page#1419

Merged
overbalance merged 2 commits into
mainfrom
overbalance/EMBR-12823-waterfall-demo
Jul 8, 2026
Merged

chore(demo): add live span/log waterfall page#1419
overbalance merged 2 commits into
mainfrom
overbalance/EMBR-12823-waterfall-demo

Conversation

@overbalance

@overbalance overbalance commented Jul 8, 2026

Copy link
Copy Markdown
Member

What problem is this solving?

Groundwork for EMBR-12823 (span links + related-logs attribute on the soft-nav performance span): before designing that, we need to see how soft-nav spans and logs overlap in time. This adds a developer-facing demo page that visualizes the SDK's live span/log stream as a waterfall.

Short description of the changes

Screenshot 2026-07-08 at 4 18 58 PM
  • New Waterfall demo page (demo/frontend/waterfall/) with a nav link after Playground. Soft-nav buttons (Home/A/B pushState), Info/Warn/Error log buttons, and the visualization.
  • Live capture via in-memory SpanExporter/LogRecordExporter added to the SDK's exporter chain (setupSDK gained optional extra-exporter params).
  • Waterfall viz: spans as bars colored by emb.type (session parts get the brand green), logs as severity-colored circles on a shared timeline; hide-network toggle; click a span to zoom to a fixed 1.5s window with horizontal scroll and ms ticks; cursor-following tooltips (edge-safe, with start/end/duration).
  • Sub-app deep-link fallback: a Vite dev/preview middleware that serves the right entry for hard loads like /waterfall/a, replacing the older root-index.html redirect script (which didn't cover the new page and dropped the sub-route).

All changes are demo-only (demo/frontend/); the published SDK is untouched.

How was this tested?

  • Driven manually in the dev server (:4847): navigate + emit logs, verified live rendering, per-type colors, click-to-zoom + horizontal scroll + reset, edge-safe tooltips.
  • Hard-nav verified for /waterfall/a, /soft/a, and a router demo deep link.
  • npm run lint + tsc pass via the pre-commit hook.
  • Ran the PR-review agent suite; addressed the correctness finding (unbounded Math.min(...) spread), exporter callback ordering, and a stale comment.

Checklist

  • Demo-only change; no SDK/public API impact
  • Lint + typecheck pass
  • Manually verified in the browser
  • Golden/integration tests — N/A (no SDK behavior change)

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
Chrome DevTools Protocol Tracing (Script: 93.09ms, Heap: 13.21MB)
Number of Requests Size of Requests Script Duration Task Duration Heap Used Size
Requests +12 requests +41.41 KB
Page Loaded +16.97 ms +10.03 ms +1.17 MB
Generate 100 fetch requests +14.19 ms +60.57 ms +1.49 MB
Generate 100 XHR requests +32.37 ms +86.71 ms +2.75 MB
Click 100 buttons and generate 100 logs +20.48 ms +45.02 ms +2.38 MB
Throw a 100 exceptions +0.50 ms +25.68 ms +2.20 MB
End Session +8.59 ms +20.11 ms +3.22 MB
Total +12 requests +41.41 KB +93.09 ms +248.12 ms +13.21 MB
Lighthouse (Script Eval: 113.50ms)
Difference Description
Total Blocking Time 0 ms Difference in Total Blocking Time: Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds. Learn more about the Total Blocking Time metric.
Main Thread Time +90.44 ms Difference in Main Thread Time: Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work
Script Evaluation Time +113.50 ms Difference in Script Evaluation Time: Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to reduce Javascript execution time.
Platform Tests (vite-7 es2015 gzip: 69.66KB)

vite-6 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-6 - es2015 +203.00 KB +69.70 KB

vite-7 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-7 - es2015 +203.00 KB +69.66 KB

webpack-5 Platform Tests

Total Uncompressed Size Total Gzip Size
webpack-5 - es2015 0 KB 0 KB

@joseph-embrace joseph-embrace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@overbalance overbalance changed the title EMBR-12823 chore(demo): add live span/log waterfall page for soft nav EMBR-12823 chore(demo): add live span/log waterfall page Jul 8, 2026
@overbalance overbalance changed the title EMBR-12823 chore(demo): add live span/log waterfall page chore(demo): add live span/log waterfall page Jul 8, 2026
@overbalance
overbalance merged commit a185c4b into main Jul 8, 2026
20 checks passed
@overbalance
overbalance deleted the overbalance/EMBR-12823-waterfall-demo branch July 8, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants