docs(cloudflare): Add TanStack Start on Cloudflare docs#17595
docs(cloudflare): Add TanStack Start on Cloudflare docs#17595
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| + dsn: "___PUBLIC_DSN___", | ||
| + integrations: [ | ||
| + // ___PRODUCT_OPTION_START___ performance | ||
| + Sentry.browserTracingIntegration(), |
There was a problem hiding this comment.
Bug: The guide uses the generic Sentry.browserTracingIntegration() instead of the required Sentry.tanstackRouterBrowserTracingIntegration(router), leading to incorrect performance tracing for navigation.
Severity: MEDIUM
Suggested Fix
Replace Sentry.browserTracingIntegration() with Sentry.tanstackRouterBrowserTracingIntegration(router), passing the router instance to the function. This will correctly instrument TanStack Router's navigation events.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx#L140
Potential issue: The TanStack Start on Cloudflare guide incorrectly uses the generic
`Sentry.browserTracingIntegration()` for client-side performance tracing. The correct
integration for this framework is
`Sentry.tanstackRouterBrowserTracingIntegration(router)`, which is necessary to properly
instrument TanStack Router's navigation lifecycle events. Using the generic integration
will result in missing or incorrectly named `pageload/navigation` transactions for
client-side route changes, leading to degraded performance monitoring for users
following this guide.
Did we get this right? 👍 / 👎 to inform future reviews.
| Choose the features you want to configure, and this guide will show you how: | ||
|
|
||
| <OnboardingOptionButtons | ||
| options={["error-monitoring", "performance", "logs"]} |
There was a problem hiding this comment.
Should we also include session replay and user feedback? They seem to be referenced in other Cloudflare frameworks.
| options={["error-monitoring", "performance", "logs"]} | ||
| /> | ||
|
|
||
| <Include name="quick-start-features-expandable" /> |
There was a problem hiding this comment.
Should this be the cloudflare specific include? quick-start-features-expandable-cloudflare-frameworks
|
|
||
| export default Sentry.withSentry( | ||
| (env) => ({ | ||
| dsn: env.SENTRY_DSN, |
There was a problem hiding this comment.
I think we usually use "___PUBLIC_DSN___", yeah?
| + Sentry.init({ | ||
| + dsn: "___PUBLIC_DSN___", | ||
| + integrations: [ | ||
| + // ___PRODUCT_OPTION_START___ performance | ||
| + Sentry.browserTracingIntegration(), | ||
| + // ___PRODUCT_OPTION_END___ performance | ||
| + ], | ||
| + // ___PRODUCT_OPTION_START___ performance | ||
| + tracesSampleRate: 1.0, | ||
| + // ___PRODUCT_OPTION_END___ performance | ||
| + }); | ||
| + } |
There was a problem hiding this comment.
Should we include any of: sendDefaultPii: true, enableLogs: true (under logs option), Sentry.replayIntegration() (under session-replay option), Sentry.feedbackIntegration() (under user-feedback option), replaysSessionSampleRate/replaysOnErrorSampleRate.
Looks like other Cloudflare guides include them.
|
@JPeer264 - Great add! Thanks for doing this. Can you double check some of the comments I left? I just noticed a few inconsistencies with other Cloudflare guides and wanted to make sure that was on purpose. |
nicohrubec
left a comment
There was a problem hiding this comment.
Thanks for looking into this :) Mostly looks great. Left a few more comments/questions about the setup in the e2e test PR, so if we land on any updates there would be good to update this.
| </SplitSectionCode> | ||
| </SplitSection> | ||
| </SplitLayout> | ||
|
|
There was a problem hiding this comment.
m: I think we should also put in here how to set up server side error capturing with the sentry middlewares?
DESCRIBE YOUR PR
TanStack start was missing the docs. This adds a quick starter to run TanStack Start on Cloudflare
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES