Commit d87a8bf
fix(w3c trace context): do not pass down unknown flags.
The W3C trace context specification mandates that a participant must
only send known flags downstream. See
https://www.w3.org/TR/trace-context/#other-flags: "The behavior of other
flags, such as (00000100) is not defined and is reserved for future use.
Vendors MUST set those to zero."
In particular, this commit changes the way traceparent.py handles the
flags. Instead of persisting the complete flags field from traceparent,
we specifically parse the flag(s) that we understand and keep them as
individual boolean attributes. This will also make it easier to
handle the random trace ID flag correctly when updating support to W3C
trace context level 2.
In addition we now correctly pass down the version field as 00, since
that is the traceparent version we support (instead of passing down the
incoming version value).
Signed-off-by: Bastian Krol <[email protected]>1 parent ebc4103 commit d87a8bf
File tree
4 files changed
+38
-20
lines changed- instana/w3c_trace_context
- tests
- frameworks
- propagators
- w3c_trace_context
4 files changed
+38
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
38 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
65 | | - | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | | - | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | | - | |
| 76 | + | |
71 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
38 | | - | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
| |||
0 commit comments