BSRD-286: MIG V13 monitoring_statsd

This commit is contained in:
Tonow-c2c
2019-10-08 18:18:58 +02:00
parent 529ae1052f
commit 702b8c2039
3 changed files with 9 additions and 7 deletions
+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()