diff --git a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py index d5b77e9c29..c10e322f9b 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py @@ -934,7 +934,7 @@ async def _handle_async_request_wrapper( # pylint: disable=too-many-locals span.set_attribute( ERROR_TYPE, type(exception).__qualname__ ) - raise exception + raise exception.with_traceback(exception.__traceback__) return response