Skip to content

Conversation

@onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Jan 27, 2026

DESCRIBE YOUR PR

Documents: getsentry/sentry-javascript#18580

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jan 27, 2026 2:42pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
develop-docs Ignored Ignored Preview Jan 27, 2026 2:42pm

Request Review

Copy link
Collaborator

@inventarSarah inventarSarah left a comment

Choose a reason for hiding this comment

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

Looks good overall! 👍
I added a few suggestions to make the writing more consistent


</Alert>

React Router 7.9.5+ provides an [instrumentation API](https://reactrouter.com/how-to/instrumentation) that enables automatic span creation for loaders, actions, middleware, navigations, fetchers, lazy routes, and request handlers—without manual wrapper functions. Transaction names use parameterized route patterns (e.g., `/users/:id`), and errors are automatically captured with proper context.
Copy link
Collaborator

Choose a reason for hiding this comment

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

q: "Transaction names use parameterized route patterns" -> is this true for all transactions or specific ones?

<SplitSection>
<SplitSectionText>

**Before** (manual wrappers):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Before** (manual wrappers):
**Before migrating** (manual wrappers):

<SplitSection>
<SplitSectionText>

**After** (instrumentation API):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**After** (instrumentation API):
**After migrating** (instrumentation API):


</Alert>

React Router 7.9.5+ provides an [instrumentation API](https://reactrouter.com/how-to/instrumentation) that enables automatic span creation for loaders, actions, middleware, navigations, fetchers, lazy routes, and request handlers—without manual wrapper functions. Transaction names use parameterized route patterns (e.g., `/users/:id`), and errors are automatically captured with proper context.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
React Router 7.9.5+ provides an [instrumentation API](https://reactrouter.com/how-to/instrumentation) that enables automatic span creation for loaders, actions, middleware, navigations, fetchers, lazy routes, and request handlerswithout manual wrapper functions. Transaction names use parameterized route patterns (e.g., `/users/:id`), and errors are automatically captured with proper context.
React Router 7.9.5+ provides an [instrumentation API](https://reactrouter.com/how-to/instrumentation) that enables automatic span creation for loaders, actions, middleware, navigations, fetchers, lazy routes, and request handlers without the need for manual wrapper functions. Transaction names use parameterized route patterns, such as `/users/:id`, and errors are automatically captured with proper context.

Export `unstable_instrumentations` from your `entry.server.tsx` to enable automatic server-side tracing.

The `createSentryServerInstrumentation()` function instruments:

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to you to simplify this list?
It looks to me like a lot of repetition that adds little value.

For example:

The `createSentryServerInstrumentation()` function creates spans for:
- Request handlers (root HTTP server spans)
- Loaders
- Actions
- Middleware
- Lazy route loading


**After** (instrumentation API):

Add the instrumentation export once in `entry.server.tsx`, and all loaders/actions are automatically traced.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Add the instrumentation export once in `entry.server.tsx`, and all loaders/actions are automatically traced.
After adding the instrumentation export once in `entry.server.tsx`, all loaders and actions are traced automatically.


If you're not seeing spans for your loaders and actions:

1. **Check React Router version**: The instrumentation API requires React Router 7.9.5 or later
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. **Check React Router version**: The instrumentation API requires React Router 7.9.5 or later
1. Check that the React Router version is 7.9.5 or later

small updates to the list to make it consistent with the list in the second expandable

If you're not seeing spans for your loaders and actions:

1. **Check React Router version**: The instrumentation API requires React Router 7.9.5 or later
2. **Verify the export**: Ensure `unstable_instrumentations` is exported from `entry.server.tsx`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
2. **Verify the export**: Ensure `unstable_instrumentations` is exported from `entry.server.tsx`
2. Make sure `unstable_instrumentations` is exported from `entry.server.tsx`


1. **Check React Router version**: The instrumentation API requires React Router 7.9.5 or later
2. **Verify the export**: Ensure `unstable_instrumentations` is exported from `entry.server.tsx`
3. **Check sample rate**: Verify `tracesSampleRate` is set in your server configuration
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
3. **Check sample rate**: Verify `tracesSampleRate` is set in your server configuration
3. Verify `tracesSampleRate` is set in your server configuration


1. Update to the latest SDK version
2. Check that the instrumentation export is correctly configured
3. The manual wrappers (`wrapServerLoader`, `wrapServerAction`) will log a debug message when skipped
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
3. The manual wrappers (`wrapServerLoader`, `wrapServerAction`) will log a debug message when skipped
3. Verify that the manual wrappers (`wrapServerLoader`, `wrapServerAction`) log a debug message when skipped

small update for consistency

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.

3 participants