server-tools/sentry
OCA-git-bot 33d7a8ea23 [BOT] post-merge updates 2024-05-14 14:06:51 +00:00
..
i18n [UPD] Update sentry.pot 2024-05-14 14:04:22 +00:00
readme [IMP] sentry: pre-commit auto fixes 2024-05-13 12:26:04 +03:00
static/description [BOT] post-merge updates 2024-05-14 14:06:51 +00:00
tests [IMP] Add tests to increase coverage 2024-05-13 12:26:04 +03:00
README.rst [BOT] post-merge updates 2024-05-14 14:06:51 +00:00
__init__.py [IMP] sentry: migrate sentry-raven to new api sentry-sdk 2024-05-13 12:22:13 +03:00
__manifest__.py [MIG] sentry: Migration to 17.0 2024-05-13 12:26:04 +03:00
const.py [FIX] sentry: respect sentry_logging_level 2024-05-13 12:22:13 +03:00
generalutils.py [IMP] sentry: pre-commit manual fixes 2024-05-13 12:26:04 +03:00
hooks.py [IMP] sentry: pre-commit manual fixes 2024-05-13 12:26:04 +03:00
logutils.py [IMP] sentry: pre-commit manual fixes 2024-05-13 12:26:04 +03:00
processor.py [IMP] sentry: pre-commit manual fixes 2024-05-13 12:26:04 +03:00
pyproject.toml [IMP] sentry: pre-commit auto fixes 2024-05-13 12:26:04 +03:00

README.rst

======
Sentry
======

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:fb1e0787f353def76b80f3aae5948d0b7a9b01d35f2f738a5b96fa28588bab0e
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
    :target: https://github.com/OCA/server-tools/tree/17.0/sentry
    :alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-sentry
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows painless `Sentry <https://sentry.io/>`__ integration
with Odoo.

**Table of contents**

.. contents::
   :local:

Installation
============

The module can be installed just like any other Odoo module, by adding
the module's directory to Odoo *addons_path*. In order for the module to
correctly wrap the Odoo WSGI application, it also needs to be loaded as
a server-wide module. This can be done with the ``server_wide_modules``
parameter in your Odoo config file or with the ``--load`` command-line
parameter.

This module additionally requires the sentry-sdk Python package to be
available on the system. It can be installed using pip:

::

   pip install sentry-sdk

Configuration
=============

The following additional configuration options can be added to your Odoo
configuration file:

[TABLE]

Other `client
arguments <https://docs.sentry.io/platforms/python/configuration/>`__
can be configured by prepending the argument name with *sentry\_* in
your Odoo config file. Currently supported additional client arguments
are:
``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``.

Example Odoo configuration
--------------------------

Below is an example of Odoo configuration file with *Odoo Sentry*
options:

::

   [options]
   sentry_dsn = https://<public_key>:<secret_key>@sentry.example.com/<project id>
   sentry_enabled = true
   sentry_logging_level = warn
   sentry_exclude_loggers = werkzeug
   sentry_ignore_exceptions = odoo.exceptions.AccessDenied,
       odoo.exceptions.AccessError,odoo.exceptions.MissingError,
       odoo.exceptions.RedirectWarning,odoo.exceptions.UserError,
       odoo.exceptions.ValidationError,odoo.exceptions.Warning,
       odoo.exceptions.except_orm
   sentry_include_context = true
   sentry_environment = production
   sentry_release = 1.3.2
   sentry_odoo_dir = /home/odoo/odoo/

Usage
=====

Once configured and installed, the module will report any logging event
at and above the configured Sentry logging level, no additional actions
are necessary.

|Try me on Runbot|

.. |Try me on Runbot| image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
   :target: https://runbot.odoo-community.org/runbot/149/14.0

Known issues / Roadmap
======================

-  **No database separation** -- This module functions by intercepting
   all Odoo logging records in a running Odoo process. This means that
   once installed in one database, it will intercept and report errors
   for all Odoo databases, which are used on that Odoo server.
-  **Frontend integration** -- In the future, it would be nice to add
   Odoo client-side error reporting to this module as well, by
   integrating `raven-js <https://github.com/getsentry/raven-js>`__.
   Additionally, `Sentry user feedback
   form <https://docs.sentry.io/learn/user-feedback/>`__ could be
   integrated into the Odoo client error dialog window to allow users
   shortly describe what they were doing when things went wrong.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20sentry%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Mohammed Barsi
* Versada
* Nicolas JEUDY
* Vauxoo

Contributors
------------

-  Mohammed Barsi <barsintod@gmail.com>
-  Andrius Preimantas <andrius@versada.eu>
-  Naglis Jonaitis <naglis@versada.eu>
-  Atte Isopuro <atte.isopuro@avoin.systems>
-  Florian Mounier <florian.mounier@akretion.com>
-  Jon Ashton <jon@monkeyinferno.com>
-  Mark Schuit <mark@gig.solutions>

Other credits
-------------

-  Vauxoo

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-barsi| image:: https://github.com/barsi.png?size=40px
    :target: https://github.com/barsi
    :alt: barsi
.. |maintainer-naglis| image:: https://github.com/naglis.png?size=40px
    :target: https://github.com/naglis
    :alt: naglis
.. |maintainer-versada| image:: https://github.com/versada.png?size=40px
    :target: https://github.com/versada
    :alt: versada
.. |maintainer-moylop260| image:: https://github.com/moylop260.png?size=40px
    :target: https://github.com/moylop260
    :alt: moylop260
.. |maintainer-fernandahf| image:: https://github.com/fernandahf.png?size=40px
    :target: https://github.com/fernandahf
    :alt: fernandahf

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-barsi| |maintainer-naglis| |maintainer-versada| |maintainer-moylop260| |maintainer-fernandahf| 

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/sentry>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.