Skip to content

parser: Don't assume values don't contain commas

Will Chandler (ex-GitLab) requested to merge wc/fix-comma-key into master

Previously we assumed that valid metric names, labels, and values could not contain a comma, square bracket, or quote. However, we have received an example of commas being present in #49 (closed), and there is no reason that the other characters listed could not be present as well. We currently split on these characters when finding items, but perform no checks that the split point isn't inside a quoted string.

Resolve this creating new scan_str function to detected escaped quotes and avoiding splits that may occur within a quoted string.

Closes #49 (closed)

Merge request reports

Loading