From ec81ffb6399c23b035522a194b781525b03f55f2 Mon Sep 17 00:00:00 2001 From: Leighton Date: Tue, 17 Nov 2020 13:32:31 -0500 Subject: [PATCH] req --- .../opentelemetry/instrumentation/requests/__init__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py index 02128f9449..c0a3d62d6b 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py @@ -51,11 +51,7 @@ from opentelemetry.instrumentation.requests.version import __version__ from opentelemetry.instrumentation.utils import http_status_to_status_code from opentelemetry.trace import SpanKind, get_tracer -from opentelemetry.trace.status import ( - EXCEPTION_STATUS_FIELD, - Status, - StatusCode, -) +from opentelemetry.trace.status import Status, StatusCode # A key to a context variable to avoid creating duplicate spans when instrumenting # both, Session.request and Session.send, since Session.request calls into Session.send @@ -158,9 +154,6 @@ def _instrumented_requests_call( result = call_wrapped() # *** PROCEED except Exception as exc: # pylint: disable=W0703 exception = exc - setattr( - exception, EXCEPTION_STATUS_FIELD, StatusCode.ERROR, - ) result = getattr(exc, "response", None) finally: context.detach(token)