Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify escaping #7

Closed
brian-brazil opened this issue Jul 18, 2017 · 2 comments
Closed

Unify escaping #7

brian-brazil opened this issue Jul 18, 2017 · 2 comments

Comments

@brian-brazil
Copy link
Contributor

Currently there's slightly different escaping rules for label values and help string. It's not unlikely that implementors will get this incorrect, so we should unify on just one approach.

prometheus/docs#550

@mattbostock
Copy link
Contributor

For convenience, from https://prometheus.io/docs/instrumenting/exposition_formats/#text-format-details:

label_value can be any sequence of UTF-8 characters, but the backslash, the double-quote, and the line-feed characters have to be escaped as \, ", and \n, respectively.

HELP lines may contain any sequence of UTF-8 characters (after the metric name), but the backslash and the line-feed characters have to be escaped as \ and \n, respectively.

Do we want double quotes to be escaped as \" in the HELP lines?

@brian-brazil
Copy link
Contributor Author

That would be the simplest way to handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants