Skip to content

UTF8 Label Encoding #251

Description

@TroyKomodo

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions