@@ -227,7 +227,7 @@ def __copy__(self):
227
227
rv ._name = self ._name
228
228
rv ._fingerprint = self ._fingerprint
229
229
rv ._transaction = self ._transaction
230
- rv ._transaction_info = dict (self ._transaction_info )
230
+ rv ._transaction_info = copy (self ._transaction_info )
231
231
rv ._user = self ._user
232
232
233
233
rv ._tags = dict (self ._tags )
@@ -664,7 +664,7 @@ def clear(self):
664
664
self ._level = None # type: Optional[LogLevelStr]
665
665
self ._fingerprint = None # type: Optional[List[str]]
666
666
self ._transaction = None # type: Optional[str]
667
- self ._transaction_info = {} # type: MutableMapping[str, str]
667
+ self ._transaction_info = None # type: Optional[ MutableMapping[str, str] ]
668
668
self ._user = None # type: Optional[Dict[str, Any]]
669
669
670
670
self ._tags = {} # type: Dict[str, Any]
@@ -772,7 +772,10 @@ def set_transaction_name(self, name, source=None):
772
772
self ._span .containing_transaction .source = source
773
773
774
774
if source :
775
- self ._transaction_info ["source" ] = source
775
+ if self ._transaction_info is None :
776
+ self ._transaction_info = {"source" : source }
777
+ else :
778
+ self ._transaction_info ["source" ] = source
776
779
777
780
@_attr_setter
778
781
def user (self , value ):
@@ -805,7 +808,10 @@ def span(self, span):
805
808
if transaction .name :
806
809
self ._transaction = transaction .name
807
810
if transaction .source :
808
- self ._transaction_info ["source" ] = transaction .source
811
+ if self ._transaction_info is None :
812
+ self ._transaction_info = {"source" : transaction .source }
813
+ else :
814
+ self ._transaction_info ["source" ] = transaction .source
809
815
810
816
@property
811
817
def profile (self ):
@@ -1491,7 +1497,10 @@ def update_from_scope(self, scope):
1491
1497
if scope ._transaction is not None :
1492
1498
self ._transaction = scope ._transaction
1493
1499
if scope ._transaction_info is not None :
1494
- self ._transaction_info .update (scope ._transaction_info )
1500
+ if self ._transaction_info is None :
1501
+ self ._transaction_info = scope ._transaction_info
1502
+ else :
1503
+ self ._transaction_info .update (scope ._transaction_info )
1495
1504
if scope ._user is not None :
1496
1505
self ._user = scope ._user
1497
1506
if scope ._tags :
0 commit comments