Skip to content

feat(tracing): add App fetch spans - #3267

Draft
james-elicx wants to merge 1 commit into
codex/otel-05a-app-execution-spansfrom
codex/otel-05b-app-fetch-spans
Draft

james-elicx wants to merge 1 commit into
codex/otel-05a-app-execution-spansfrom
codex/otel-05b-app-fetch-spans

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • emit Next.js-compatible AppRender.fetch spans through the shared framework tracer
  • record HTTP and fetch cache outcome attributes while honoring NEXT_OTEL_FETCH_DISABLED and internal fetches
  • prove real @sentry/nextjs parentage and attributes on Cloudflare Workerd

Next.js parity

Pinned against vercel/next.js@b421cadefd31c1b59d117842021ded7c1ebaf5b4, especially:

  • packages/next/src/server/lib/patch-fetch.ts
  • packages/next/src/server/lib/patch-fetch.test.ts
  • test/e2e/opentelemetry/instrumentation/opentelemetry.test.ts

No OpenTelemetry package is added as a required vinext dependency, and no Sentry-specific runtime path is introduced.

Validation

  • vp check
  • vp test run tests/app-fetch-tracing.test.ts tests/fetch-cache.test.ts tests/framework-tracer.test.ts tests/workers-tracing.test.ts (178 passed)
  • vp run vinext#build
  • PLAYWRIGHT_PROJECT=cloudflare-sentry-app pnpm exec playwright test (15 passed)
  • independent correctness review: clean
  • independent Next.js parity review: clean

Stack parent: #3266

@james-elicx
james-elicx added this pull request to stack #3258 September 15, 2026 01:54
@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@3267

create-vinext-app

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

@vinext/types

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

vinext

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

@cloudflare/workers-response-store

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

commit: 0bead68

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 0bead68 against base be5c13b 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.6 KB 129.6 KB ⚫ -0.0%
Dev server cold start vinext 3.31 s 3.28 s ⚫ -0.9%
Production build time vinext 3.85 s 3.82 s ⚫ -0.8%
RSC entry closure size (gzip) vinext 123.9 KB 124.3 KB ⚫ +0.3%
Server bundle size (gzip) vinext 214.5 KB 214.8 KB ⚫ +0.2%

View detailed results and traces

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

@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

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