Package: odoo-addon-sentry
This module allows painlessSentryintegration with
Odoo.Table of contentsInstallationConfigurationExample Odoo configurationUsageKnown issues / RoadmapBug TrackerCreditsAuthorsContributorsOther creditsMaintainersInstallationThe module can be installed just like any other Odoo module, by adding the
module’s directory to Odooaddons_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 theserver_wide_modulesparameter in your
Odoo config file or with the--loadcommand-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-sdkConfigurationThe following additional configuration options can be added to your Odoo
configuration file:OptionDescriptionDefaultsentry_dsnSentryData Source Name. You can find this value in your Sentry
project configuration. Typically it looks something like this:https://<public_key>:<secret_key>@sentry.example.com/<project id>This is the only required option in order to use the module.''sentry_enabledWhether or not Sentry logging is enabled.Falsesentry_logging_levelThe minimal logging level for which to send reports to Sentry.
Possible values:notset,debug,info,warn,error,critical. It is recommended to have this set to at leastwarn,
to avoid spamming yourself with Sentry events.warnsentry_exclude_loggersA string of comma-separated logger names which should be excluded
from Sentry.werkzeugsentry_ignored_exceptionsA string of comma-separated exceptions which should be ignored.
You can use a star symbol (*) at the end, to ignore all exceptions
from a module, eg.:odoo.exceptions.*.odoo.exceptions.AccessDenied, odoo.exceptions.AccessError, odoo.exceptions.DeferredException, odoo.exceptions.MissingError, odoo.exceptions.RedirectWarning, odoo.exceptions.UserError, odoo.exceptions.ValidationError, odoo.exceptions.Warning, odoo.exceptions.except_ormsentry_include_contextIf enabled, additional context data will be extracted from current
HTTP request and user session (if available). This has no effect
for Cron jobs, as no request/session is available inside a Cron job.Truesentry_releaseExplicitly define a version to be sent as the release version to
Sentry. Useful in conjuntion with Sentry’s “Resolve in the next
release”-functionality. Also useful if your production deployment
does not include any Git context from which a commit might be read.
Overridessentry_odoo_dir.sentry_odoo_dirAbsolute path to your Odoo installation directory. This is optional
and will only be used to extract the Odoo Git commit, which will be
sent to Sentry, to allow to distinguish between Odoo updates.
Overridden bysentry_releaseOtherclient argumentscan be
configured by prepending the argument name withsentry_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 configurationBelow is an example of Odoo configuration file withOdoo Sentryoptions:[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/UsageOnce configured and installed, the module will report any logging event at and
above the configured Sentry logging level, no additional actions are necessary.Known issues / RoadmapNo 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 integratingraven-js. Additionally,Sentry user
feedback formcould be
integrated into the Odoo client error dialog window to allow users shortly
describe what they were doing when things went wrong.Bug TrackerBugs are tracked onGitHub 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 welcomedfeedback.Do not contact contributors directly about support or help with technical issues.CreditsAuthorsMohammed BarsiVersadaNicolas JEUDYVauxooContributorsMohammed 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 creditsVauxooMaintainersThis module is maintained by the OCA.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.Currentmaintainers:This module is part of theOCA/server-toolsproject on GitHub.You are welcome to contribute. To learn how please visithttps://odoo-community.org/page/Contribute.