Skip to content

Commit ae2c554

Browse files
krnrYuri Lobanoff
authored andcommitted
Use canonical name for aiohttp request span name
1 parent a121b4a commit ae2c554

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212
## Unreleased
1313

14+
- `opentelemetry-instrumentation-aiohttp-server`: Use `canonical` attribute of the `Resource` as a span name.
15+
1416
## Version 1.38.0/0.59b0 (2025-10-16)
1517

1618
### Fixed

instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ typing_extensions==4.12.2
1818
wrapt==1.16.0
1919
yarl==1.9.4
2020
zipp==3.19.2
21-
-e opentelemetry-instrumentation
22-
-e util/opentelemetry-util-http
23-
-e instrumentation/opentelemetry-instrumentation-aiohttp-server

instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ def _get_route_details(scope):
488488
break
489489
if match == Match.PARTIAL:
490490
route = starlette_route.path
491+
breakpoint()
491492
return route
492493

493494

instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ def test_fastapi_route_attribute_added(self):
496496
self.assertEqual(len(spans), 3)
497497
for span in spans:
498498
self.assertIn("GET /user/{username}", span.name)
499+
breakpoint()
499500
self.assertEqual(spans[-1].attributes[HTTP_ROUTE], "/user/{username}")
500501
# ensure that at least one attribute that is populated by
501502
# the asgi instrumentation is successfully feeding though.

0 commit comments

Comments
 (0)