Skip to content

Conversation

@krystofwoldrich
Copy link
Contributor

@krystofwoldrich krystofwoldrich commented Oct 25, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.61 KB (+0.61% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.81 KB (+0.76% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.31 KB (+1.05% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.37 KB (+1.29% 🔺)
@sentry/browser - Webpack (gzipped + minified) 20.09 KB (+1.13% 🔺)
@sentry/browser - Webpack (minified) 65.91 KB (+1.27% 🔺)
@sentry/react - Webpack (gzipped + minified) 20.11 KB (+1.13% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.86 KB (+0.16% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.36 KB (+0.45% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.83 KB (+0.85% 🔺)

values: [{ value: input, stacktrace: { frames } }],
};
event.threads = {
values: [{ stacktrace: { frames } }],
Copy link
Member

@AbhiPrasad AbhiPrasad Oct 25, 2022

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?

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.

Copy link
Contributor Author

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.

Copy link

@marandaneto marandaneto Oct 25, 2022

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.

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.

@krystofwoldrich krystofwoldrich marked this pull request as draft October 25, 2022 13:17
@krystofwoldrich krystofwoldrich changed the title chore(event): Add threads to browser events chore(event): Move stack trace from exception to threads for message events Oct 25, 2022
@krystofwoldrich krystofwoldrich changed the title chore(event): Move stack trace from exception to threads for message events fix(event): Move stack trace from exception to threads for message events Oct 25, 2022
@krystofwoldrich krystofwoldrich marked this pull request as ready for review October 25, 2022 15:22
@krystofwoldrich
Copy link
Contributor Author

I removed the duplicate stack trace, now message events have it only in threads.

I don't know if there is any other implementation besides browser and node.

@marandaneto
Copy link

I removed the duplicate stack trace, now message events have it only in threads.

I don't know if there is any other implementation besides browser and node.

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.
@github-actions
Copy link
Contributor

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 Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link

@krystofwoldrich what's the state of this? didn't fix it directly in RN? can we close this or is still needed?

@krystofwoldrich
Copy link
Contributor Author

@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?

@AbhiPrasad
Copy link
Member

At the moment the stack trace of Message is in exception which I think is wrong.

If we change this, won't it be a breaking change? This could break users beforeSend callbacks if they are filtering on this. I know we want to break for correct behaviour, but this will cause runtime issues.

@krystofwoldrich
Copy link
Contributor Author

@AbhiPrasad You are right. So, could we add it to the next major, v8?

@AbhiPrasad
Copy link
Member

So, could we add it to the next major, v8?

Yup we can. Can we update the linked GH issue to reflect this then?

@krystofwoldrich
Copy link
Contributor Author

@AbhiPrasad Sure we can, I just don't know what to update there.

@AbhiPrasad AbhiPrasad added this to the 8.0.0 milestone Dec 1, 2022
@AbhiPrasad
Copy link
Member

Went ahead and updated everything - just adding labels and updating the milestone.

@krystofwoldrich
Copy link
Contributor Author

@AbhiPrasad Thanks.

Comment on lines +56 to +58
threads?: {
values: Thread[];
};
Copy link
Contributor Author

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

@AbhiPrasad
Copy link
Member

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

@AbhiPrasad AbhiPrasad closed this Jan 30, 2023
@AbhiPrasad AbhiPrasad deleted the kw/add-threads-to-event branch April 24, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If attachStacktrace is enabled, captureMessage should include the stack trace in the threads interface

4 participants