Enable setting a release option directly
sentry: It is not always possible to read commit information from a production environment. In those cases it is useful to be able to set a release version manually. [UPD] Update sentry.potpull/2516/head
parent
44d39be740
commit
bcdfca304b
|
@ -71,9 +71,16 @@ configuration file:
|
|||
HTTP request and user session (if available). This has no effect
|
||||
for Cron jobs, as no request/session is available inside a Cron job.
|
||||
|
||||
``sentry_release`` Explicitly 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_dir`` Absolute 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
|
||||
|
@ -100,6 +107,7 @@ Below is an example of Odoo configuration file with *Odoo Sentry* options::
|
|||
sentry_environment = production
|
||||
sentry_auto_log_stacks = false
|
||||
sentry_odoo_dir = /home/odoo/odoo/
|
||||
sentry_release = 1.3.2
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
@ -148,6 +156,7 @@ Contributors
|
|||
* Mohammed Barsi <barsintod@gmail.com>
|
||||
* Andrius Preimantas <andrius@versada.eu>
|
||||
* Naglis Jonaitis <naglis@versada.eu>
|
||||
* Atte Isopuro <atte.isopuro@avoin.systems>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
|
|
@ -43,8 +43,11 @@ def initialize_raven(config, client_cls=None):
|
|||
enabled = config.get('sentry_enabled', False)
|
||||
if not (HAS_RAVEN and enabled):
|
||||
return
|
||||
|
||||
if config.get('sentry_odoo_dir') and config.get('sentry_release'):
|
||||
_logger.debug('Both sentry_odoo_dir and sentry_release defined, choosing sentry_release')
|
||||
options = {
|
||||
'release': get_odoo_commit(config.get('sentry_odoo_dir')),
|
||||
'release': config.get('sentry_release', get_odoo_commit(config.get('sentry_odoo_dir'))),
|
||||
}
|
||||
for option in const.get_sentry_options():
|
||||
value = config.get('sentry_%s' % option.key, option.default)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
'name': 'Sentry',
|
||||
'summary': 'Report Odoo errors to Sentry',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '11.0.1.1.0',
|
||||
'category': 'Extra Tools',
|
||||
'website': 'https://odoo-community.org/',
|
||||
'author': 'Mohammed Barsi,'
|
||||
|
|
|
@ -86,4 +86,5 @@ def get_sentry_options():
|
|||
'ignore_exceptions', DEFAULT_IGNORED_EXCEPTIONS, split_multiple),
|
||||
SentryOption('processors', DEFAULT_PROCESSORS, split_multiple),
|
||||
SentryOption('environment', None, None),
|
||||
SentryOption('release', None, None),
|
||||
]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
Loading…
Reference in New Issue