Commit Graph

9 Commits (38a0546ff17159ce2d53b786d965da3ef67cdd3a)

Author SHA1 Message Date
Atte Isopuro ced4efc61e [FIX] sentry: test failure due to incomplete transport init
The test code uses a "mock" Transport object to ensure that events are
stored locally in memory, instead of triggering network requests.

The Sentry client is cleaned up once done, and this triggers a call to
capture_envelope, a different way of sending events to Sentry. Since
our mock class did not fully complete initialization, and also did
not provide an overriding method, the original was called, which
depends on proper initialization to work.

We introduce an override for capture_envelope: as it is meant to be
a "sibling" to capture_event, it makes sense for us to also make sure
events registrered in this way are intercepted, even if we don't
currently expect any of our tests to explicitly cause it to be used.
2022-10-20 09:53:12 +03:00
Fernanda Hernandez da6cae3ba8 [IMP] sentry: migrate sentry-raven to new api sentry-sdk 2022-10-20 09:53:12 +03:00
Travis Waelbroeck 5726e6619a [FIX] sentry: enable use of "sentry_odoo_dir" config parameter
Allow using `sentry_release` or `sentry_odoo_dir` in the Odoo
configuration file.

Previously, the `sentry_odoo_dir` was never actually respected. It would
always be overridden by `sentry_release`. Even if `sentry_release` is
not set, it will use an empty value instead of using `sentry_odoo_dir`
to find the Git commit hash.

After this commit, the `sentry_release` parameter still takes
precedence. However, if `sentry_release` is not set and
`sentry_odoo_dir` is set, then `sentry_odoo_dir` will be used to find
the appropriate Git commit hash, which will be used as the `release`
value.

Both cases are covered by the added unit tests.
2022-10-20 09:53:12 +03:00
Travis Waelbroeck a38382b7c6 [MIG] sentry: Migration to 14.0 2022-10-20 09:53:12 +03:00
Ivan 3cf04228e0 [IMP] sentry: black, isort 2022-10-20 09:53:12 +03:00
Simone Orsi 610fac7938 Global pylint cleanup 2022-10-20 09:53:12 +03:00
Naglis Jonaitis 777724fb3d [MIG] sentry to V11
- [FIX] sentry: fixes missing `raven` library preventing loading of modules
- [FIX] 2to3 script on py file
- [FIX] add requirements.txt
2022-10-20 09:53:12 +03:00
Naglis Jonaitis cd9e53d934 [FIX] sentry: fixes missing `raven` library preventing loading of modules
Related: #761 #879 #881
2022-10-20 09:53:12 +03:00
Naglis Jonaitis f8c404c053 [ADD] sentry module (#761)
* [ADD] sentry module

* [FIX] updated sentry module according to PR comments
2022-10-20 09:53:12 +03:00