More configuration properties are added in order to allow
customization for influxdb
bean. Also, in order to
customize influxdb
, InfluxDbCustomizer
is added.
See gh-20867
Comment From: eddumelendez
@snicoll thanks for the review and quickly replies. I will submit the changes later today.
Comment From: snicoll
Thanks for the follow-up @eddumelendez. I've polished the PR but I want to hold off as reviewing this made me realize about the new InfluxDB client. I think we need to investigate the changes before adding more properties here.
Comment From: snicoll
We've discussed this and decided to only include the customizer for now. Looking at the new client, concepts have changed in such a way that adding more properties would mean we'd be in a tricky situation when upgrading to it. On the contrary, we could easily add support for both clients with the support that we have.
Comment From: snicoll
I've pushed some hacking code to support the new driver as well, see https://github.com/snicoll/spring-boot/tree/influx-client-java
Comment From: bednar
Hi @snicoll,
we want to prepare a support for the new driver.
What is a best way how to do it in terms of packaging? I think there are two possibility how to do it:
- create new package
org.springframework.boot.autoconfigure.influx2
- use existing package
org.springframework.boot.autoconfigure.influx
and an implementation for new client will have naming such as:InfluxDbClientAutoConfiguration
,InfluxDbClientProperties
, ...
Or is there different approach?
Regards
Comment From: snicoll
@bednar I've shared a commit in the comment just above yours, have you seen it?
Comment From: bednar
Yeah I saw it 😏... I just want to be sure that we will select correct path. Thanks for quick reply 👍
Comment From: snicoll
Not sure who is we. Given that I've already something, it would be better to get some feedback on that rather than working on a separate PR (if that's what you want to do).
Comment From: bednar
Not sure who is we.
I'm maintainer of influxdb-client-java
Given that I've already something, it would be better to get some feedback on that rather than working on a separate PR (if that's what you want to do).
I think that your implementation is fine (https://github.com/snicoll/spring-boot/tree/influx-client-java), just a preferred way for authentication is by token
(https://github.com/snicoll/spring-boot/blob/0359550f4631ab1cdc41427ac83345438293f146/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbClientAutoConfiguration.java#L52).
I can help you with tests and support for HealthIndicator
.
Comment From: snicoll
I'm maintainer of influxdb-client-java
I am aware of that. I didn't understand what you mean by "we will select correct path".
I think that your implementation is fine (https://github.com/snicoll/spring-boot/tree/influx-client-java), just a preferred way for authentication is by token
Thank you for reviewing. Let's move this conversation on #25891. I know that token is preferred with v2 but that would introduce a v2 specific property and I am not sure yet we want to do that. I've flagged the issue for team meeting so that we can discuss our options.