spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.55k stars 40.54k forks source link

Provide auto-configuration for datasource-micrometer-spring-boot #39287

Open shalom938 opened 7 months ago

shalom938 commented 7 months ago

Hello We wanted to ask if its possible to include net.ttddyy.observation:datasource-micrometer-spring-boot:1.0.3 in spring boot starters ?

wilkinsona commented 7 months ago

What do you mean by "include … in Spring Boot starters"? I don't think we have an official starter where it would be a good fit, but we could add it to the list of third-party starters if @ttddyy is happy for us to do so.

jonatan-ivanov commented 7 months ago

I think this might be coming from a conversation I had with @doppleware, I asked him to create an issue, I guess @shalom938 is his colleague. :)

The Boot docs mentions net.ttddyy.observation:datasource-micrometer-spring-boot as the way of instrumenting JDBC. Since the project seems to be stable and popular, I think it would be great to add it to the BOM and provide auto-configuration for it in Boot (basically moving its auto-configuration into actuator). We can also discuss it with @ttddyy to move datasource-micrometer (the instrumentation) to Micrometer (JDBC will never instrument itself with Micrometer like R2DBC does). What do you think?

wilkinsona commented 7 months ago

Thanks, @jonatan-ivanov, for clearing up the confusion around naming. So what we're looking for here is auto-configuration. We probably wouldn't have a starter for it or include it in an existing starter but it would activate when someone adds the dependency to their app.

wilkinsona commented 7 months ago

We can also discuss it with @ttddyy to move datasource-micrometer (the instrumentation) to Micrometer (JDBC will never instrument itself with Micrometer like R2DBC does).

That sounds like a good idea to me. I'll mark this as blocked for now until we know what's happening there.