sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

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

Open charlie-bud opened this issue 1 year ago • 1 comments

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

charlie-bud avatar Nov 12 '24 09:11 charlie-bud

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Nov 12 '24 09:11 getsantry[bot]