From 4a7082a75f41bffae926f12b06fee93f9af714b5 Mon Sep 17 00:00:00 2001 From: Michael Manganiello Date: Tue, 6 Apr 2021 20:39:19 -0300 Subject: [PATCH] Fix linting issues --- .../src/opentelemetry/instrumentation/asgi/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py index 545437c2ef..6e0f31b9b2 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py @@ -149,7 +149,9 @@ def get_default_span_details(scope: dict) -> Tuple[str, dict]: Returns: a tuple of the span name, and any attributes to attach to the span. """ - span_name = scope.get("path") or "HTTP {}".format(scope.get("method", "").strip()) + span_name = scope.get("path", "").strip() or "HTTP {}".format( + scope.get("method", "").strip() + ) return span_name, {}