POC: Serve a nice HTML page

One of the main reasons we hear for defaulting to the text format is
that "look at the raw metrics in a browser" is a common use case.

Browsers send accept headers, so we can explicitly take this use case
into account, and render an HTML representation of the metric family.

For the purposes of the PoC, this simply wraps the text format. To
really make things nicer, we can and should render the metrics in a more
appealing format, with labels in a table, and possibly a bar chart for
histograms.

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
4 files changed
tree: 744372d49bae884453fe15d01e0898daa2dee77f
  1. .circleci/
  2. .github/
  3. assets/
  4. config/
  5. expfmt/
  6. internal/
  7. model/
  8. promlog/
  9. route/
  10. server/
  11. sigv4/
  12. version/
  13. .gitignore
  14. .yamllint
  15. CODE_OF_CONDUCT.md
  16. CONTRIBUTING.md
  17. go.mod
  18. go.sum
  19. LICENSE
  20. MAINTAINERS.md
  21. Makefile
  22. Makefile.common
  23. NOTICE
  24. README.md
  25. SECURITY.md
README.md

Common

circleci

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
  • promlog: A logging wrapper around go-kit/log
  • route: A routing wrapper around httprouter using context.Context
  • server: Common servers
  • version: Version information and metrics