Skip to content

[19.0][MIG] sentry#3517

Merged
OCA-git-bot merged 54 commits into
OCA:19.0from
Therp:19.0-mig-sentry
May 28, 2026
Merged

[19.0][MIG] sentry#3517
OCA-git-bot merged 54 commits into
OCA:19.0from
Therp:19.0-mig-sentry

Conversation

@ntsirintanis
Copy link
Copy Markdown
Contributor

Preserving commit history for #3489

@thomaspaulb
Copy link
Copy Markdown
Contributor

@JohanEndare We continued here, your review is welcome

@thomaspaulb thomaspaulb marked this pull request as ready for review February 9, 2026 11:12
@thomaspaulb
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

@mpurnell1 mpurnell1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread sentry/hooks.py Outdated
@ntsirintanis ntsirintanis force-pushed the 19.0-mig-sentry branch 2 times, most recently from 415f716 to be9ecde Compare April 21, 2026 12:37
Copy link
Copy Markdown
Member

@Kiplangatdan Kiplangatdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Image

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@JohanEndare
Copy link
Copy Markdown

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

Image

So it's going to be in the conf file instead of env variables now? Or was it always so?

naglis and others added 12 commits April 24, 2026 08:50
* [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
dnplkndll and others added 12 commits April 24, 2026 08:50
…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.
@Kiplangatdan
Copy link
Copy Markdown
Member

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

So it's going to be in the conf file instead of env variables now? Or was it always so?

@JohanEndare The latest commit fixes this issue. It's now using a specific sentry section instead of adding them under the options section.

The readme is updated.

Please test and review.

@thomaspaulb
Copy link
Copy Markdown
Contributor

@JohanEndare If you are happy I can merge

dnplkndll added a commit to ledoent/server-tools that referenced this pull request May 20, 2026
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.
@thomaspaulb
Copy link
Copy Markdown
Contributor

/ocabot migration sentry

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 19.0-ocabot-merge-pr-3517-by-thomaspaulb-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone May 28, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request May 28, 2026
43 tasks
@thomaspaulb
Copy link
Copy Markdown
Contributor

@dnplkndll Did your fix still need to be included here? If so, maybe you can submit a PR after it is merged?

@OCA-git-bot OCA-git-bot merged commit 4c0e0d9 into OCA:19.0 May 28, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 650b308. Thanks a lot for contributing to OCA. ❤️

@dnplkndll
Copy link
Copy Markdown
Contributor

@dnplkndll Did your fix still need to be included here? If so, maybe you can submit a PR after it is merged?

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

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.