Skip to content

test(cloudflare): Port the vite-autoinstrument suites to span streaming - #24189

Draft
JPeer264 wants to merge 1 commit into
jp/cf-int-tests-propagation-streamingfrom
jp/cf-int-tests-vite-autoinstrument-streaming
Draft

test(cloudflare): Port the vite-autoinstrument suites to span streaming#24189
JPeer264 wants to merge 1 commit into
jp/cf-int-tests-propagation-streamingfrom
jp/cf-int-tests-vite-autoinstrument-streaming

Conversation

@JPeer264

@JPeer264 JPeer264 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Ports the seventeen suites/vite-autoinstrument suites off the traceLifecycle: 'static' pin.

Under streaming a whole request chain is one trace, so each suite reads the trace with collectStreamedSpans instead of one envelope expectation per hop. Every hop here (a Durable Object, a WorkerEntrypoint, a Workflow step) runs in its own isolate and streams its own envelope, so a single-envelope read would be a race.

The proof of instrumentation is unchanged, only its shape is: a Durable Object still shows the durable_object_storage_get / durable_object_storage_put pair, now as children of its own segment span rather than as spans of its transaction. The chain is asserted directly, a hop's segment span carries the previous hop's span_id as its parent_span_id, which is stronger than the disjointness the old unordered expectations relied on.

Every route in these suites is a raw URL, so the streamed segment name keeps the method only. GET /greet becomes GET, and the hop is identified through its url.path attribute. That matters for the entrypoint and combination suites, where the transaction name used to tell the hops apart.

The per-suite expectDurableObjectTransaction, expectMainWorkerTransaction and expectPlainTransaction helpers are gone. The assertions are inlined, and the suites that hit two endpoints loop over the two paths.

Part of #24148

🤖 Generated with Claude Code

Removes the `traceLifecycle: 'static'` pin from the seventeen
`suites/vite-autoinstrument` suites, and rewrites the assertions from
transaction envelopes to span v2.

Under streaming a whole request chain is one trace, so a suite reads the trace
rather than one envelope per hop. Every suite now uses `collectStreamedSpans`,
because each hop, a Durable Object, a `WorkerEntrypoint` or a Workflow step,
runs in its own isolate and streams its own envelope.

The proof of instrumentation is unchanged, only its shape is. A Durable Object
still shows the `durable_object_storage_get` and `durable_object_storage_put`
pair, but as children of its own segment span rather than as `spans` of its
transaction. The chain is now asserted directly: a hop's segment span carries
the previous hop's `span_id` as its `parent_span_id`.

Every route in these suites is a raw URL, so the streamed segment name keeps the
method only. `GET /greet` becomes `GET`, and the hop is identified by its
`url.path` attribute. That matters for the entrypoint and combination suites,
where the segment name used to tell the hops apart.

The per-suite `expectDurableObjectTransaction`, `expectMainWorkerTransaction`
and `expectPlainTransaction` helpers are gone. The assertions are inlined, and
the suites that hit two endpoints loop over the two paths instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.8 kB added added
@sentry/browser - with treeshaking flags 27.11 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 27 kB added added
@sentry/browser (incl. Tracing) 49.22 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 49.22 kB added added
@sentry/browser (incl. Tracing, Profiling) 52.12 kB added added
@sentry/browser (incl. Tracing, Replay) 88.76 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.95 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 93.44 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 106.37 kB added added
@sentry/browser (incl. Feedback) 46.3 kB added added
@sentry/browser (incl. sendFeedback) 33.86 kB added added
@sentry/browser (incl. FeedbackAsync) 38.97 kB added added
@sentry/browser (incl. Metrics) 29.82 kB added added
@sentry/browser (incl. Logs) 30.09 kB added added
@sentry/browser (incl. Metrics & Logs) 30.75 kB added added
@sentry/react 30.55 kB added added
@sentry/react (incl. Tracing) 51.42 kB added added
@sentry/vue 36.05 kB added added
@sentry/vue (incl. Tracing) 51.48 kB added added
@sentry/svelte 28.83 kB added added
CDN Bundle 30.55 kB added added
CDN Bundle (incl. Tracing) 49.74 kB added added
CDN Bundle (incl. Logs, Metrics) 32.82 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.48 kB added added
CDN Bundle (incl. Tracing, Replay) 87.29 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.18 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 93.22 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.21 kB added added
CDN Bundle - uncompressed 90.46 kB added added
CDN Bundle (incl. Tracing) - uncompressed 148.17 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.03 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.14 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.29 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.76 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.71 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.46 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.4 kB added added
@sentry/nextjs (client) 54.03 kB added added
@sentry/sveltekit (client) 49.65 kB added added
@sentry/core/server 38.62 kB added added
@sentry/core/browser 13.55 kB added added
@sentry/node 124.93 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB added added
@sentry/node - without tracing 88.64 kB added added
@sentry/node - without channel injection 104.25 kB added added
@sentry/aws-serverless 97.02 kB added added
@sentry/cloudflare (withSentry) - minified 201.91 kB added added
@sentry/cloudflare (withSentry) 502.4 kB added added

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