-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(event): Move stack trace from exception to threads for message events #6038
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
Conversation
size-limit report 📦
|
| values: [{ value: input, stacktrace: { frames } }], | ||
| }; | ||
| event.threads = { | ||
| values: [{ stacktrace: { frames } }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h: I don't understand how this is fixing the problem here - doesn't this just duplicate the information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the PR has a description of what needs to be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a duplicate, but I don't have enough context on how we plan to solve it. Remove stack trace from exception?
But does the rest make sense? The issue says to add frames to threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, previously when debugging this, when calling captureMessage, the syntheticException was null, this is written in the issue description, so there was no exception nor thread set in the event.
Apparently something changed or I was using an older version of the JS SDK, now the syntheticException isn't null anymore even for captureMessage and message events contain an exception with a stack trace, IMO this is wrong.
captureMessage should contain a thread with the stack trace and not an exception with a stack trace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AbhiPrasad can you double-check if that makes sense now? thanks.
|
I removed the duplicate stack trace, now message events have it only in I don't know if there is any other implementation besides |
For me it looks good, CI is unhappy tho. |
Previous implementation would return empty array of exception frames. Now instead threads are checked and if those are also undefined or empty array the function returns undefined.
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
@krystofwoldrich what's the state of this? didn't fix it directly in RN? can we close this or is still needed? |
|
@marandaneto From my side its done and it still needs to be merged. At the moment the stack trace of Message is in exception which I think is wrong. @getsentry/team-web-sdk-frontend Could anyone take another look? |
If we change this, won't it be a breaking change? This could break users |
|
@AbhiPrasad You are right. So, could we add it to the next major, v8? |
Yup we can. Can we update the linked GH issue to reflect this then? |
|
@AbhiPrasad Sure we can, I just don't know what to update there. |
|
Went ahead and updated everything - just adding labels and updating the milestone. |
|
@AbhiPrasad Thanks. |
| threads?: { | ||
| values: Thread[]; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be added in JS SDK v7? @AbhiPrasad
|
@krystofwoldrich going to close this so we clean up the PR stream, but we can re-open and merge in once we start work on v8. |
Fixes: #5879
Relates to: getsentry/sentry-react-native#2131
Implements: https://develop.sentry.dev/sdk/event-payloads/threads/