File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -307,9 +307,6 @@ async def _run_app(
307307 else nullcontext ()
308308 )
309309
310- for attribute , value in _get_request_attributes (scope ).items ():
311- sentry_scope .set_attribute (attribute , value )
312-
313310 with span_ctx as span :
314311 if isinstance (span , StreamedSpan ):
315312 for attribute , value in _get_request_attributes (
Original file line number Diff line number Diff line change @@ -157,15 +157,15 @@ def __call__(
157157 custom_sampling_context = {"wsgi_environ" : environ },
158158 )
159159
160- with capture_internal_exceptions ():
161- for attr , value in _get_request_attributes (
162- environ , self .use_x_forwarded_for
163- ).items ():
164- scope .set_attribute (attr , value )
165-
166160 span_ctx = span_ctx or nullcontext ()
167161
168162 with span_ctx as span :
163+ with capture_internal_exceptions ():
164+ for attr , value in _get_request_attributes (
165+ environ , self .use_x_forwarded_for
166+ ).items ():
167+ span .set_attribute (attr , value )
168+
169169 try :
170170 response = self .app (
171171 environ ,
You can’t perform that action at this time.
0 commit comments