You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
5.2 KiB

  1. This module allows painless `Sentry <https://sentry.io/>`__ integration with
  2. Odoo.
  3. ============================= ==================================================================== ==========================================================
  4. Option Description Default
  5. ============================= ==================================================================== ==========================================================
  6. ``sentry_dsn`` Sentry *Data Source Name*. You can find this value in your Sentry ``''``
  7. project configuration. Typically it looks something like this:
  8. *https://<public_key>:<secret_key>@sentry.example.com/<project id>*
  9. This is the only required option in order to use the module.
  10. ``sentry_enabled`` Whether or not Sentry logging is enabled. ``False``
  11. ``sentry_logging_level`` The minimal logging level for which to send reports to Sentry. ``warn``
  12. Possible values: *notset*, *debug*, *info*, *warn*, *error*,
  13. *critical*. It is recommended to have this set to at least *warn*,
  14. to avoid spamming yourself with Sentry events.
  15. ``sentry_exclude_loggers`` A string of comma-separated logger names which should be excluded ``werkzeug``
  16. from Sentry.
  17. ``sentry_ignored_exceptions`` A string of comma-separated exceptions which should be ignored. ``odoo.exceptions.AccessDenied,
  18. You can use a star symbol (*) at the end, to ignore all exceptions odoo.exceptions.AccessError,
  19. from a module, eg.: *odoo.exceptions.**. odoo.exceptions.DeferredException,
  20. odoo.exceptions.MissingError,
  21. odoo.exceptions.RedirectWarning,
  22. odoo.exceptions.UserError,
  23. odoo.exceptions.ValidationError,
  24. odoo.exceptions.Warning,
  25. odoo.exceptions.except_orm``
  26. ``sentry_include_context`` If enabled, additional context data will be extracted from current ``True``
  27. HTTP request and user session (if available). This has no effect
  28. for Cron jobs, as no request/session is available inside a Cron job.
  29. ``sentry_release`` Explicitly define a version to be sent as the release version to
  30. Sentry. Useful in conjuntion with Sentry's "Resolve in the next
  31. release"-functionality. Also useful if your production deployment
  32. does not include any Git context from which a commit might be read.
  33. Overrides *sentry_odoo_dir*.
  34. ``sentry_odoo_dir`` Absolute path to your Odoo installation directory. This is optional
  35. and will only be used to extract the Odoo Git commit, which will be
  36. sent to Sentry, to allow to distinguish between Odoo updates.
  37. Overridden by *sentry_release*
  38. ============================= ==================================================================== ==========================================================
  39. Other `client arguments
  40. <https://docs.sentry.io/platforms/python/configuration/>`_ can be
  41. configured by prepending the argument name with *sentry_* in your Odoo config
  42. file. Currently supported additional client arguments are: ``with_locals,
  43. max_breadcrumbs, release, environment, server_name, shutdown_timeout,
  44. in_app_include, in_app_exclude, default_integrations, dist, sample_rate,
  45. send_default_pii, http_proxy, https_proxy, request_bodies, debug,
  46. attach_stacktrace, ca_certs, propagate_traces, traces_sample_rate,
  47. auto_enabling_integrations``.
  48. Example Odoo configuration
  49. --------------------------
  50. Below is an example of Odoo configuration file with *Odoo Sentry* options::
  51. [options]
  52. sentry_dsn = https://<public_key>:<secret_key>@sentry.example.com/<project id>
  53. sentry_enabled = true
  54. sentry_logging_level = warn
  55. sentry_exclude_loggers = werkzeug
  56. sentry_ignore_exceptions = odoo.exceptions.AccessDenied,
  57. odoo.exceptions.AccessError,odoo.exceptions.MissingError,
  58. odoo.exceptions.RedirectWarning,odoo.exceptions.UserError,
  59. odoo.exceptions.ValidationError,odoo.exceptions.Warning,
  60. odoo.exceptions.except_orm
  61. sentry_include_context = true
  62. sentry_environment = production
  63. sentry_release = 1.3.2
  64. sentry_odoo_dir = /home/odoo/odoo/