Commit 5ca8aa2
authored
Handle reentrant scope cleanup in Akka/Pekko actor instrumentations (#8723)
Akka/Pekko actor instrumentations use the scope checkpoint and rollback mechanism to clean up scopes after async operations. To properly handle reentrant scope checkpointing and rollback we need to use a count in ContinuableScope like referenceCount rather than just a flag.
This is necessary because ContinuableScopeManager re-uses scope instances when activating the same span twice.
(cherry picked from commit 8b77a18)1 parent 2640c2b commit 5ca8aa2
File tree
2 files changed
+67
-18
lines changed- dd-trace-core/src
- main/java/datadog/trace/core/scopemanager
- test/groovy/datadog/trace/core/scopemanager
2 files changed
+67
-18
lines changedLines changed: 10 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 24 | + | |
29 | 25 | | |
30 | 26 | | |
31 | 27 | | |
| |||
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
40 | | - | |
| 36 | + | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
44 | 40 | | |
45 | | - | |
| 41 | + | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
| |||
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
124 | | - | |
| 120 | + | |
125 | 121 | | |
126 | 122 | | |
127 | 123 | | |
| |||
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 135 | + | |
144 | 136 | | |
145 | 137 | | |
146 | 138 | | |
| |||
149 | 141 | | |
150 | 142 | | |
151 | 143 | | |
152 | | - | |
| 144 | + | |
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
159 | 151 | | |
160 | 152 | | |
161 | 153 | | |
| |||
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1160 | 1217 | | |
1161 | 1218 | | |
1162 | 1219 | | |
| |||
0 commit comments