I am looking at the docs for metrics_exporter_prometheus::PrometheusBuilder:
AFAICT I can call with_http_listener only once, so I can't pass both an IPv4 and IPv6 socket address. I don't see a way to configure the listener socket in v6-mapped mode, either, which would let us use the same socket.
Also, if we wanted to listen on non-localhost, both for v4 and v6, we'd need a way to specify two actual addresses.
I think the answer is probably to provide with_http_listeners that takes an iterator of SocketAddr, or similar.
I am looking at the docs for
metrics_exporter_prometheus::PrometheusBuilder:AFAICT I can call
with_http_listeneronly once, so I can't pass both an IPv4 and IPv6 socket address. I don't see a way to configure the listener socket in v6-mapped mode, either, which would let us use the same socket.Also, if we wanted to listen on non-localhost, both for v4 and v6, we'd need a way to specify two actual addresses.
I think the answer is probably to provide
with_http_listenersthat takes an iterator ofSocketAddr, or similar.