Commit 22f72d6
committed
fix(exporters): always pad Zipkin trace_id to 8 bytes
Previously, when the input trace_id was empty or non-hex, hex_to_bytes
returned an empty vector and the encoder emitted no trace_id field.
Decoded spans then had a zero-length trace_id, which Zipkin rejects.
Mirror the Jaeger behavior: if the decoded hex is not exactly 16 bytes
we left-pad to 8 bytes, producing a valid on-wire ID in all cases.1 parent 51171a7 commit 22f72d6
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
333 | 334 | | |
334 | | - | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
368 | | - | |
369 | | - | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | | - | |
| 372 | + | |
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
| |||
0 commit comments