File tree Expand file tree Collapse file tree
sentry_sdk/integrations/boto3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,14 +93,12 @@ def sentry_patched_make_api_call(
9393 try :
9494 parsed = orig_make_api_call (self , operation_name , api_params )
9595 except BaseException as error :
96- if span is not None :
97- with capture_internal_exceptions ():
98- _set_span_attributes (span , _get_error_attributes (error ))
96+ with capture_internal_exceptions ():
97+ _set_span_attributes (span , _get_error_attributes (error ))
9998 raise
10099 else :
101- if span is not None :
102- with capture_internal_exceptions ():
103- _set_span_attributes (span , _get_response_attributes (parsed ))
100+ with capture_internal_exceptions ():
101+ _set_span_attributes (span , _get_response_attributes (parsed ))
104102 except BaseException as error :
105103 # finish `StreamedSpan` explicitly; static spans are finished by
106104 # their context manager.
You can’t perform that action at this time.
0 commit comments