Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Jul 19, 2024
1 parent c719502 commit ae17c7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def test_wsgi_metrics_new_semconv(self):
for _ in range(3):
response = Client().get("/span_name/1234/")
self.assertEqual(response.status_code, 200)
duration = default_timer() - start
duration_s = default_timer() - start
metrics_list = self.memory_metrics_reader.get_metrics_data()
number_data_point_seen = False
histrogram_data_point_seen = False
Expand All @@ -753,7 +753,7 @@ def test_wsgi_metrics_new_semconv(self):
self.assertEqual(point.count, 3)
histrogram_data_point_seen = True
self.assertAlmostEqual(
duration, point.sum, places=2
duration_s, point.sum, places=2
)
if isinstance(point, NumberDataPoint):
number_data_point_seen = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,21 @@
from opentelemetry.sdk import resources
from opentelemetry.sdk.trace import Span
from opentelemetry.sdk.trace.id_generator import RandomIdGenerator
from opentelemetry.semconv.attributes.client_attributes import (
CLIENT_ADDRESS,
from opentelemetry.semconv.attributes.client_attributes import CLIENT_ADDRESS
from opentelemetry.semconv.attributes.exception_attributes import (
EXCEPTION_MESSAGE,
EXCEPTION_TYPE,
)
from opentelemetry.semconv.attributes.http_attributes import (
HTTP_REQUEST_METHOD,
HTTP_RESPONSE_STATUS_CODE,
HTTP_ROUTE,
)
from opentelemetry.semconv.attributes.exception_attributes import (
EXCEPTION_MESSAGE,
EXCEPTION_TYPE,
)
from opentelemetry.semconv.attributes.network_attributes import (
NETWORK_PROTOCOL_VERSION,
)
from opentelemetry.semconv.attributes.server_attributes import (
SERVER_PORT,
)
from opentelemetry.semconv.attributes.url_attributes import (
URL_SCHEME,
)
from opentelemetry.semconv.attributes.server_attributes import SERVER_PORT
from opentelemetry.semconv.attributes.url_attributes import URL_SCHEME
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import (
Expand Down

0 comments on commit ae17c7c

Please sign in to comment.