This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Commit 5882009
chore: add type definitions for exporter-jaeger (#93)
The JaegerTraceExporterOptions accepts `tags` as a Tag array, but was
processing those tags for the process information as if they were an object /
Record instead of a Tag array. This was leading to the process key-value
inside Jaeger to be the array index as key and the value as the key-value
object. We now use the proper key-value information from the input to place
into the process tags.
There were two approaches we could have taken here: 1. To leave the input
as a Tag array and process the input properly in the code or 2. To change
the input to a key-value record / object (Record<string, TagValue), which
would be handled properly by the existing code. We have chosen approach #1
because a Jaeger process tag CAN support multiple tags with the same key
name, which would not be supported in approach #2. There is a chance that
(because we were not previously exporting typescript types) users were
passing in a Record format instead of Array, and thus this might be seen
as a breaking change.
A test has been added to validate the process information to ensure proper
format.
Also included are sticter typing for all thrift types, removing all `any`
references and replacing with valid types.1 parent c7226d6 commit 5882009
File tree
4 files changed
+127
-26
lines changed- packages/opencensus-exporter-jaeger
- src
- jaeger-driver
- test
4 files changed
+127
-26
lines changedLines changed: 59 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
46 | 91 | | |
47 | 92 | | |
48 | 93 | | |
49 | 94 | | |
50 | | - | |
51 | | - | |
| 95 | + | |
| 96 | + | |
52 | 97 | | |
53 | 98 | | |
54 | 99 | | |
55 | 100 | | |
56 | 101 | | |
57 | 102 | | |
58 | | - | |
| 103 | + | |
59 | 104 | | |
60 | 105 | | |
61 | 106 | | |
| |||
70 | 115 | | |
71 | 116 | | |
72 | 117 | | |
73 | | - | |
| 118 | + | |
74 | 119 | | |
75 | 120 | | |
76 | 121 | | |
| |||
83 | 128 | | |
84 | 129 | | |
85 | 130 | | |
86 | | - | |
87 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
88 | 134 | | |
89 | 135 | | |
90 | 136 | | |
91 | 137 | | |
92 | 138 | | |
93 | 139 | | |
94 | | - | |
95 | | - | |
| 140 | + | |
| 141 | + | |
96 | 142 | | |
97 | 143 | | |
98 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | | - | |
72 | | - | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | | - | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
78 | 116 | | |
79 | 117 | | |
80 | 118 | | |
| |||
114 | 152 | | |
115 | 153 | | |
116 | 154 | | |
117 | | - | |
| 155 | + | |
118 | 156 | | |
119 | 157 | | |
120 | 158 | | |
| |||
131 | 169 | | |
132 | 170 | | |
133 | 171 | | |
134 | | - | |
| 172 | + | |
135 | 173 | | |
136 | 174 | | |
137 | 175 | | |
| |||
174 | 212 | | |
175 | 213 | | |
176 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
177 | 220 | | |
| 221 | + | |
178 | 222 | | |
179 | 223 | | |
180 | 224 | | |
181 | 225 | | |
182 | | - | |
| 226 | + | |
| 227 | + | |
183 | 228 | | |
184 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
185 | 236 | | |
186 | 237 | | |
187 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
0 commit comments