From 2f243e7115ab26e881fc2bea4c827bce6f21f63c Mon Sep 17 00:00:00 2001 From: artsmolin Date: Fri, 20 Jan 2023 15:30:42 +0300 Subject: [PATCH] Fix metrics --- pyproject.toml | 2 +- pythogen/templates/client/httpx-request-metrics.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5356070..cbffcdf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pythogen" -version = "0.1.1" +version = "0.1.2" description = "Generator of python HTTP-clients from OpenApi specification." homepage = "https://github.com/artsmolin/pythogen" repository = "https://github.com/artsmolin/pythogen" diff --git a/pythogen/templates/client/httpx-request-metrics.j2 b/pythogen/templates/client/httpx-request-metrics.j2 index 8db43b7..3519258 100644 --- a/pythogen/templates/client/httpx-request-metrics.j2 +++ b/pythogen/templates/client/httpx-request-metrics.j2 @@ -7,7 +7,7 @@ if self.metrics_integration.shadow_path: self.metrics_integration.on_request_error(self.client_name, exc, "{{ method }}", "{{ path | replace('{', ':') | replace('}', '') }}") else: - self.metrics_integration.on_request_error(self.client_name, exc, "{{ method }}", "{{ path }}") + self.metrics_integration.on_request_error(self.client_name, exc, "{{ method }}", f"{{ path }}") {%- endif %} raise exc