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.

225 lines
10 KiB

  1. ======
  2. Sentry
  3. ======
  4. .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  5. !! This file is generated by oca-gen-addon-readme !!
  6. !! changes will be overwritten. !!
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
  9. :target: https://odoo-community.org/page/development-status
  10. :alt: Beta
  11. .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  13. :alt: License: AGPL-3
  14. .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
  15. :target: https://github.com/OCA/server-tools/tree/12.0/sentry
  16. :alt: OCA/server-tools
  17. .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
  18. :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-sentry
  19. :alt: Translate me on Weblate
  20. .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
  21. :target: https://runbot.odoo-community.org/runbot/149/12.0
  22. :alt: Try me on Runbot
  23. |badge1| |badge2| |badge3| |badge4| |badge5|
  24. This module allows painless `Sentry <https://sentry.io/>`__ integration with
  25. Odoo.
  26. ============================= ==================================================================== ==========================================================
  27. Option Description Default
  28. ============================= ==================================================================== ==========================================================
  29. ``sentry_dsn`` Sentry *Data Source Name*. You can find this value in your Sentry ``''``
  30. project configuration. Typically it looks something like this:
  31. *https://<public_key>:<secret_key>@sentry.example.com/<project id>*
  32. This is the only required option in order to use the module.
  33. ``sentry_enabled`` Whether or not Sentry logging is enabled. ``False``
  34. ``sentry_logging_level`` The minimal logging level for which to send reports to Sentry. ``warn``
  35. Possible values: *notset*, *debug*, *info*, *warn*, *error*,
  36. *critical*. It is recommended to have this set to at least *warn*,
  37. to avoid spamming yourself with Sentry events.
  38. ``sentry_exclude_loggers`` A string of comma-separated logger names which should be excluded ``werkzeug``
  39. from Sentry.
  40. ``sentry_ignored_exceptions`` A string of comma-separated exceptions which should be ignored. ``odoo.exceptions.AccessDenied,
  41. You can use a star symbol (*) at the end, to ignore all exceptions odoo.exceptions.AccessError,
  42. from a module, eg.: *odoo.exceptions.**. odoo.exceptions.DeferredException,
  43. odoo.exceptions.MissingError,
  44. odoo.exceptions.RedirectWarning,
  45. odoo.exceptions.UserError,
  46. odoo.exceptions.ValidationError,
  47. odoo.exceptions.Warning,
  48. odoo.exceptions.except_orm``
  49. ``sentry_include_context`` If enabled, additional context data will be extracted from current ``True``
  50. HTTP request and user session (if available). This has no effect
  51. for Cron jobs, as no request/session is available inside a Cron job.
  52. ``sentry_release`` Explicitly define a version to be sent as the release version to
  53. Sentry. Useful in conjuntion with Sentry's "Resolve in the next
  54. release"-functionality. Also useful if your production deployment
  55. does not include any Git context from which a commit might be read.
  56. Overrides *sentry_odoo_dir*.
  57. ``sentry_odoo_dir`` Absolute path to your Odoo installation directory. This is optional
  58. and will only be used to extract the Odoo Git commit, which will be
  59. sent to Sentry, to allow to distinguish between Odoo updates.
  60. Overridden by *sentry_release*
  61. ============================= ==================================================================== ==========================================================
  62. Other `client arguments
  63. <https://docs.sentry.io/platforms/python/configuration/>`_ can be
  64. configured by prepending the argument name with *sentry_* in your Odoo config
  65. file. Currently supported additional client arguments are: ``with_locals,
  66. max_breadcrumbs, release, environment, server_name, shutdown_timeout,
  67. in_app_include, in_app_exclude, default_integrations, dist, sample_rate,
  68. send_default_pii, http_proxy, https_proxy, request_bodies, debug,
  69. attach_stacktrace, ca_certs, propagate_traces, traces_sample_rate,
  70. auto_enabling_integrations``.
  71. Example Odoo configuration
  72. --------------------------
  73. Below is an example of Odoo configuration file with *Odoo Sentry* options::
  74. [options]
  75. sentry_dsn = https://<public_key>:<secret_key>@sentry.example.com/<project id>
  76. sentry_enabled = true
  77. sentry_logging_level = warn
  78. sentry_exclude_loggers = werkzeug
  79. sentry_ignore_exceptions = odoo.exceptions.AccessDenied,
  80. odoo.exceptions.AccessError,odoo.exceptions.MissingError,
  81. odoo.exceptions.RedirectWarning,odoo.exceptions.UserError,
  82. odoo.exceptions.ValidationError,odoo.exceptions.Warning,
  83. odoo.exceptions.except_orm
  84. sentry_include_context = true
  85. sentry_environment = production
  86. sentry_release = 1.3.2
  87. sentry_odoo_dir = /home/odoo/odoo/
  88. **Table of contents**
  89. .. contents::
  90. :local:
  91. Installation
  92. ============
  93. The module can be installed just like any other Odoo module, by adding the
  94. module's directory to Odoo *addons_path*. In order for the module to correctly
  95. wrap the Odoo WSGI application, it also needs to be loaded as a server-wide
  96. module. This can be done with the ``server_wide_modules`` parameter in your
  97. Odoo config file or with the ``--load`` command-line parameter.
  98. This module additionally requires the sentry-sdk Python package to be available on
  99. the system. It can be installed using pip::
  100. pip install sentry-sdk
  101. Configuration
  102. =============
  103. The following additional configuration options can be added to your Odoo
  104. configuration file:
  105. Usage
  106. =====
  107. Once configured and installed, the module will report any logging event at and
  108. above the configured Sentry logging level, no additional actions are necessary.
  109. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  110. :alt: Try me on Runbot
  111. :target: https://runbot.odoo-community.org/runbot/149/10.0
  112. Known issues / Roadmap
  113. ======================
  114. * **No database separation** -- This module functions by intercepting all Odoo
  115. logging records in a running Odoo process. This means that once installed in
  116. one database, it will intercept and report errors for all Odoo databases,
  117. which are used on that Odoo server.
  118. * **Frontend integration** -- In the future, it would be nice to add
  119. Odoo client-side error reporting to this module as well, by integrating
  120. `raven-js <https://github.com/getsentry/raven-js>`_. Additionally, `Sentry user
  121. feedback form <https://docs.sentry.io/learn/user-feedback/>`_ could be
  122. integrated into the Odoo client error dialog window to allow users shortly
  123. describe what they were doing when things went wrong.
  124. Bug Tracker
  125. ===========
  126. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
  127. In case of trouble, please check there if your issue has already been reported.
  128. If you spotted it first, help us smashing it by providing a detailed and welcomed
  129. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20sentry%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  130. Do not contact contributors directly about support or help with technical issues.
  131. Credits
  132. =======
  133. Authors
  134. ~~~~~~~
  135. * Mohammed Barsi
  136. * Versada
  137. * Nicolas JEUDY
  138. * Vauxoo
  139. Contributors
  140. ~~~~~~~~~~~~
  141. * Mohammed Barsi <barsintod@gmail.com>
  142. * Andrius Preimantas <andrius@versada.eu>
  143. * Naglis Jonaitis <naglis@versada.eu>
  144. * Atte Isopuro <atte.isopuro@avoin.systems>
  145. Other credits
  146. ~~~~~~~~~~~~~
  147. * Vauxoo
  148. Maintainers
  149. ~~~~~~~~~~~
  150. This module is maintained by the OCA.
  151. .. image:: https://odoo-community.org/logo.png
  152. :alt: Odoo Community Association
  153. :target: https://odoo-community.org
  154. OCA, or the Odoo Community Association, is a nonprofit organization whose
  155. mission is to support the collaborative development of Odoo features and
  156. promote its widespread use.
  157. .. |maintainer-barsi| image:: https://github.com/barsi.png?size=40px
  158. :target: https://github.com/barsi
  159. :alt: barsi
  160. .. |maintainer-naglis| image:: https://github.com/naglis.png?size=40px
  161. :target: https://github.com/naglis
  162. :alt: naglis
  163. .. |maintainer-versada| image:: https://github.com/versada.png?size=40px
  164. :target: https://github.com/versada
  165. :alt: versada
  166. .. |maintainer-moylop260| image:: https://github.com/moylop260.png?size=40px
  167. :target: https://github.com/moylop260
  168. :alt: moylop260
  169. .. |maintainer-fernandahf| image:: https://github.com/fernandahf.png?size=40px
  170. :target: https://github.com/fernandahf
  171. :alt: fernandahf
  172. Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
  173. |maintainer-barsi| |maintainer-naglis| |maintainer-versada| |maintainer-moylop260| |maintainer-fernandahf|
  174. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/sentry>`_ project on GitHub.
  175. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.