| commit | 3382528d0c0b25fadb8640314d92ec1728669459 | [log] [tgz] |
|---|---|---|
| author | Arve Knudsen <[email protected]> | Mon Jul 14 19:35:45 2025 |
| committer | GitHub <[email protected]> | Mon Jul 14 19:35:45 2025 |
| tree | 8371675acf64d3f3a6436f52a05ce05b1e985387 | |
| parent | 752251bd65d47e07175064c01173d6f4fdcfe145 [diff] |
Update README.md Co-authored-by: Owen Williams <[email protected]> Signed-off-by: Arve Knudsen <[email protected]>
This repository contains Go libraries that are shared across Prometheus components and libraries. They are considered internal to Prometheus, without any stability guarantees for external usage.
context.ContextThe libraries in this Go module share a notion of metric and label name validation scheme. There are two different schemes to choose from:
model.LegacyValidation => Metric and label names have to conform to the original Prometheus character requirementsmodel.UTF8Validation => Metric and label names are only required to be valid UTF-8 stringsThe active name validation scheme is normally implicitly controlled via the global variable model.NameValidationScheme. It's used by functions such as model.IsValidMetricName and model.LabelName.IsValid. However, if building with the experimental build tag localvalidationscheme, the model.NameValidationScheme global is removed, and the API changes to accept the name validation scheme as an explicit parameter. model.NameValidationScheme is deprecated, and at some point, the API currently controlled by the build tag localvalidationscheme becomes standard. All users of this library will be expected to move to the new API, and there will be an announcement in the changelog when the global is removed. For the time being, the localvalidationscheme build tag is experimental and the API enabled by it may change.