-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Add InfluxDB customizer hook point #25319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
More configuration properties are added in order to allow customization for `influxdb` bean. Also, in order to customize `BatchOptions`, `InfluxDbBatchOptionsCustomizer` is added. See spring-projectsgh-20867
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @eddumelendez. This looks good (I had no idea we could expose so many options).
I think we need a InfluxDbPropertiesTests
that validates the defaults are consistent (see other such *PropertiesTests for more details).
...onfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbProperties.java
Outdated
Show resolved
Hide resolved
...onfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbProperties.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/boot/autoconfigure/influx/InfluxDbBatchOptionsCustomizer.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbAutoConfiguration.java
Outdated
Show resolved
Hide resolved
@snicoll thanks for the review and quickly replies. I will submit the changes later today. |
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. |
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. |
This commit augments the configuration properties that are exposed for InfluxDB, alongside an `InfluxDbCustomizer` that gives more control. See gh-25319
I've pushed some hacking code to support the new driver as well, see https://github.com/snicoll/spring-boot/tree/influx-client-java |
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:
Or is there different approach? Regards |
@bednar I've shared a commit in the comment just above yours, have you seen it? |
Yeah I saw it 😏... I just want to be sure that we will select correct path. Thanks for quick reply 👍 |
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). |
I'm maintainer of influxdb-client-java
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 I can help you with tests and support for |
I am aware of that. I didn't understand what you mean by "we will select correct path".
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. |
More configuration properties are added in order to allow
customization for
influxdb
bean. Also, in order tocustomize
influxdb
,InfluxDbCustomizer
is added.See gh-20867