2 ms·
It sure is until you consider that now you have to maintain that endpoint and have it be constantly up or it will simply miss metrics. Not to mention the occasi
by 101km 9y ago
It sure is until you consider that now you have to maintain that endpoint and have it be constantly up or it will simply miss metrics. Not to mention the occasional network partition is outside your control.
Additionally, I would argue some sort of discovery/registry mechanism is in order anyway.
For example, Prometheus has very solid integration with Kubernetes. In this universe you have one central control plane thingy (the scheduler) responsible for bringing resources up and down, it updates the collector (Prometheus) about all the devices (pods, containers, damn we have too many terms for things) accordingly, which in turn scrapes on a best effort basis.
Once everything is hooked up like this you're basically guaranteed that applications that provide information about themselves will get scraped eventually. If they are reachable you'll know what is going on inside them, and if they are not, you'll know that too.
The advantages of this sort of decoupling are subtle and difficult to get right, but you'll be thankful down the line for having done so correctly from the get go.