Skip to content

Commit 5431e7c

Browse files
feat: Preserve metadata on wrapped coroutines
1 parent 9e14920 commit 5431e7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry_sdk/integrations/asyncio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
import functools
23

34
import sentry_sdk
45
from sentry_sdk.consts import OP
@@ -39,6 +40,7 @@ def patch_asyncio():
3940
def _sentry_task_factory(loop, coro, **kwargs):
4041
# type: (asyncio.AbstractEventLoop, Coroutine[Any, Any, Any], Any) -> asyncio.Future[Any]
4142

43+
@functools.wraps(coro)
4244
async def _task_with_sentry_span_creation():
4345
# type: () -> Any
4446
result = None

0 commit comments

Comments
 (0)