Commit 2426a94
committed
Improve escaping of newlines in metrics key-value store
Since otherwise any field that contains a carriage return character
could span multiple lines in the metrics data store, which then
wouldn't be read back in its entirety by `bin/report`, which would
lead to eg a truncated fields in Honeycomb.
Such characters are much less likely now after #1789, however,
they can still be present in the user-provided input (that ends up
in fields like `failure_detail`) in some cases, plus from a general
correctness point of view, the key-value store should be escaping
all forms of newline characters.
I've also changed the escaping strategy to use literal `\n` and `\r`
characters so it's possible to distinguish between multi-line and
single line (but space delimited) values more easily.
GUS-W-18471014.1 parent 819fb61 commit 2426a94
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments