Skip to content

feat(react-router): Trace propagation #16070

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

chargome
Copy link
Member

  • Adds new util function getMetaTagTransformer for injecting trace meta tags to the html <head>
  • Adds helper function createSentryHandleRequest which is a complete Sentry-instrumented handleRequest implementation that handles both route parametrization and trace meta tag injection. -> this is for users that do not need any modifications in their handleRequest function
  • Renames sentryHandleRequest to wrapSentryHandleRequest to avoid confusion

closes #15515

@chargome chargome self-assigned this Apr 15, 2025
@chargome chargome marked this pull request as ready for review April 17, 2025 14:17
@chargome chargome requested review from lforst, Lms24 and s1gr1d April 17, 2025 15:28
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice!

*/
export function getMetaTagTransformer(body: PassThrough): Transform {
const headClosingTag = '</head>';
const htmlMetaTagTransformer = new Transform({
Copy link
Member

Choose a reason for hiding this comment

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

l: As discussed I'm not 100% sure if Transform is supported in WinterTC runtimes (edge, CloudFlare) but we can cross this bridge when we get to it.

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.

[RR7] Trace Propagation
2 participants