We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07e9b84 commit c550f48Copy full SHA for c550f48
src/a2a/utils/telemetry.py
@@ -53,6 +53,7 @@ def internal_method(self):
53
```
54
"""
55
56
+import asyncio
57
import functools
58
import inspect
59
import logging
@@ -167,6 +168,12 @@ async def async_wrapper(*args, **kwargs) -> Any:
167
168
span.record_exception(e)
169
span.set_status(StatusCode.ERROR, description=str(e))
170
raise
171
+ # asyncio.CancelledError extends from BaseException
172
+ except asyncio.CancelledError as ce:
173
+ logger.debug(f'CancelledError in span {actual_span_name}')
174
+ span.record_exception(ce)
175
+ span.set_status(StatusCode.ERROR, description=str(ce))
176
+ raise
177
finally:
178
if attribute_extractor:
179
try:
0 commit comments