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
feat(node): Populate event.contexts
for Node.js
#5512
Conversation
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.
Can we add unit/integration tests for this? We can do it in a follow up PR.
31f56df
to
c508a9a
Compare
I think the Node integration tests are failing because this change introduces an async event processor and this in turn causes the session/event envelopes to be received in a different order. |
The async OS evaluation needs to handle reentrancy properly. If a second events occurs before the async task has completed, |
Now only the dynamic properties are calculated on every event and everything else is cached. We don't call |
Hey Tim, any updates on this? Any help you need from our side to investigate or look into stuff? |
Hopefully #5579 will unblock the test failures for this PR. |
With #5579 getting merged in, we can rebase this and see if that helps with the test failures! |
Do we have to revert some of the previous test fixes? |
This comment was marked as outdated.
This comment was marked as outdated.
@timfish, I'm working on it. 👍 |
Alright #5596 has been merged in! We can try rebasing and trying again here! |
I've been away for a few days but will get back onto this on Monday! |
Tests are all passing 🎉🎉🎉🎉🎉 Thanks @onurtemizkan for all your hard work fixing this for me! I see there are some new methods for fetching single events. Is it a better idea to use those over my new filtering method? |
Moving filters inside the nock interceptors helped keep the required event / transaction |
Alright, so I think once we swap |
All done! I also replaced |
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.
🚀
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.
Based on changes in getsentry/develop#658
Thanks so much for your patience @timfish - and thanks @onurtemizkan for the fixes!!! |
has this been tested on serverless environments? like azure functions? stacktrace:
|
Hey @Venipa could you open a new issue re: your problem? Would be great to get a) your node version, b) the JS runtime that azure functions uses It would be that |
Much of this code has been in use in the Electron SDK for a long time:
https://github.com/getsentry/sentry-electron/blob/master/src/main/context.ts
The addition of memory and cpu info was more recent:
https://github.com/getsentry/sentry-electron/blob/master/src/main/integrations/additional-context.ts
Closes #5500