Skip to content

Commit a5016ee

Browse files
majorgreysocelotl
andauthored
Update ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
1 parent 583a8fa commit a5016ee

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ def add_response_attributes(
150150

151151
def get_default_span_name(environ):
152152
"""Default implementation for name_callback, returns HTTP {METHOD_NAME}."""
153-
request_method = environ.get("REQUEST_METHOD")
154-
return "HTTP" + (
155-
" " + request_method
156-
if request_method is not None and request_method != ""
157-
else ""
153+
return "HTTP {}".format(environ.get("REQUEST_METHOD", "")).strip()
158154
)
159155

160156

0 commit comments

Comments
 (0)