UTF8: Content negotiation (encoding side)#2
Closed
ywwg wants to merge 31 commits intoowilliams/quoted-metric-namefrom
Closed
UTF8: Content negotiation (encoding side)#2ywwg wants to merge 31 commits intoowilliams/quoted-metric-namefrom
ywwg wants to merge 31 commits intoowilliams/quoted-metric-namefrom
Conversation
ywwg
commented
Jan 10, 2024
cbd00f5 to
0940b71
Compare
Closed
40 tasks
…eus#537) UTF-8 support in validation, and some parsers and formatters --------- Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
more cleanup and simplification Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
eef9af4 to
f4d7f87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on prometheus#537 by adding content negotation during scraping.
Scrapers can announce that they support utf-8 names by adding "validchars=utf8" in the Content-Type header. In cases where utf8 is not available, metric providers can be configured to escape names in a few different ways: values (U__ utf value escaping for perfect round-tripping), underscores (all invalid chars become _), dots (dots become dot, _ becomes __, all other values become __).
This is still a noop for existing configurations because scrapers will not be passing the validchars key in the Content-Type header. Existing functionality is maintained.