Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/remix
SDK Version
7.11.0
Framework Version
Remix-Run: 1.6.7 & React 17.0.2
Link to Sentry event
No response
Steps to Reproduce
- Opted to use Cloudflare workers as opposed to Remix's built in app server
- Followed Sentry integration instructions
Sentry.captureException(new Error("Error) is only being reported to Sentry if in primary tsx component, Not in the loader / action functions.
It looks like if Express is used as the server adapter as opposed to cloudflare-workers then there exists the wrapExpressCreateRequestHandler to handle it but nothing exists for the cloudflare-workers.
See current server.js below utilizing cloudflare-workers:
import { createEventHandler } from "@remix-run/cloudflare-workers";
import * as build from "@remix-run/dev/server-build";
addEventListener(
"fetch",
createEventHandler({ build, mode: process.env.NODE_ENV })
);
Current Sentry.init in app/entry.server.tsx:
Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 0.2,
});
Expected Result
Sentry capture exceptions should be reported in the server code as well.
Actual Result
No sentry event is reported from the server, only client.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/remix
SDK Version
7.11.0
Framework Version
Remix-Run: 1.6.7 & React 17.0.2
Link to Sentry event
No response
Steps to Reproduce
Sentry.captureException(new Error("Error)is only being reported to Sentry if in primary tsx component, Not in the loader / action functions.It looks like if Express is used as the server adapter as opposed to cloudflare-workers then there exists the
wrapExpressCreateRequestHandlerto handle it but nothing exists for the cloudflare-workers.See current
server.jsbelow utilizing cloudflare-workers:Current Sentry.init in
app/entry.server.tsx:Expected Result
Sentry capture exceptions should be reported in the server code as well.
Actual Result
No sentry event is reported from the server, only client.