From 62281fdd41bab6f48870699cafc37b3f71f87ec2 Mon Sep 17 00:00:00 2001 From: Ilya Safonov Date: Tue, 14 Jan 2025 10:34:10 +0300 Subject: [PATCH] HH-244220: add http.target to telemetry test --- tests/test_telemetry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index ef58f6675..926f46fe0 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -68,7 +68,7 @@ def test_get_netloc(self) -> None: @router.get('/page_a') async def get_page_a(request: Request, http_client: HttpClient) -> None: - await http_client.get_url(request.headers.get('host'), '/page_b') + await http_client.get_url(request.headers.get('host'), '/page_b?firstParam=1&secondParam=2') @router.get('/page_b') @@ -120,7 +120,7 @@ async def test_parent_span(self, frontik_app: FrontikApplication) -> None: BATCH_SPAN_PROCESSOR[0].force_flush() assert len(SPAN_STORAGE) == 4 client_a_span = find_span('http.request.cloud.region', 'externalRequest') - server_b_span = find_span('http.target', '/page_b') + server_b_span = find_span('http.route', '/page_b') SPAN_STORAGE.clear() assert client_a_span is not None @@ -133,3 +133,4 @@ async def test_parent_span(self, frontik_app: FrontikApplication) -> None: assert server_b_span.attributes.get(SpanAttributes.CODE_NAMESPACE) == 'tests.test_telemetry' assert server_b_span.attributes.get(SpanAttributes.USER_AGENT_ORIGINAL) == self.app.app_name assert server_b_span.attributes.get(SpanAttributes.HTTP_ROUTE) == '/page_b' + assert server_b_span.attributes.get(SpanAttributes.HTTP_TARGET) == '/page_b?firstParam=1&secondParam=2'