Add UTF-8 support in metric and label names
As part of the initiative for adding UTF-8 support to Prometheus, this PR brings UTF-8 support for metric and label names as described in this proposal (for example: {"metric.name", "label.name"="value"}.
For UTF-8 label names defined in the URL path, an escaping syntax is used. For example, the label "label.name"="value" would be escaped like: /metrics/job/example/U__label_2e_name/value. This escaping is compatible with the base64 encoding for label values: /metrics/job/example/U__label_2e_name@base64/dmFsdWU=
UTF-8 support can be enabled by running the Pushgateway with the flag --push.enable-escaped-labels=true
Addresses https://github.com/prometheus/pushgateway/issues/623
Sorry, still fighting my backlog. I hope I get to review this tomorrow.
@beorn7 Thanks for your feedback, the requested changes were addressed.
@beorn7 Sorry about the documentation, thanks for pointing it out, now it's added. Also added EscapingScheme comment.
@beorn7 Thanks for the docs suggestions, done.