Skip to content

Conversation

immerrr
Copy link
Contributor

@immerrr immerrr commented Jul 21, 2018

This PR introduces a fix for escape sequence handling bugs introduced in #282.

It uses far less regexes than #289. In theory, one could stop using regexes completely, but that would come with a performance hit.

@@ -200,6 +218,50 @@ def test_empty_label(self):
metric_family.add_metric([""], 2)
self.assertEqual([metric_family], list(families))

def test_label_escaping(self):
for escaped_val, etalon_val in [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's etalon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, turns out it's a false cognate in English, it doesn't mean the same as in Russian and French, where it means "standard" as in "measurement standard stored in the bureau of weights and measures". Will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

immerrr added 2 commits July 24, 2018 16:04
Signed-off-by: immerrr <immerrr@gmail.com>
Signed-off-by: immerrr <immerrr@gmail.com>
@immerrr immerrr force-pushed the fix-unescaping-2 branch from 03ebbec to cd15937 Compare July 24, 2018 14:05
@brian-brazil brian-brazil merged commit f2436ca into prometheus:master Jul 24, 2018
@brian-brazil
Copy link
Contributor

Thanks!

@immerrr immerrr deleted the fix-unescaping-2 branch July 24, 2018 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants