From 8d1f396f0e542d4ab45394abec0766845ec9ec1e Mon Sep 17 00:00:00 2001 From: Anton Sidelnikov <53078276+anton-sidelnikov@users.noreply.github.com> Date: Fri, 13 Nov 2020 18:33:14 +0300 Subject: [PATCH] more broaden exception for lb (#29) --- csm_test_utils/continuous.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/csm_test_utils/continuous.py b/csm_test_utils/continuous.py index d32c328..90478f6 100644 --- a/csm_test_utils/continuous.py +++ b/csm_test_utils/continuous.py @@ -23,11 +23,12 @@ def get(client: Client): metrics = MetricCollection() try: res = requests.get(client.url, headers={"Connection": "close"}, timeout=timeout) - except Timeout: + except Exception as Ex: LOGGER.exception("Timeout sending request to LB") lb_timeout = Metric(LB_TIMEOUT) lb_timeout.add_tag("client", client.host_name) lb_timeout.add_value("timeout", timeout * 1000) + lb_timeout.add_value("exception", Ex) metrics.append(lb_timeout) else: lb_timing = Metric(LB_TIMING) diff --git a/pyproject.toml b/pyproject.toml index 24388f2..8dadc37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "csm-test-utils" -version = "0.2.11" +version = "0.2.12" description = "Utils for testing infructructure created by customer service monitoring" authors = ["OTC customer service monitroing team"] license = "Apache-2.0"