Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Construct with makeName
to ensure that names use only valid characters
makeValid :: Text -> Text Source #
Make the input match the regex [a-zA-Z_][a-zA-Z0-9_]
which
defines valid metric and label names, according to
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
Replace invalid characters with _
and add a leading _
if the
first character is only valid as a later character.