Skip to content

Commit affbe59

Browse files
committed
reorg
1 parent 48ddc4f commit affbe59

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

sentry_sdk/integrations/wsgi.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ def __call__(self, status, response_headers, exc_info=None): # type: ignore
4848

4949
DEFAULT_TRANSACTION_NAME = "generic WSGI request"
5050

51+
ENVIRON_TO_ATTRIBUTE = {
52+
"PATH_INFO": "url.path",
53+
"QUERY_STRING": "url.query",
54+
"REQUEST_METHOD": "http.request.method",
55+
"SERVER_NAME": "server.address",
56+
"SERVER_PORT": "server.port",
57+
"wsgi.url_scheme": "url.scheme",
58+
}
59+
5160

5261
def wsgi_decoding_dance(s, charset="utf-8", errors="replace"):
5362
# type: (str, str, str) -> str
@@ -313,16 +322,6 @@ def event_processor(event, hint):
313322
return event_processor
314323

315324

316-
ENVIRON_TO_ATTRIBUTE = {
317-
"PATH_INFO": "url.path",
318-
"QUERY_STRING": "url.query",
319-
"REQUEST_METHOD": "http.request.method",
320-
"SERVER_NAME": "server.address",
321-
"SERVER_PORT": "server.port",
322-
"wsgi.url_scheme": "url.scheme",
323-
}
324-
325-
326325
def _prepopulate_attributes(wsgi_environ, use_x_forwarded_for=False):
327326
"""Extract span attributes from the WSGI environment."""
328327
attributes = {}

0 commit comments

Comments
 (0)