-
Notifications
You must be signed in to change notification settings - Fork 171
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(integrations): Add message envelope to scope context #727
feat(integrations): Add message envelope to scope context #727
Conversation
I'm not sure we should enable this automatically. The envelope could contain sensible information that should not be shared with Sentry. |
I agree. Would you like to see is behind a config flag? |
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.
Overall, this is a valuable addition.
- We need to guard the inclusion of the envelope with
send_default_pii
- There are some size concerns, as too big payloads are being dropped by Relay. Are there any size limits for an envelope enforced on the Symfony side?
- This data won't be searchable, so this will be just additional context that enriches an error event.
Will do. I have this option set to false (I don't want/need everything it provides), but I would very much like to have messenger data available with the issue. Is it possible to differentiate? A new flag could be created, or maybe (the better option?) an example can be given how to enable the
If I'm correct; not on SF side but on message brokers side. I guess it's easier to add a check if the serialized envelope size does not supersede 8kB, else replace the data with a "skipped" value.
Is that a bad thing? I don't necessarily need it to be searchable. |
Until we implement RFC #62 in the PHP SDK, you would likely need to remove all unwanted data inside Enforcing a size limit in the SDK seems reasonable. We do similar things in our RequestIntegration. Not being able to search this data was more of a heads-up to set expectations. |
91dbd44
to
4eb5bc0
Compare
4eb5bc0
to
ed2006b
Compare
@cleptric I have done all the changes I would like, but I'm struggling with the tests. I would like to add a simple E2E test; capture a hard failure, fetch the last event, and see if the expected context is equal to the recorded context. How can I fetch the recorded context in that scenario? (Or do you want me to create a unit test? I thought this was not preferable because then I have to mock |
E2E tests involving the Messenger are already present in the current test suite. All involved classes are here: https://github.com/getsentry/sentry-symfony/tree/master/tests/End2End/App/Messenger Messages are dispatched here, in a controller: https://github.com/getsentry/sentry-symfony/blob/master/tests/End2End/App/Controller/MessengerController.php#L23-L35 Tests are here (and below): https://github.com/getsentry/sentry-symfony/blob/master/tests/End2End/End2EndTest.php#L218-L234 |
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 remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Related: #703. With this PR the message envelope is added to the scope context. Let me know what you think.
Can you give me some pointers on the e2e test to add for this feature? Should I edit this somehow?