Skip to content

server runtime captureException event level undefined #10588

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

Closed
3 tasks done
Zih0 opened this issue Feb 9, 2024 · 4 comments · Fixed by #10587
Closed
3 tasks done

server runtime captureException event level undefined #10588

Zih0 opened this issue Feb 9, 2024 · 4 comments · Fixed by #10587
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@Zih0
Copy link
Contributor

Zih0 commented Feb 9, 2024

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.100.0

Framework Version

nextjs 13.5.5

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

I found sentry/browser captureException sets the level of the event to error,
but server runtime captureException don't set event level.

Expected Result

server runtime captureException event's level 'error'

Actual Result

https://codesandbox.io/p/devbox/ecstatic-merkle-8dklcm?file=%2Fsentry.server.config.js%3A8%2C96&workspaceId=0b6a93a6-ac89-4020-a035-0354bd4bb279

server side
스크린샷 2024-02-09 오후 11 18 09

client side
스크린샷 2024-02-09 오후 11 17 53

@Zih0 Zih0 added the Type: Bug label Feb 9, 2024
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 9, 2024
@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Feb 9, 2024
@Lms24
Copy link
Member

Lms24 commented Feb 9, 2024

Hi @Zih0 thanks for writing in and for opening the PR! Before we review and merge it, can you explain what the consequences of the SDK not setting this default value are in the Sentry UI? Is there something missing? As far as I can tell, our Sentry backend sets a default level if it's not set by the SDK. However, if there's a discrepancy, I think we should fix it as you suggested.

@Zih0
Copy link
Contributor Author

Zih0 commented Feb 9, 2024

@Lms24 Thank you for your comment!
There was nothing wrong in Sentry UI. 🙂

I need to explain my situation first.
I wanted to use beforeSend to handle the event if the level of the event is 'error' and 'fatal'.
Then, I found that the event's level was coming in from the client side, while the event's level was not coming in from the server side.
So I thought this was a bug, so I opened the issue and PR.

If you don't think this is a bug, you can close the issue. :)

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 9, 2024
@Lms24
Copy link
Member

Lms24 commented Feb 9, 2024

Ahh I see, you're bringing up a good point. Let's try to align the behavior with the browser SDK. I just gave the PR a review. Looks good mostly, let's just fix the test then we can merge it.

Copy link
Contributor

A PR closing this issue has just been released 🚀

This issue was referenced by PR #10587, which was included in the 8.45.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants