9 azure backport (#353)

* fix: backport fix + backport modules to azure
This commit is contained in:
Vincent Renaville
2022-03-15 10:27:02 +01:00
committed by GitHub
co-authored by GitHub
parent 92bf8210ef
commit 61a7d392ff
19 changed files with 332 additions and 26 deletions
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from __future__ import absolute_import
import logging
from openerp.http import Controller, route
_logger = logging.getLogger(__name__)
try:
from prometheus_client import generate_latest
except (ImportError, IOError), err:
_logger.warning(err)
class PrometheusController(Controller):
@route(u'/metrics', auth=u'public')
def metrics(self):
return generate_latest()