In the configuration for pushing metrics to elasticsearch there is room to configure a connectTimeout and readTimeout in the ElasticProperties.

These settings are not properly propagated by the ElasticPropertiesConfigAdapter and therefore the configuration always falls back to the default 1S connect timeout and 10S read timeout.

In practice this is often not enough and results in a lot of errors sending metrics to elastic.

Although configuring these timeouts is deprecated in micrometer and should be configured directly on the HttpSender implementation, there is no possibility now to configure this HttpSender implementation in the actuator setup.

I see two solutions; 1. Temporarily add support for the deprecated settings in the ElasticPropertiesConfigAdapter 2. Add support to fully configure the HttpSender for pushing metrics purposes.

Comment From: snicoll

These settings are not properly propagated by the ElasticPropertiesConfigAdapter and therefore the configuration always falls back to the default 1S connect timeout and 10S read timeout.

Are you seeing such default timeout with the auto-configuration?

I see two solutions;

Temporarily add support for the deprecated settings in the ElasticPropertiesConfigAdapter

As far as I am aware, Micrometer has no use of that (since they are deprecated) so I don't understand what that would give you.

Add support to fully configure the HttpSender for pushing metrics purposes.

We already do that.

Comment From: robfaber

Looked into it again and you are right the settings are working. I was confused because this HttpUrlConnectionSender is constructed twice in the autoconfiguration. First time around with the defaults on 'ElasticMeterRegistry.builder(elasticConfig)' later on this client is overridden with proper settings. Thanks I guess no further action needed and the issue can be closed!

gr Rob