@@ -48,6 +48,15 @@ def __call__(self, status, response_headers, exc_info=None): # type: ignore
4848
4949DEFAULT_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
5261def 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-
326325def _prepopulate_attributes (wsgi_environ , use_x_forwarded_for = False ):
327326 """Extract span attributes from the WSGI environment."""
328327 attributes = {}
0 commit comments