forked from prometheus/common
-
Notifications
You must be signed in to change notification settings - Fork 0
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
UTF8: Content negotiation (encoding side) #2
Closed
ywwg
wants to merge
31
commits into
owilliams/quoted-metric-name
from
owilliams/quoted-metric-name-02
Closed
UTF8: Content negotiation (encoding side) #2
ywwg
wants to merge
31
commits into
owilliams/quoted-metric-name
from
owilliams/quoted-metric-name-02
Conversation
This file contains 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
ywwg
commented
Jan 10, 2024
cbd00f5
to
0940b71
Compare
45 tasks
…eus#537) UTF-8 support in validation, and some parsers and formatters --------- Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
more cleanup and simplification Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
Signed-off-by: Owen Williams <[email protected]>
eef9af4
to
f4d7f87
Compare
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.