From f5369ed3bb322b4ca48ccea5db04c75293486586 Mon Sep 17 00:00:00 2001 From: sroda Date: Tue, 30 Aug 2022 15:08:27 +0300 Subject: [PATCH] Run tox generate --- instrumentation/README.md | 2 +- .../opentelemetry/instrumentation/tornado/__init__.py | 6 ++---- .../tests/test_metrics_instrumentation.py | 9 +++------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/instrumentation/README.md b/instrumentation/README.md index deeb3693f0..845cd0845e 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -38,7 +38,7 @@ | [opentelemetry-instrumentation-sqlite3](./opentelemetry-instrumentation-sqlite3) | sqlite3 | No | [opentelemetry-instrumentation-starlette](./opentelemetry-instrumentation-starlette) | starlette ~= 0.13.0 | No | [opentelemetry-instrumentation-system-metrics](./opentelemetry-instrumentation-system-metrics) | psutil >= 5 | No -| [opentelemetry-instrumentation-tornado](./opentelemetry-instrumentation-tornado) | tornado >= 5.1.1 | No +| [opentelemetry-instrumentation-tornado](./opentelemetry-instrumentation-tornado) | tornado >= 5.1.1 | Yes | [opentelemetry-instrumentation-urllib](./opentelemetry-instrumentation-urllib) | urllib | No | [opentelemetry-instrumentation-urllib3](./opentelemetry-instrumentation-urllib3) | urllib3 >= 1.0.0, < 2.0.0 | Yes | [opentelemetry-instrumentation-wsgi](./opentelemetry-instrumentation-wsgi) | wsgi | Yes \ No newline at end of file diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py index 63e41a4574..0939b388ef 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py @@ -157,9 +157,8 @@ def client_resposne_hook(span, future): from functools import partial from logging import getLogger from time import time_ns -from typing import Collection from timeit import default_timer - +from typing import Collection import tornado.web import wrapt @@ -179,8 +178,8 @@ def client_resposne_hook(span, future): http_status_to_status_code, unwrap, ) -from opentelemetry.propagators import textmap from opentelemetry.metrics import Histogram, get_meter +from opentelemetry.propagators import textmap from opentelemetry.semconv.trace import SpanAttributes from opentelemetry.trace.status import Status, StatusCode from opentelemetry.util.http import ( @@ -192,7 +191,6 @@ def client_resposne_hook(span, future): normalise_request_header_name, normalise_response_header_name, ) -from opentelemetry.util.http import get_excluded_urls, get_traced_request_attrs from .client import fetch_async # pylint: disable=E0401 diff --git a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_metrics_instrumentation.py b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_metrics_instrumentation.py index 5181887093..806222b99a 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_metrics_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_metrics_instrumentation.py @@ -14,17 +14,14 @@ from timeit import default_timer + from tornado.testing import AsyncHTTPTestCase from opentelemetry import trace -from opentelemetry.instrumentation.tornado import ( - TornadoInstrumentor, -) +from opentelemetry.instrumentation.tornado import TornadoInstrumentor from opentelemetry.test.test_base import TestBase -from .tornado_test_app import ( - make_app, -) +from .tornado_test_app import make_app class TornadoTest(AsyncHTTPTestCase, TestBase):