Skip to content

feat(react-router): Add support for Hydrogen with RR7 #17145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 6, 2025

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Jul 24, 2025

Hydrogen switched from Remix v2 to React Router 7 (framework mode) from version 2025.5.0.

This PR adds support for React Router 7 (framework) SDK, adding a new entry point for cloudflare environments, and making a few structural changes.

  • Added @sentry/react-router/cloudflare entrypoint, similarly to what we have done on @sentry/remix/cloudflare.
  • Added injectTraceMetaTags to support ReadableStream which is used instead of PipeableStream (which we cover on getMetaTagTransformer for node environments), on cloudflare environments.
  • Added a new E2E test package for Hydrogen + RR7.

Note: Needs documentation update if approved.

closes #17334
closes https://linear.app/getsentry/issue/JS-832/react-router-framework-add-cloudflare-support

@onurtemizkan onurtemizkan changed the title feat: Add support for Hydrogen with RR7 feat(react-router): Add support for Hydrogen with RR7 Jul 24, 2025
Copy link
Contributor

github-actions bot commented Jul 24, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.04 kB - -
@sentry/browser - with treeshaking flags 22.62 kB - -
@sentry/browser (incl. Tracing) 39.75 kB - -
@sentry/browser (incl. Tracing, Replay) 77.86 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.69 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.56 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.66 kB - -
@sentry/browser (incl. Feedback) 40.7 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 41.7 kB - -
@sentry/vue 28.5 kB - -
@sentry/vue (incl. Tracing) 41.56 kB - -
@sentry/svelte 24.07 kB - -
CDN Bundle 25.55 kB - -
CDN Bundle (incl. Tracing) 39.64 kB - -
CDN Bundle (incl. Tracing, Replay) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.11 kB - -
CDN Bundle - uncompressed 74.7 kB - -
CDN Bundle (incl. Tracing) - uncompressed 117.32 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.59 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.19 kB - -
@sentry/nextjs (client) 43.75 kB - -
@sentry/sveltekit (client) 40.2 kB - -
@sentry/node-core 47.73 kB - -
@sentry/node 146.62 kB - -
@sentry/node - without tracing 91.83 kB - -
@sentry/aws-serverless 103.27 kB - -

View base workflow run

@onurtemizkan onurtemizkan force-pushed the onur/hydrogen-rr7 branch 2 times, most recently from e84f411 to 305c9c2 Compare July 25, 2025 08:39
@onurtemizkan onurtemizkan marked this pull request as ready for review July 25, 2025 13:48
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Nice!

cursor[bot]

This comment was marked as outdated.

Copy link

linear bot commented Aug 6, 2025

@chargome chargome self-assigned this Aug 6, 2025
cursor[bot]

This comment was marked as outdated.

@chargome chargome merged commit ce66380 into develop Aug 6, 2025
160 checks passed
@chargome chargome deleted the onur/hydrogen-rr7 branch August 6, 2025 10:53
project: "example-project",
// An auth token is required for uploading source maps;
// store it in an environment variable to keep it secure.
authToken: process.env.SENTRY_AUTH_TOKEN,

Choose a reason for hiding this comment

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

This should be added to env.d.ts

/**
* Export a fetch handler in module format.
*/
type Env = {

Choose a reason for hiding this comment

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

The interface is already defined in env.d.ts

Comment on lines +76 to +77
sentryTrace: env.SENTRY_TRACE,
sentryBaggage: env.SENTRY_BAGGAGE,

Choose a reason for hiding this comment

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

Where does env.SENTRY_TRACE and env.SENTRY_BAGGAGE come from? Does wrapRequestHandler from @sentry/cloudflare add this to the env context in server.ts?

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.

[React-Router Framework]: Add Cloudflare support
3 participants