getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
336 stars 1.47k forks source link

Cloudflare Remix Docs - Imported packages don't match between server files #11788

Open charlie-bud opened 2 weeks ago

charlie-bud commented 2 weeks ago

SDK

JavaScript SDK

Description

The Cloudflare Remix framework docs suggest to use the Sentry wizard to implement the necessary code. The wizard will add an import to @sentry/remix in entry.server.ts. The docs later explain to add a functions/_middleware.js that will import and initialise Sentry from @sentry/cloudflare. This results in broken server reporting of Unexpected Server Error's, due to the @sentry/remix package not having an initialised instance of Sentry on the server (@sentry/cloudflare is initialised instead) and hence the error caught isn't reported correctly. There is a detailed description of this issue here.

It's difficult to suggest where any changes should be raised (docs, core packages or wizard) as there's 3 separate concerns (Remix, Sentry and Cloudflare) that don't quite sync up from the guide. Raising the issue here as the SDK wizard is not currently Remix + Cloudflare-specific (just remix), but this doc is so felt like a good place to start the discussion on how to provide an easier integration experience for Remix/Cloudflare/Sentry users. Thanks in advance!

Suggested Solution

No response

getsantry[bot] commented 2 weeks ago

Assigning to @getsentry/support for routing ⏲️