From 7bbe60b37cb37506d01fb9ac5e26030de2ea71ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20L=C3=B3pez?= Date: Mon, 8 Jun 2020 13:36:44 -0500 Subject: [PATCH] [REF] sentry: Fix sentry title level fix https://github.com/OCA/maintainer-tools/issues/459 https://github.com/OCA/server-tools/pull/1776#discussion_r436904679 Credits sbidoul [UPD] README.rst --- sentry/README.rst | 8 +- sentry/readme/CONFIGURE.rst | 2 +- sentry/static/description/index.html | 569 +++++++++++++++++++++++++++ 3 files changed, 574 insertions(+), 5 deletions(-) create mode 100644 sentry/static/description/index.html diff --git a/sentry/README.rst b/sentry/README.rst index 586b8b70b..3e5025488 100644 --- a/sentry/README.rst +++ b/sentry/README.rst @@ -101,7 +101,7 @@ include_paths, exclude_paths, machine, auto_log_stacks, capture_locals, string_max_length, list_max_length, site, include_versions, environment``. Example Odoo configuration --------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~ Below is an example of Odoo configuration file with *Odoo Sentry* options:: @@ -158,14 +158,14 @@ Credits ======= Authors -------- +~~~~~~~ * Mohammed Barsi * Versada * Nicolas JEUDY Contributors ------------- +~~~~~~~~~~~~ * Mohammed Barsi * Andrius Preimantas @@ -173,7 +173,7 @@ Contributors * Atte Isopuro Maintainers ------------ +~~~~~~~~~~~ This module is maintained by the OCA. diff --git a/sentry/readme/CONFIGURE.rst b/sentry/readme/CONFIGURE.rst index b25069628..ac71b0876 100644 --- a/sentry/readme/CONFIGURE.rst +++ b/sentry/readme/CONFIGURE.rst @@ -63,7 +63,7 @@ include_paths, exclude_paths, machine, auto_log_stacks, capture_locals, string_max_length, list_max_length, site, include_versions, environment``. Example Odoo configuration --------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~ Below is an example of Odoo configuration file with *Odoo Sentry* options:: diff --git a/sentry/static/description/index.html b/sentry/static/description/index.html new file mode 100644 index 000000000..e191be255 --- /dev/null +++ b/sentry/static/description/index.html @@ -0,0 +1,569 @@ + + + + + + +Sentry + + + +
+

Sentry

+ + +

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

+

This module allows painless Sentry integration with +Odoo.

+

Table of contents

+ +
+

Configuration

+

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

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescriptionDefault
sentry_dsnSentry Data 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.False
sentry_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 least warn, +to avoid spamming yourself with Sentry events.warn
sentry_exclude_loggersA string of comma-separated logger names which should be excluded +from Sentry.werkzeug
sentry_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_orm
sentry_processorsA string of comma-separated processor classes which will be applied +on an event before sending it to Sentry.raven.processors.SanitizePasswordsProcessor, +odoo.addons.sentry.logutils.SanitizeOdooCookiesProcessor
sentry_transportTransport class which will be used to send events to Sentry. +Possible values: threaded: spawns an async worker for processing +messages, synchronous: a synchronous blocking transport; +requests_threaded: an asynchronous transport using the requests +library; requests_synchronous - blocking transport using the +requests library.threaded
sentry_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.True
sentry_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. +Overrides sentry_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 by sentry_release 
+

Other client arguments can be +configured by prepending the argument name with sentry_ in your Odoo config +file. Currently supported additional client arguments are: install_sys_hook, +include_paths, exclude_paths, machine, auto_log_stacks, capture_locals, +string_max_length, list_max_length, site, include_versions, environment.

+
+

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_processors = raven.processors.SanitizePasswordsProcessor,odoo.addons.sentry.logutils.SanitizeOdooCookiesProcessor
+sentry_transport = threaded
+sentry_include_context = true
+sentry_environment = production
+sentry_auto_log_stacks = false
+sentry_odoo_dir = /home/odoo/odoo/
+sentry_release = 1.3.2
+
+
+
+
+

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 smashing 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
  • +
+
+
+

Contributors

+ +
+
+

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.

+

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.

+
+
+
+ +