|
| 1 | +.. image:: https://odoo-community.org/readme-banner-image |
| 2 | + :target: https://odoo-community.org/get-involved?utm_source=readme |
| 3 | + :alt: Odoo Community Association |
| 4 | + |
| 5 | +====== |
| 6 | +Sentry |
| 7 | +====== |
| 8 | + |
| 9 | +.. |
| 10 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | + !! This file is generated by oca-gen-addon-readme !! |
| 12 | + !! changes will be overwritten. !! |
| 13 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | + !! source digest: sha256:e2f1d0bc83bf031b61df768de9c2f6d4f1feb303facf171a8d1889fc6a2635ca |
| 15 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 16 | +
|
| 17 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 18 | + :target: https://odoo-community.org/page/development-status |
| 19 | + :alt: Beta |
| 20 | +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png |
| 21 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 22 | + :alt: License: AGPL-3 |
| 23 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github |
| 24 | + :target: https://github.com/OCA/server-tools/tree/19.0/sentry |
| 25 | + :alt: OCA/server-tools |
| 26 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 27 | + :target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-sentry |
| 28 | + :alt: Translate me on Weblate |
| 29 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 30 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0 |
| 31 | + :alt: Try me on Runboat |
| 32 | + |
| 33 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 34 | + |
| 35 | +This module allows painless `Sentry <https://sentry.io/>`__ integration |
| 36 | +with Odoo. |
| 37 | + |
| 38 | +**Table of contents** |
| 39 | + |
| 40 | +.. contents:: |
| 41 | + :local: |
| 42 | + |
| 43 | +Installation |
| 44 | +============ |
| 45 | + |
| 46 | +The module can be installed just like any other Odoo module, by adding |
| 47 | +the module's directory to Odoo *addons_path*. In order for the module to |
| 48 | +correctly wrap the Odoo WSGI application, it also needs to be loaded as |
| 49 | +a server-wide module. This can be done with the ``server_wide_modules`` |
| 50 | +parameter in your Odoo config file or with the ``--load`` command-line |
| 51 | +parameter. |
| 52 | + |
| 53 | +This module additionally requires the sentry-sdk Python package to be |
| 54 | +available on the system. It can be installed using pip: |
| 55 | + |
| 56 | +:: |
| 57 | + |
| 58 | + pip install sentry-sdk |
| 59 | + |
| 60 | +Configuration |
| 61 | +============= |
| 62 | + |
| 63 | +The following additional configuration options can be added to your Odoo |
| 64 | +configuration file: |
| 65 | + |
| 66 | +[TABLE] |
| 67 | + |
| 68 | +Other `client |
| 69 | +arguments <https://docs.sentry.io/platforms/python/configuration/>`__ |
| 70 | +can be configured by prepending the argument name with *sentry\_* in |
| 71 | +your Odoo config file. Currently supported additional client arguments |
| 72 | +are: |
| 73 | +``with_locals, max_breadcrumbs, release, environment, server_name, shutdown_timeout, in_app_include, in_app_exclude, default_integrations, dist, sample_rate, send_default_pii, http_proxy, https_proxy, request_bodies, debug, attach_stacktrace, ca_certs, propagate_traces, traces_sample_rate, auto_enabling_integrations``. |
| 74 | + |
| 75 | +Example Odoo configuration |
| 76 | +-------------------------- |
| 77 | + |
| 78 | +Below is an example of Odoo configuration file with *Odoo Sentry* |
| 79 | +options: |
| 80 | + |
| 81 | +:: |
| 82 | + |
| 83 | + [options] |
| 84 | + sentry_dsn = https://<public_key>:<secret_key>@sentry.example.com/<project id> |
| 85 | + sentry_enabled = true |
| 86 | + sentry_logging_level = warn |
| 87 | + sentry_exclude_loggers = werkzeug |
| 88 | + sentry_ignore_exceptions = odoo.exceptions.AccessDenied, |
| 89 | + odoo.exceptions.AccessError,odoo.exceptions.MissingError, |
| 90 | + odoo.exceptions.RedirectWarning,odoo.exceptions.UserError, |
| 91 | + odoo.exceptions.ValidationError,odoo.exceptions.Warning, |
| 92 | + odoo.exceptions.except_orm |
| 93 | + sentry_include_context = true |
| 94 | + sentry_environment = production |
| 95 | + sentry_release = 1.3.2 |
| 96 | + sentry_odoo_dir = /home/odoo/odoo/ |
| 97 | + |
| 98 | +Usage |
| 99 | +===== |
| 100 | + |
| 101 | +Once configured and installed, the module will report any logging event |
| 102 | +at and above the configured Sentry logging level, no additional actions |
| 103 | +are necessary. |
| 104 | + |
| 105 | +|Try me on Runbot| |
| 106 | + |
| 107 | +.. |Try me on Runbot| image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
| 108 | + :target: https://runbot.odoo-community.org/runbot/149/14.0 |
| 109 | + |
| 110 | +Known issues / Roadmap |
| 111 | +====================== |
| 112 | + |
| 113 | +- **No database separation** -- This module functions by intercepting |
| 114 | + all Odoo logging records in a running Odoo process. This means that |
| 115 | + once installed in one database, it will intercept and report errors |
| 116 | + for all Odoo databases, which are used on that Odoo server. |
| 117 | +- **Frontend integration** -- In the future, it would be nice to add |
| 118 | + Odoo client-side error reporting to this module as well, by |
| 119 | + integrating `raven-js <https://github.com/getsentry/raven-js>`__. |
| 120 | + Additionally, `Sentry user feedback |
| 121 | + form <https://docs.sentry.io/learn/user-feedback/>`__ could be |
| 122 | + integrated into the Odoo client error dialog window to allow users |
| 123 | + shortly describe what they were doing when things went wrong. |
| 124 | + |
| 125 | +Bug Tracker |
| 126 | +=========== |
| 127 | + |
| 128 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. |
| 129 | +In case of trouble, please check there if your issue has already been reported. |
| 130 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 131 | +`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20sentry%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 132 | + |
| 133 | +Do not contact contributors directly about support or help with technical issues. |
| 134 | + |
| 135 | +Credits |
| 136 | +======= |
| 137 | + |
| 138 | +Authors |
| 139 | +------- |
| 140 | + |
| 141 | +* Mohammed Barsi |
| 142 | +* Versada |
| 143 | +* Nicolas JEUDY |
| 144 | +* Vauxoo |
| 145 | + |
| 146 | +Contributors |
| 147 | +------------ |
| 148 | + |
| 149 | +- Mohammed Barsi <barsintod@gmail.com> |
| 150 | +- Andrius Preimantas <andrius@versada.eu> |
| 151 | +- Naglis Jonaitis <naglis@versada.eu> |
| 152 | +- Atte Isopuro <atte.isopuro@avoin.systems> |
| 153 | +- Florian Mounier <florian.mounier@akretion.com> |
| 154 | +- Jon Ashton <jon@monkeyinferno.com> |
| 155 | +- Mark Schuit <mark@gig.solutions> |
| 156 | +- Atchuthan <atchuthan@sodexis.com> |
| 157 | + |
| 158 | +Other credits |
| 159 | +------------- |
| 160 | + |
| 161 | +- Vauxoo |
| 162 | + |
| 163 | +Maintainers |
| 164 | +----------- |
| 165 | + |
| 166 | +This module is maintained by the OCA. |
| 167 | + |
| 168 | +.. image:: https://odoo-community.org/logo.png |
| 169 | + :alt: Odoo Community Association |
| 170 | + :target: https://odoo-community.org |
| 171 | + |
| 172 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 173 | +mission is to support the collaborative development of Odoo features and |
| 174 | +promote its widespread use. |
| 175 | + |
| 176 | +.. |maintainer-barsi| image:: https://github.com/barsi.png?size=40px |
| 177 | + :target: https://github.com/barsi |
| 178 | + :alt: barsi |
| 179 | +.. |maintainer-naglis| image:: https://github.com/naglis.png?size=40px |
| 180 | + :target: https://github.com/naglis |
| 181 | + :alt: naglis |
| 182 | +.. |maintainer-versada| image:: https://github.com/versada.png?size=40px |
| 183 | + :target: https://github.com/versada |
| 184 | + :alt: versada |
| 185 | +.. |maintainer-moylop260| image:: https://github.com/moylop260.png?size=40px |
| 186 | + :target: https://github.com/moylop260 |
| 187 | + :alt: moylop260 |
| 188 | +.. |maintainer-fernandahf| image:: https://github.com/fernandahf.png?size=40px |
| 189 | + :target: https://github.com/fernandahf |
| 190 | + :alt: fernandahf |
| 191 | + |
| 192 | +Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: |
| 193 | + |
| 194 | +|maintainer-barsi| |maintainer-naglis| |maintainer-versada| |maintainer-moylop260| |maintainer-fernandahf| |
| 195 | + |
| 196 | +This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/sentry>`_ project on GitHub. |
| 197 | + |
| 198 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments