Skip to content

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

Merged
chargome merged 7 commits into
developfrom
onur/hydrogen-rr7
Aug 6, 2025
Merged

feat(react-router): Add support for Hydrogen with RR7#17145
chargome merged 7 commits into
developfrom
onur/hydrogen-rr7

Conversation

@onurtemizkan

@onurtemizkanonurtemizkan commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

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

@onurtemizkanonurtemizkan changed the title feat: Add support for Hydrogen with RR7feat(react-router): Add support for Hydrogen with RR7Jul 24, 2025
@github-actions

github-actionsBot commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser24.04 kB--
@sentry/browser - with treeshaking flags22.62 kB--
@sentry/browser (incl. Tracing)39.75 kB--
@sentry/browser (incl. Tracing, Replay)77.86 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags67.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/react25.76 kB--
@sentry/react (incl. Tracing)41.7 kB--
@sentry/vue28.5 kB--
@sentry/vue (incl. Tracing)41.56 kB--
@sentry/svelte24.07 kB--
CDN Bundle25.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 - uncompressed74.7 kB--
CDN Bundle (incl. Tracing) - uncompressed117.32 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed231.59 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed244.19 kB--
@sentry/nextjs (client)43.75 kB--
@sentry/sveltekit (client)40.2 kB--
@sentry/node-core47.73 kB--
@sentry/node146.62 kB--
@sentry/node - without tracing91.83 kB--
@sentry/aws-serverless103.27 kB--

View base workflow run

@onurtemizkan
onurtemizkanforce-pushed the onur/hydrogen-rr7 branch 2 times, most recently from e84f411 to 305c9c2CompareJuly 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.

@chargomechargome left a comment

Copy link
Copy Markdown
Member

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.

@linear

linearBot commented Aug 6, 2025

Copy link
Copy Markdown

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

This comment was marked as outdated.

@chargome
chargome merged commit ce66380 into developAug 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,

Copy link
Copy Markdown

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 = {

Copy link
Copy Markdown

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,

Copy link
Copy Markdown

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 freeto 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

@onurtemizkan@sameerxanand@chargome