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

UTF8 Label Encoding #251

Open
TroyKomodo opened this issue Dec 2, 2024 · 1 comment
Open

UTF8 Label Encoding #251

TroyKomodo opened this issue Dec 2, 2024 · 1 comment

Comments

@TroyKomodo
Copy link

TroyKomodo commented Dec 2, 2024

How should we encode utf8 labels?

if self.prometheus_full_utf8 {
    write!(&mut key_encoder, "{}", key)?;
} else {
    write!(&mut key_encoder, "{}", escape_label(key.as_str()))?;
}

I feel like doing something like this is less than ideal & that the key encoder itself should should either escape or not depending on the encoding (text or protobuf).

--

# HELP target_info Information about the target
# TYPE target_info info
target_info_info{service.name="xxx"} 1
# EOF
@TroyKomodo
Copy link
Author

might be related to #151

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

No branches or pull requests

1 participant