Skip to content

Commit 28428ef

Browse files
committed
Format with black
1 parent f7b3c53 commit 28428ef

File tree

6 files changed

+14
-14
lines changed
  • instrumentation
    • opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi
    • opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi
    • opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests
    • opentelemetry-instrumentation-tornado
    • opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi

6 files changed

+14
-14
lines changed

instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def get_default_span_details(scope: dict) -> Tuple[str, dict]:
419419
Default span name is the HTTP method and URL path, or just the method.
420420
https://github.com/open-telemetry/opentelemetry-specification/pull/3165
421421
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#name
422-
422+
423423
Args:
424424
scope: the ASGI scope dictionary
425425
Returns:
@@ -431,8 +431,8 @@ def get_default_span_details(scope: dict) -> Tuple[str, dict]:
431431
return f"{method} {path}", {}
432432
if path: # websocket
433433
return path, {}
434-
return method, {} # http with no path
435-
434+
return method, {} # http with no path
435+
436436

437437
def _collect_target_attribute(
438438
scope: typing.Dict[str, typing.Any]

instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ def __del__(self):
318318
def _get_route_details(scope):
319319
"""
320320
Function to retrieve Starlette route from scope.
321-
321+
322322
TODO: there is currently no way to retrieve http.route from
323323
a starlette application from scope.
324324
See: https://github.com/encode/starlette/pull/804
325-
325+
326326
Args:
327327
scope: A Starlette scope
328328
Returns:
@@ -339,7 +339,7 @@ def _get_route_details(scope):
339339
if match == Match.PARTIAL:
340340
route = starlette_route.path
341341
return route
342-
342+
343343

344344
def _get_default_span_details(scope):
345345
"""
@@ -355,10 +355,10 @@ def _get_default_span_details(scope):
355355
attributes = {}
356356
if route:
357357
attributes[SpanAttributes.HTTP_ROUTE] = route
358-
if method and route: # http
358+
if method and route: # http
359359
span_name = f"{method} {route}"
360-
elif route: # websocket
360+
elif route: # websocket
361361
span_name = route
362-
else: # fallback
362+
else: # fallback
363363
span_name = method
364364
return span_name, attributes

instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def get_default_span_name(method):
248248
"""
249249
Default implementation for name_callback, returns HTTP {method_name}.
250250
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#name
251-
251+
252252
Args:
253253
method: string representing HTTP method
254254
Returns:

instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@ def _get_default_span_name(request):
459459
Default span name is the HTTP method and URL path, or just the method.
460460
https://github.com/open-telemetry/opentelemetry-specification/pull/3165
461461
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#name
462-
462+
463463
Args:
464464
request: Tornado request object.
465465
Returns:
466466
Default span name.
467467
"""
468-
468+
469469
path = request.path
470470
method = request.method
471471
if method and path:

instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def _test_async_handler(self, url, handler_name):
229229
SpanAttributes.HTTP_TARGET: url,
230230
SpanAttributes.HTTP_CLIENT_IP: "127.0.0.1",
231231
SpanAttributes.HTTP_STATUS_CODE: 201,
232-
"tornado.handler": f"tests.tornado_test_app.{handler_name}"
232+
"tornado.handler": f"tests.tornado_test_app.{handler_name}",
233233
},
234234
)
235235

instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def get_default_span_name(environ):
444444
Default span name is the HTTP method and URL path, or just the method.
445445
https://github.com/open-telemetry/opentelemetry-specification/pull/3165
446446
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/#name
447-
447+
448448
Args:
449449
environ: The WSGI environ object.
450450
Returns:

0 commit comments

Comments
 (0)