Skip to content

Commit 2160909

Browse files
committed
fix(async-io): return coro when __name__ is not present
1 parent f4f3042 commit 2160909

File tree

2 files changed

+3
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5555
([#2420](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2420))
5656
- `opentelemetry-instrumentation-asyncio` Check for __name__ attribute in the coroutine
5757
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
58+
- `opentelemetry-instrumentation-asyncio` Fix return coro when __name__ is not present
59+
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
5860

5961
## Version 1.24.0/0.45b0 (2024-03-28)
6062

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def trace_item(self, coro_or_future):
262262

263263
async def trace_coroutine(self, coro):
264264
if not hasattr(coro, "__name__"):
265-
return
265+
return coro
266266
start = default_timer()
267267
attr = {
268268
"type": "coroutine",

0 commit comments

Comments
 (0)