Skip to content

docs(cloudflare): Add TanStack Start on Cloudflare docs#17595

Open
JPeer264 wants to merge 2 commits intomasterfrom
jp/cloudflare-docs
Open

docs(cloudflare): Add TanStack Start on Cloudflare docs#17595
JPeer264 wants to merge 2 commits intomasterfrom
jp/cloudflare-docs

Conversation

@JPeer264
Copy link
Copy Markdown
Member

@JPeer264 JPeer264 commented May 4, 2026

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.

  • 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

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

@JPeer264 JPeer264 requested review from a team, betegon, nicohrubec and s1gr1d May 4, 2026 13:12
@JPeer264 JPeer264 self-assigned this May 4, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

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

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment May 4, 2026 2:55pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview May 4, 2026 2:55pm

Request Review

+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
+ Sentry.browserTracingIntegration(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JPeer264 - is this correct?

Choose the features you want to configure, and this guide will show you how:

<OnboardingOptionButtons
options={["error-monitoring", "performance", "logs"]}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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" />
Copy link
Copy Markdown
Contributor

@sfanahata sfanahata May 4, 2026

Choose a reason for hiding this comment

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

Should this be the cloudflare specific include? quick-start-features-expandable-cloudflare-frameworks


export default Sentry.withSentry(
(env) => ({
dsn: env.SENTRY_DSN,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we usually use "___PUBLIC_DSN___", yeah?

Comment on lines +136 to +147
+ 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
+ });
+ }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@sfanahata
Copy link
Copy Markdown
Contributor

@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.

Copy link
Copy Markdown
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

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

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>

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.

m: I think we should also put in here how to set up server side error capturing with the sentry middlewares?

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.

5 participants