File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -273,10 +273,12 @@ def __iter__(self):
273273 yield chunk
274274
275275 finally :
276- # Close the Sentry transaction (it could be that response.close() is never called by the framework)
277- # This is done here to make sure the Transaction stays
278- # open until all streaming responses are done.
279- finish_running_transaction (self ._current_scope )
276+ with use_isolation_scope (self ._isolation_scope ):
277+ with use_scope (self ._current_scope ):
278+ # Close the Sentry transaction (it could be that response.close() is never called by the framework)
279+ # This is done here to make sure the Transaction stays
280+ # open until all streaming responses are done.
281+ finish_running_transaction (self ._current_scope )
280282
281283 def close (self ):
282284 # type: () -> None
You can’t perform that action at this time.
0 commit comments