Commit 4c29408f authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

merge

Pipeline #68699 failed with stages
in 35 seconds
......@@ -11,6 +11,7 @@ include:
file:
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
- "templates/lint/flake8.yml" # will do the equivalent of 'tox -e flake8'
- "templates/lint/black.yml" # will do the equivalent of 'tox -e black'
- "templates/lint/check-manifest.yml" # will do the equivalent of 'tox -e check-manifest'
- "templates/lint/yamllint.yml" # will do the equivalent of 'tox -e yamllint'
- "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3'
......
# -*- coding: utf-8 -*-
# copyright 2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2021-2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......@@ -134,7 +134,7 @@ def tween_factory(handler, registry):
if "time_routes" in PD_METRICS:
PD_METRICS["time_routes"].labels(route_name).inc(duration)
if "slow_routes" in PD_METRICS and duration > SLOW_REQUEST_THRESHOLD:
PD_METRICS["slow_route"].labels(route_name).inc()
PD_METRICS["slow_routes"].labels(route_name).inc()
if "http_requests" in PD_METRICS:
PD_METRICS["http_requests"].labels(
method=request.method,
......
#!/usr/bin/env python
# pylint: disable=W0142,W0403,W0404,W0613,W0622,W0622,W0704,R0904,C0103,E0611
#
# copyright 2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2021-2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This file is part of a cubicweb-prometheus.
......
# copyright 2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2021-2021 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr -- mailto:contact@logilab.fr
#
# This program is free software: you can redistribute it and/or modify it under
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment