micrometer-metrics / prometheus-rsocket-proxy

An RSocket proxy to pull metrics from applications that can only open egress
Apache License 2.0
72 stars 28 forks source link

Prometheus RSocket Client not initialized when spring.main.lazy-initialization=true #83

Open klopfdreh opened 3 months ago

klopfdreh commented 3 months ago

Currently we have an issue that the PrometheusRSocketClientAutoConfiguration does not initialize the PrometheusRSocketClient when the lazy-initialization is set to true.

I guess this is because PrometheusRSocketClient is not required anywhere due to autowiring.

Suggestion would be to add @Lazy(false) and test if this is working in this case.

@onobc / @jonatan-ivanov WDYT?

jonatan-ivanov commented 3 months ago

Thanks for the issue.

Which version are you using? We've released 2.0.0-M1 which is using Boot 3.3, I'm not sure it will make any difference but there is a chance that PrometheusRSocketClientAutoConfiguration will create the client even if lazy-init is true.

klopfdreh commented 3 months ago

Sorry - I didn’t mention it: Spring Boot 3.3 and Prometheus-RSocket-Client 2.0.0-M1