You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for writing in! I just tried out your reproduction example and indeed I had trouble receiving events. I received some, but very inconsistently.
I see that our docs do not document this at all, however, generally the SDKs auto instrumentation will call flush automatically. We just don't have any automatic instrumentation for server actions yet.
Yes, agreed its inconsistent, I have noticed that very occasionally some events get through, but its rare.
I originally started by using Sentry.withServerActionInstrumentation but was finding the same issue. That doesn't seem to be the case now, so I'll switch back to that.
For my reference though - are you saying that if I call await Sentry.flush() before calling captureException, it should then work too (outside of withServerActionInstrumentation)?
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
7.113.0
Framework Version
Next 14.2.3
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
I've noticed that Sentry does not log handled errors in nextjs server actions when using the edge runtime.
The same code when run on the node runtime works fine.
Minimal reproduction with instructions:
https://github.com/Xexr/sentry-edge-error
Expected Result
Sentry should record the error event "test action error" when pressing the "Test action" button.
Actual Result
You will see that clicking the test button does not generate a Sentry entry.
If you comment out the edge runtime line, you'll see that it starts to work correctly.
Note: this seems to only be the case specifically for caught errors in a server action running on the edge runtime.
The text was updated successfully, but these errors were encountered: