Repository navigation
feat(solid): Continue the server trace in the pageload on Cloudflare Workers - #26791
Conversation
…Workers defineCloudflareOptions from @sentry/solid/solid2/cloudflare turns on addServerTimingTraceHeader of @sentry/cloudflare and adds solidServerTracePropagationIntegration, so the Workers defaults match what init sets up on Node. The trace propagation e2e test now runs on Workers. Refs JS-4146 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2701bbb. Configure here.
size-limit report 📦Compared: 58779c7 (PR test merge using develop at dca3c39) Against: 9bad320 (develop) · base run #67734
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 66 successful. See the run.
Successful checks
|
|
|
||
| test('continues the server trace in the pageload', async ({ page }) => { | ||
| // On Cloudflare, nothing sends the trace to the browser yet: `addServerTimingTraceHeader` only covers Node. | ||
| test.skip(getRuntime() === 'cloudflare', 'No trace propagation to the browser on Cloudflare yet'); |
|
|
||
| // Sends the trace to the browser on every document response, so the pageload continues it, as `init` does on Node. | ||
| const serverTimingTraceHeaderIntegration = defineIntegration((): Integration => ({ | ||
| name: 'SolidServerTimingTraceHeader', |
There was a problem hiding this comment.
| name: 'SolidServerTimingTraceHeader', | |
| name: 'SolidServerTimingTraceHeader' as const, |
Refs JS-4146 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What
On Workers,
defineCloudflareOptionsfrom@sentry/solid/solid2/cloudflareturns onaddServerTimingTraceHeaderand addssolidServerTracePropagationIntegration, so the browser pageload continues the server trace, as it does on Node. The Solid 2 Cloudflare e2e app now runs its trace propagation test.Why
Stacked on #26774, which adds
addServerTimingTraceHeaderto@sentry/cloudflare. Kept apart so each part is easier to review.Refs JS-4146