Skip to main content

Report Odoo errors to Sentry

Project description

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This module allows painless Sentry integration with Odoo.

Table of contents

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

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. Additionally, Sentry user feedback form 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. 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.

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

Credits

Authors

  • Mohammed Barsi

  • Versada

  • Nicolas JEUDY

  • Vauxoo

Contributors

Other credits

  • Vauxoo

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

Current maintainers:

barsi naglis versada moylop260 fernandahf

This module is part of the OCA/server-tools project on GitHub.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

odoo_addon_sentry-17.0.1.0.0.3-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file odoo_addon_sentry-17.0.1.0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_sentry-17.0.1.0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 234b1333b8f31290b2324065abc1cc7e3aebb57d8fa1643a0fefc06bad9ef115
MD5 b26fb2f284d016587d7976adf8f00364
BLAKE2b-256 248ea4aac15193dc25f196cd7c3edada390ef8ded6c9ecce4c7b0d8a657c2eb0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page