Skip to content

Commit c11e8f1

Browse files
committed
.
1 parent 7490fe3 commit c11e8f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry_sdk/integrations/_asgi_common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def _get_request_attributes(asgi_scope: "Any") -> "dict[str, Any]":
123123
for header, value in headers.items():
124124
attributes[f"http.request.header.{header.lower()}"] = value
125125

126-
attributes["http.query"] = _get_query(asgi_scope)
126+
query = _get_query(asgi_scope)
127+
if query:
128+
attributes["http.query"] = query
127129

128130
attributes["url.full"] = _get_url(
129131
asgi_scope, "http" if ty == "http" else "ws", headers.get("host")

0 commit comments

Comments
 (0)