@@ -98,7 +98,7 @@ def span_event(
9898 if partial_granularity_type == "reduced" :
9999 return [i_attrs , u_attrs , a_attrs ]
100100 else :
101- return [i_attrs , {}, {key :a_attrs .get (key ) for key in exit_span_error_attrs_present | {"nr.pg" }}]
101+ return [i_attrs , {}, {key : a_attrs .get (key ) for key in exit_span_error_attrs_present | {"nr.pg" }}]
102102 # If the span is not an exit span, skip it by returning None.
103103 if not exit_span_attrs_present :
104104 return None
@@ -108,7 +108,9 @@ def span_event(
108108 ct_exit_spans ["kept" ] += 1
109109 return [i_attrs , u_attrs , a_attrs ]
110110 else :
111- a_minimized_attrs = attr_class ({key : a_attrs [key ] for key in (exit_span_attrs_present | exit_span_error_attrs_present )})
111+ a_minimized_attrs = attr_class (
112+ {key : a_attrs [key ] for key in (exit_span_attrs_present | exit_span_error_attrs_present )}
113+ )
112114 # If we are in essential mode return the span with minimized attributes.
113115 if partial_granularity_type == "essential" :
114116 ct_exit_spans ["kept" ] += 1
@@ -132,7 +134,9 @@ def span_event(
132134 # (last occurring error takes precedence), add it's guid to the list
133135 # of ids on the seen span, compute the new duration & start time, and
134136 # return None.
135- ct_exit_spans [span_attrs ][1 ].update (attr_class ({key : a_minimized_attrs [key ] for key in exit_span_error_attrs_present }))
137+ ct_exit_spans [span_attrs ][1 ].update (
138+ attr_class ({key : a_minimized_attrs [key ] for key in exit_span_error_attrs_present })
139+ )
136140 # Max size for `nr.ids` = 1024. Max length = 63 (each span id is 16 bytes + 8 bytes for list type).
137141 if len (ct_exit_spans [span_attrs ][1 ]["nr.ids" ]) < 63 :
138142 ct_exit_spans [span_attrs ][1 ]["nr.ids" ].append (self .guid )
0 commit comments