Merge pull request #90 from Tonow-c2c/BSRD-286_MIG-13.0_monitoring_statsd

BSRD-286: MIG V13 monitoring_statsd
This commit is contained in:
Tonow-c2c
2019-11-08 14:33:26 +01:00
committed by GitHub
co-authored by GitHub
3 changed files with 9 additions and 7 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
# Copyright 2016-2018 Camptocamp SA
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{'name': 'Monitoring: Statsd Metrics',
'version': '12.0.1.0.0',
'version': '13.0.1.0.0',
'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'category',
@@ -16,5 +16,5 @@
'external_dependencies': {
'python': ['statsd'],
},
'installable': False,
'installable': True,
}
+4 -4
View File
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo import models
@@ -13,11 +13,11 @@ class IrHttp(models.AbstractModel):
@classmethod
def _dispatch(cls):
if not statsd:
return super(IrHttp, cls)._dispatch()
return super()._dispatch()
path_info = request.httprequest.environ.get('PATH_INFO')
if path_info.startswith('/longpolling/'):
return super(IrHttp, cls)._dispatch()
return super()._dispatch()
parts = ['http', ]
if path_info.startswith('/web/dataset/call_button'):
@@ -38,4 +38,4 @@ class IrHttp(models.AbstractModel):
]
with statsd.timer('.'.join(parts)):
return super(IrHttp, cls)._dispatch()
return super()._dispatch()
+2
View File
@@ -1,3 +1,5 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging
import os