When PrometheusPushGatewayManager.push encounters an exception(UnknownHostException), it will shutdown and No longer attempting metrics publication to this host, how to restart it again

Comment From: wilkinsona

You can't at the moment. The assumption is that an unknown host is a fatal error. If you want the push to restart, you'll have to restart the application. Can you describe your requirement in a bit more detail please? In what situations will an unknown host be a short-lived problem?

Comment From: sandyisone

I have encountered this problem many times. I found it through log records. I don’t know the specific reason. Maybe we can add an option to decide whether to continue or stop.

Comment From: wilkinsona

Looking at Micrometer's PushMeterRegistry, any push failures (Throwable is caught) are logged as warnings and publishing is allowed to continue. While Prometheus is typically scraped, using it with the push gateway makes it quite similar to the various PushMeterRegistry implementations so I think we should probably align the behaviour. In other words, I don't think we should assume that UnknownHostException is fatal and it should be treated like any other exception.

Comment From: sandyisone

Thanks for your help