Skip to content

feat(tracing): add App response start spans - #3271

Draft
james-elicx wants to merge 1 commit into
codex/otel-05d-segment-module-spansfrom
codex/otel-05e-app-start-response
Draft

james-elicx wants to merge 1 commit into
codex/otel-05d-segment-module-spansfrom
codex/otel-05e-app-start-response

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • add the Next.js-compatible NextNodeServer.startResponse boundary for matched App Pages and Route Handlers through the shared framework tracer
  • emit on the first response write while preserving App render parentage, request lifetime, fully-buffered metadata, Workerd response state, and Link provenance
  • trace Response Store and Workers Cache HTML/Route Handler replays while keeping App RSC responses untraced, matching Next.js
  • run the unchanged @sentry/nextjs fixture through real self-contained Response Store and a focused Workers Cache project

No OpenTelemetry package becomes a vinext dependency, and there is no Sentry-specific framework tracing path.

Stack

Depends on #3270 (feat(tracing): add App segment module spans).

Validation

  • vp check
  • focused tracing/App unit suites: 187 passed before the final cache-representation additions; final tracing suite: 16 passed
  • pnpm --filter @vinext/cloudflare test: 30 passed
  • Sentry + self-contained Response Store: 18 passed
  • Sentry + Workers Cache replay: 2 passed
  • concurrent Response Store and Workers Cache replay projects: 2 passed each
  • two independent final reviews: clean

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues. You have an eight-minute time limit: report all concrete findings within eight minutes, prioritizing response stream lifecycle, Next.js startResponse parity, cache HIT/RSC representation handling, Workerd Response state, and Sentry/Workers tracing architecture.

@ask-bonk

ask-bonk Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

error: Your local changes to the following files would be overwritten by checkout:
AGENTS.md
Please commit your changes or stash them before you switch branches.
Aborting

github run

@ask-bonk

ask-bonk Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@pkg-pr-new

pkg-pr-new Bot commented Sep 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vinext/cloudflare

npm i https://pkg.pr.new/cloudflare/vinext/@vinext/cloudflare@3271

create-vinext-app

npm i https://pkg.pr.new/cloudflare/vinext/create-vinext-app@3271

@vinext/types

npm i https://pkg.pr.new/cloudflare/vinext/@vinext/types@3271

vinext

npm i https://pkg.pr.new/cloudflare/vinext@3271

@cloudflare/workers-response-store

npm i https://pkg.pr.new/cloudflare/vinext/@cloudflare/workers-response-store@3271

commit: 447a9ed

@james-elicx
james-elicx force-pushed the codex/otel-05e-app-start-response branch from 34f378e to 447a9ed Compare September 15, 2026 03:38
@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
response-store-demo preview production
static-export preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 447a9ed against base 09ffc24 using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.7 KB 129.7 KB ⚫ +0.0%
Dev server cold start vinext 3.29 s 3.25 s ⚫ -1.0%
Production build time vinext 3.81 s 3.80 s ⚫ -0.3%
RSC entry closure size (gzip) vinext 125.3 KB 125.7 KB ⚫ +0.3%
Server bundle size (gzip) vinext 215.9 KB 216.3 KB ⚫ +0.2%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant