1111from aiohttp import web
1212from aiohttp .test_utils import TestClient
1313from faker import Faker
14- from prometheus_client .parser import text_string_to_metric_families
14+ from prometheus_client .openmetrics . parser import text_string_to_metric_families
1515from servicelib .aiohttp import status
1616from servicelib .aiohttp .monitoring import setup_monitoring
1717from servicelib .common_headers import (
@@ -89,12 +89,12 @@ async def test_setup_monitoring(client: TestClient):
8989 response = await client .get ("/metrics" )
9090 assert response .status == status .HTTP_200_OK
9191 metrics_as_text = await response .text ()
92+ # metrics_as_text = metrics_as_text.lstrip("'").lstrip("'")
9293 _assert_metrics_contain_entry (
9394 metrics_as_text ,
9495 metric_name = "http_requests" ,
9596 sample_name = "http_requests_total" ,
9697 labels = {
97- "app_name" : "pytest_app" ,
9898 "endpoint" : "/monitored_request" ,
9999 "http_status" : "200" ,
100100 "method" : "GET" ,
@@ -108,7 +108,6 @@ async def test_setup_monitoring(client: TestClient):
108108 metric_name = "http_requests" ,
109109 sample_name = "http_requests_total" ,
110110 labels = {
111- "app_name" : "pytest_app" ,
112111 "endpoint" : "/metrics" ,
113112 "http_status" : "200" ,
114113 "method" : "GET" ,
@@ -134,7 +133,6 @@ async def test_request_with_simcore_user_agent(client: TestClient, faker: Faker)
134133 metric_name = "http_requests" ,
135134 sample_name = "http_requests_total" ,
136135 labels = {
137- "app_name" : "pytest_app" ,
138136 "endpoint" : "/monitored_request" ,
139137 "http_status" : "200" ,
140138 "method" : "GET" ,
0 commit comments