Skip to content

Commit f380307

Browse files
committed
Fix ruff
1 parent 4a117bf commit f380307

File tree

1 file changed

+4
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware

1 file changed

+4
-2
lines changed

instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ def format_request_objects_in_headers(attributes):
173173
try:
174174
method = getattr(value, "method", "UNKNOWN")
175175
request_path = getattr(value, "path", "UNKNOWN")
176-
value_list[index] = f"HttpRequest({method} {request_path})"
177-
except Exception: # pylint: disable=broad-exception-caught
176+
value_list[index] = (
177+
f"HttpRequest({method} {request_path})"
178+
)
179+
except Exception: # pylint: disable=broad-exception-caught
178180
value_list[index] = "HttpRequest(...)"
179181
return attributes
180182

0 commit comments

Comments
 (0)