-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating v8 stops flushing errors in edge runtime #14931
Comments
Hey @tttttahiti, tbh we have not tested this setup fully yet but could you try using our Cloudflare SDK on the server? So in your server and edge config you would call |
Hey @chargome, Thank you for the suggestion. I'll give the @sentry/cloudflare SDK a try for the server-side and edge configurations, while keeping @sentry/nextjs for the client as you suggested. I'll report back with the results. |
This comment has been minimized.
This comment has been minimized.
I got the same issue, I will try that @kimdanielarthur-cowlabs |
@kimdanielarthur-cowlabs it does not work. I am trying with Cloudflare SDK @chargome : GitbookIO/gitbook#2699 |
I can't make it work. |
@gregberge in your PR you did not call |
init is not exposed from |
@gregberge ah I missed that – will have a talk with @AbhiPrasad tomorrow (he built the cloudflare sdk) and see how we could make this setup work. @kimdanielarthur-cowlabs your issue is most likely related to #14780 |
I spotted that I was using I simplified my setup here: GitbookIO/gitbook#2701 I also added logs, I will try to see what going on on Cloudflare. |
I investigated and the |
@gregberge in general you will only need to use instrumentation.ts should be called, but there are some related issues as well: cloudflare/next-on-pages#678 Anyway, I'll try to find some time and set this up myself to have a way forward for us on how to support nextjs+cloudflare. |
@chargome I opened an issue on cloudflare/next-on-pages#930 |
As @gregberge mentioned, |
We'll need an upstream fix for cloudflare/next-on-pages#678, otherwise our otel instrumentation will not work. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.47.0
Framework Version
[email protected]
Link to Sentry event
No response
Reproduction Example/SDK Setup
Configs
next.config.mjs
instrumentation.ts
sentry.edge.config.ts
deploy-action.yaml
App Code
I used files made by
npx @sentry/wizard@latest -i nextjs
to test.app/api/sentry-example-api/route.ts
app/sentry-example-page/page.tsx
Steps to Reproduce
I am trying to migrate v8 from v7 in my project with [email protected] and deploy to Cloudflare Pages.
It used to work all fine while using v7 SDK, but after migrating v8, it stops flushing error caused in route handler.
And it's only in the Cloudflare Pages Edge runtime, local dev server works fine. Also client errors captured in both local and Cloudflare Pages.
Here's a migrating steps I have tried;
instrumentationHook
in next.config.mjsnpx @sentry/migr8
and installed SDK 8.47.0npx @cloudflare/next-on-pages
failednpx @cloudflare/next-on-pages --disableChunksDedup
. Build successfully, though the bundle size is super high, still doesn't flush events in Edge runtime.I am doubting the compatibility with Cloudflare Pages and the SDK.
Expected Result
Flushes errors in Cloudflare Pages Edge runtime, like route handlers.
Actual Result
Only client errors are captured in the Cloudflare Pages.
The text was updated successfully, but these errors were encountered: