@@ -318,7 +318,9 @@ def _observe_exception(self, exc_info=None, ignore=None, expected=None, status_c
318318
319319 return fullname , message , tb , is_expected
320320
321- def notice_error (self , error = None , attributes = {}, expected = None , ignore = None , status_code = None ):
321+ def notice_error (self , error = None , attributes = None , expected = None , ignore = None , status_code = None ):
322+ attributes = attributes if attributes is not None else {}
323+
322324 recorded = self ._observe_exception (
323325 error ,
324326 ignore = ignore ,
@@ -355,7 +357,7 @@ def notice_error(self, error=None, attributes={}, expected=None, ignore=None, st
355357
356358 transaction ._create_error_node (settings , fullname , message , is_expected , custom_params , self .guid , tb )
357359
358- def record_exception (self , exc_info = None , params = {} , ignore_errors = [] ):
360+ def record_exception (self , exc_info = None , params = None , ignore_errors = None ):
359361 # Deprecation Warning
360362 warnings .warn (
361363 ("The record_exception function is deprecated. Please use the new api named notice_error instead." ),
@@ -563,7 +565,7 @@ def get_linking_metadata():
563565 }
564566
565567
566- def record_exception (exc = None , value = None , tb = None , params = {} , ignore_errors = [] , application = None ):
568+ def record_exception (exc = None , value = None , tb = None , params = None , ignore_errors = None , application = None ):
567569 # Deprecation Warning
568570 warnings .warn (
569571 ("The record_exception function is deprecated. Please use the new api named notice_error instead." ),
@@ -573,7 +575,7 @@ def record_exception(exc=None, value=None, tb=None, params={}, ignore_errors=[],
573575 notice_error (error = (exc , value , tb ), attributes = params , ignore = ignore_errors , application = application )
574576
575577
576- def notice_error (error = None , attributes = {} , expected = None , ignore = None , status_code = None , application = None ):
578+ def notice_error (error = None , attributes = None , expected = None , ignore = None , status_code = None , application = None ):
577579 if application is None :
578580 trace = current_trace ()
579581 if trace :
0 commit comments