Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autodynatrace/wrappers/asyncio/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def dynatrace_coroutine(wrapped, instance, args, kwargs):
return wrapped(*args, **kwargs)

async def trace_coro(coro: Coroutine):
name = coro.__qualname__
name = (
getattr(coro, "__qualname__", None) or
getattr(coro, "__name__", None) or
type(coro).__name__
)
with sdk.trace_custom_service(name, "asyncio") as tracer:
try:
logger.debug(f"tracing asyncio.tasks.ensure_future: {name}")
Expand Down