From 66a107fa49fc6d264ae6d690c09c9f04bc4a5dd7 Mon Sep 17 00:00:00 2001
From: Povilas Versockas
Date: Fri, 24 May 2024 02:28:50 +0300
Subject: [PATCH] fix(async-io): return coro when __name__ is not present
(#2541)
---
.../src/opentelemetry/instrumentation/asyncio/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
index 6d82da6cd0..fc1b535270 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
@@ -262,7 +262,7 @@ def trace_item(self, coro_or_future):
async def trace_coroutine(self, coro):
if not hasattr(coro, "__name__"):
- return
+ return coro
start = default_timer()
attr = {
"type": "coroutine",