@@ -318,7 +318,9 @@ def _observe_exception(self, exc_info=None, ignore=None, expected=None, status_c
318
318
319
319
return fullname , message , tb , is_expected
320
320
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
+
322
324
recorded = self ._observe_exception (
323
325
error ,
324
326
ignore = ignore ,
@@ -355,7 +357,7 @@ def notice_error(self, error=None, attributes={}, expected=None, ignore=None, st
355
357
356
358
transaction ._create_error_node (settings , fullname , message , is_expected , custom_params , self .guid , tb )
357
359
358
- def record_exception (self , exc_info = None , params = {} , ignore_errors = [] ):
360
+ def record_exception (self , exc_info = None , params = None , ignore_errors = None ):
359
361
# Deprecation Warning
360
362
warnings .warn (
361
363
("The record_exception function is deprecated. Please use the new api named notice_error instead." ),
@@ -563,7 +565,7 @@ def get_linking_metadata():
563
565
}
564
566
565
567
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 ):
567
569
# Deprecation Warning
568
570
warnings .warn (
569
571
("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=[],
573
575
notice_error (error = (exc , value , tb ), attributes = params , ignore = ignore_errors , application = application )
574
576
575
577
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 ):
577
579
if application is None :
578
580
trace = current_trace ()
579
581
if trace :
0 commit comments