Update README.md

Co-authored-by: Owen Williams <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
1 file changed
tree: 8371675acf64d3f3a6436f52a05ce05b1e985387
  1. .circleci/
  2. .github/
  3. assets/
  4. config/
  5. expfmt/
  6. helpers/
  7. model/
  8. promslog/
  9. route/
  10. scripts/
  11. server/
  12. version/
  13. .gitignore
  14. .golangci.yml
  15. .yamllint
  16. CODE_OF_CONDUCT.md
  17. CONTRIBUTING.md
  18. go.mod
  19. go.sum
  20. LICENSE
  21. MAINTAINERS.md
  22. Makefile
  23. Makefile.common
  24. NOTICE
  25. README.md
  26. RELEASE.md
  27. SECURITY.md
README.md

Common

circleci OpenSSF Scorecard

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.

  • assets: Embedding of static assets with gzip support
  • config: Common configuration structures
  • expfmt: Decoding and encoding for the exposition format
  • model: Shared data structures
  • promslog: A logging wrapper around log/slog
  • route: A routing wrapper around httprouter using context.Context
  • server: Common servers
  • version: Version information and metrics

Metric/label name validation scheme

The 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 requirements
  • model.UTF8Validation => Metric and label names are only required to be valid UTF-8 strings

The 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.