operator-framework / josdk-spring-boot-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OperatorAutoConfiguration with metrics

mteubner opened this issue · comments

Hello,

is there a way to configure the Operator with Metrics?

I'm currently using the java-operator-sdk with ConfigurationServiceOverrider to add MicrometerMetrics. Now I want to change to spring boot for adding actuator, and otherthings to the operator, but I struggle to configure the configuration, without override the AutoConfig Implementation.

Kind Regards

HI @mteubner , it does not seems to.
I can take a look later, but quite busy, so probably just in 1-2 weeks.
If you could fix that would be very helpful.

Hi @csviri, I currently see no easy way of doing so ;)

The main issue is that the metrics-support is optional so it shall not be needed when using the starter right?

We could change the OperatorAutoConfiguration to implement getMetrics somehow, but I'm currently don't know how to inject optional classes without making them dependent.

So I don't know if there would be an easy way to make this injectable.

Good question, pretty sure that this is doable, but might not be trivial indeed. Will try to take a look if can find some time.

hello, similarly I think it could be useful to allow the configuration of an ExecutorService. It seems a bit the same situation as for metrics that it has a default implementation in ConfigurationService that OperatorAutoConfiguration does not override. For the executor service, it is possible to configure a part of it (the number of reconcilation threads), but it would be nice to have more/total control over the used executor.

if not too naive as solution, I can propose this commit kroonprins@41ac1f2 in a PR

This looks closable.