metrics-exporter-prometheus: Add API to initialize HTTP listener from existing TcpListener#590
metrics-exporter-prometheus: Add API to initialize HTTP listener from existing TcpListener#590michelhe wants to merge 2 commits intometrics-rs:mainfrom
Conversation
|
I do intend to look at this soon, but changes to |
5e9f6d4 to
0b0b132
Compare
… TCP listener This commit adds a new API to the `PrometheusBuilder` that allows users to provide their own configured TCP listener. The use case is to enable users to configure the TCP listener before passing it to the exporter - for example, to set socket options or bind to port 0 and retrieve the port number assigned by the OS. Signed-off-by: Michel Heily <michel.heily@wiz.io>
tobz
left a comment
There was a problem hiding this comment.
The more I looked at it, the more I thought it's probably OK to add another method for now. 🤷🏻
Left one comment about cleaning up the doc comment for the new method.
Great, thanks for the consideration and willingness to upstream it! :) |
This commit adds a new API to the
PrometheusBuilderthat allows users to provide their own configured TCP listener. The use case is to enable users to configure the TCP listener before passing it to the exporter - for example, to set socket options or bind to port 0 and retrieve the port number assigned by the OS.My own use case for this is to use port=0 and then grab the port, log it and then give it to
PrometheusBuilder