Skip to content

A simple and stupid question about prometheus_client #938

Answered by beorn7
ElapsedSoul asked this question in Q&A
Discussion options

You must be logged in to vote

You can totally expose Prometheus metrics without using prometheus/client_golang. For very simple cases, that might even be the best. Like you just have one value and want to expose it. Or you have a very specific use case (https://github.com/kubernetes/kube-state-metrics is a famous example of a widely used Go program exposing Prometheus metrics without using prometheus/client_golang .)

prometheus/client_golang solves a whole lot of problems for you, though: Validation, consistency, concurrency-safety, facilitates the actual instrumentation (how to get to the numbers you want to expose), and much more. Just try it out on your own, and you will quickly notice that most cases work much sim…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ElapsedSoul
Comment options

Answer selected by ElapsedSoul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #937 on November 22, 2021 12:54.