[19.0][MIG] sentry#3517
Conversation
|
@JohanEndare We continued here, your review is welcome |
|
@ntsirintanis It looks like your last commit are only pre-commit fixes to Johan's commit, so in this case I would just squash them into one. Perhaps also reword his commit message to exclude the draft/untested comments, we're going to assume that once this gets merged it's tested and out of draft, so no need to refer to that. |
d9e7473 to
150bd02
Compare
mpurnell1
left a comment
There was a problem hiding this comment.
Thank you for migrating this module to Odoo 19! I noticed one small issue while porting this code into our database and thought I would bring it to your attention.
415f716 to
be9ecde
Compare
Kiplangatdan
left a comment
There was a problem hiding this comment.
@ntsirintanis Some complains about the unknown option sentry-xx in the odoo.conf file.
Nothing to do with the module but just Odoo 19.0 being strict with conf file.
|
This PR has the |
So it's going to be in the conf file instead of env variables now? Or was it always so? |
* [ADD] sentry module * [FIX] updated sentry module according to PR comments
- [FIX] sentry: fixes missing `raven` library preventing loading of modules - [FIX] 2to3 script on py file - [FIX] add requirements.txt
sentry: It is not always possible to read commit information from a production environment. In those cases it is useful to be able to set a release version manually. [UPD] Update sentry.pot
[UPD] Update sentry.pot
because OCA/maintainer-tools#459 [UPD] Update sentry.pot
fix OCA/maintainer-tools#459 OCA#1776 (comment) Credits sbidoul [UPD] README.rst
…repository Debian Bullseye is used as base docker image for odoo:15.0
To avoid following error: AttributeError: 'InMemoryTransport' object has no attribute 'options'
Fixes
```
File "/home/odoo/.local/lib/python3.12/site-packages/sentry_sdk/client.py", line 595, in _prepare_event
new_event = before_send(event, hint or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/user/oca-server-tools/sentry/hooks.py", line 66, in before_send
if event.setdefault("tags", {})["include_context"]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'include_context'
2025-07-08 14:45:45,907 14296 INFO quatra-18-0-development-21441249 sentry_sdk.errors: before send dropped event
```
Error is only logged when running Sentry in debug mode, otherwise events are dropped silently.
be9ecde to
71015b8
Compare
@JohanEndare The latest commit fixes this issue. It's now using a specific The readme is updated. Please test and review. |
|
@JohanEndare If you are happy I can merge |
If SentryWsgiMiddleware(...) raises during lazy per-instance construction (sentry-sdk bug, OOM, exotic environment), the current code propagates the exception out of Application.__call__ — every request after that hits a stack trace and the app stops serving. Wrap the construction in try/except: on failure, log once and cache the unwrapped bound method as the per-instance "middleware". Subsequent requests skip the failing path entirely so a sentry-side fault degrades gracefully to "no error reporting" instead of "no app". Follow-up to OCA#3517 #4f3abd3b.
|
/ocabot migration sentry /ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
@dnplkndll Did your fix still need to be included here? If so, maybe you can submit a PR after it is merged? |
|
Congratulations, your PR was merged at 650b308. Thanks a lot for contributing to OCA. ❤️ |
#3627 was an add on the client side sentry features for front end error and performance monitoring. hoping to get some interest. I had used the feature to have the errors trigger saving the actual click path on the screens. what needs better review now is how the backend and frontend traces connect. |

Preserving commit history for #3489