-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service discovery is the responsibility of Prometheus #178
Comments
It came from #83 (feature request) and #137 (PR), cc @goofballLogic @nwest1 thoughts? |
Thanks for the mention - Bottom-line, this simplified the code necessary to emit metrics. If it was removed, it would mean more complexity and repetition in our own code, and no (easy) ability to label default metrics in a way we would expect. Due to timelines/prioritization this was a feature we found useful - especially when not having access to modify prometheus config. Would a note about the recommended approach be sufficient here without a full removal? |
This is such a common misunderstanding of the Prometheus architecture that it should be removed. You should switch to relabelling for this. |
I would like to point out that there is a legitimate use case for using When using node cluster node, it can be used to apply a "worker" label with the worker id. This cannot be done outside of All of the official prometheus client libraries are for languages that are multi-threaded (rather than multi-process), so they don't need this feature. |
The Python client's multi-process mode handles this internally. Instrumentation shouldn't have to care how exposition is done. |
I would be happy if |
Is there support for the multi-target pattern in this library? It doesn't seem like there's any way to pass parameters into exporters with this client, and that can be a blocker for certain setups |
https://github.com/siimon/prom-client#default-labels-segmented-by-registry indicates that this library has functionality to allow setting target labels. This is an anti-pattern in Prometheus as that's the role of service discovery/relabelling, and a client library should not facilitate this anti-pattern. This functionality should be removed.
The text was updated successfully, but these errors were encountered: