From 2cbd7ba7e1609b3664e26395017ca33ada96c124 Mon Sep 17 00:00:00 2001 From: Max Nikitenko Date: Fri, 27 Nov 2020 21:37:22 +0200 Subject: [PATCH] fix: lint and bump version --- .../opentelemetry-instrumentation-urllib/CHANGELOG.md | 4 ++-- .../opentelemetry-instrumentation-urllib/README.rst | 2 +- .../opentelemetry-instrumentation-urllib/setup.cfg | 4 ++-- .../opentelemetry/instrumentation/urllib/__init__.py | 10 +--------- .../opentelemetry/instrumentation/urllib/version.py | 2 +- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-urllib/CHANGELOG.md index db63d66a34..1e426ef41d 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/CHANGELOG.md +++ b/instrumentation/opentelemetry-instrumentation-urllib/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog -## Version 0.15b0 +## Version 0.16b1 -Released 2020-11-26 +Released 2020-11-27 - Initial release diff --git a/instrumentation/opentelemetry-instrumentation-urllib/README.rst b/instrumentation/opentelemetry-instrumentation-urllib/README.rst index 88c9fdfdfa..edbc6af082 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/README.rst +++ b/instrumentation/opentelemetry-instrumentation-urllib/README.rst @@ -7,7 +7,7 @@ OpenTelemetry urllib Instrumentation :target: https://pypi.org/project/opentelemetry-instrumentation-urllib/ This library allows tracing HTTP requests made by the -`urllib https://docs.python.org/3/library/urllib.html>`_ library. +`urllib `_ library. Installation ------------ diff --git a/instrumentation/opentelemetry-instrumentation-urllib/setup.cfg b/instrumentation/opentelemetry-instrumentation-urllib/setup.cfg index bd66d2cf3f..1a10f19414 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/setup.cfg +++ b/instrumentation/opentelemetry-instrumentation-urllib/setup.cfg @@ -39,8 +39,8 @@ package_dir= =src packages=find_namespace: install_requires = - opentelemetry-api == 0.15b0 - opentelemetry-instrumentation == 0.15b0 + opentelemetry-api == 0.16b1 + opentelemetry-instrumentation == 0.16b1 [options.extras_require] test = diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py index 0750e2c0c9..53a1a754b3 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py @@ -52,11 +52,7 @@ from opentelemetry.instrumentation.urllib.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 _SUPPRESS_URLLIB_INSTRUMENTATION_KEY = "suppress_urllib_instrumentation" @@ -139,11 +135,7 @@ 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, "file", None) - # TODO GER RESPONSE finally: context.detach(token) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py index ff494d225a..6603be6eb7 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.15b0" +__version__ = "0.16b1"