Commit 7b33dd6
authored
Fix ParentBased sampler for implicit parent spans (#1394)
consider the sample decision of implicit parent spans (when creating
a span without explicitly providing a context) instead of forwarding
to the delegating sampler.
* fix trace_state erasure for dropped spans
* samplers did not return the trace_state in the sampling result
when a span was dropped. This caused the trace_state extracted
from a remote parent span to be erased and further context
propagation to break.
* fix also TraceIdRatioBased which erased the trace_state independent
of the sampling outcome.1 parent 2425d66 commit 7b33dd6
File tree
3 files changed
+231
-187
lines changed- opentelemetry-sdk
- src/opentelemetry/sdk/trace
- tests/trace
3 files changed
+231
-187
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 13 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
| 212 | + | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
253 | 251 | | |
254 | 252 | | |
255 | 253 | | |
| |||
0 commit comments