Skip to content

Commit a55a22e

Browse files
committed
lint fix tornado dir only
1 parent 4280382 commit a55a22e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def _finish_tracing_callback(
113113
if isinstance(exc, HTTPError):
114114
status_code = exc.code
115115
description = f"{type(exc).__name__}: {exc}"
116-
116+
117117
response = None
118118
if not exc:
119119
response = future.result()
@@ -136,8 +136,12 @@ def _finish_tracing_callback(
136136
duration_histogram.record(
137137
response.request_time, attributes=metric_attributes
138138
)
139-
request_size_histogram.record(request_size, attributes=metric_attributes)
140-
response_size_histogram.record(response_size, attributes=metric_attributes)
139+
request_size_histogram.record(
140+
request_size, attributes=metric_attributes
141+
)
142+
response_size_histogram.record(
143+
response_size, attributes=metric_attributes
144+
)
141145

142146
if response_hook:
143147
response_hook(span, future)

Diff for: instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from urllib.error import HTTPError
1818

1919
from http_server_mock import HttpServerMock
20-
from tornado.testing import AsyncHTTPTestCase
2120
from tornado.httpclient import HTTPClientError
21+
from tornado.testing import AsyncHTTPTestCase
2222

2323
from opentelemetry import trace
2424
from opentelemetry.instrumentation.propagators import (
@@ -603,6 +603,7 @@ def client_response_hook(span, response):
603603

604604
self.memory_exporter.clear()
605605

606+
606607
class TestTornadoHTTPClientInstrumentation(TornadoTest, WsgiTestBase):
607608
def test_http_client_success_response(self):
608609
response = self.fetch("/")
@@ -644,6 +645,7 @@ def test_http_client_failed_response(self):
644645
self.assertEqual(client.name, "GET")
645646
self.memory_exporter.clear()
646647

648+
647649
class TestTornadoUninstrument(TornadoTest):
648650
def test_uninstrument(self):
649651
response = self.fetch("/")

0 commit comments

Comments
 (0)