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
Bump micrometer version to latest #829
Conversation
I'm unsure about this change. |
It's a step in the direction of supporting Spring Boot 3. Whether this tiny change is a good idea or not really hinges on the approach the project maintainers want to take to that. If you want a smooth transition for users I think it should be possible to support Spring Boot 3 and 2.7 with a single release, and one of the steps required will be to upgrade Micrometer, while keeping support for older versions. This is a baby step in that direction. And that is the direction that has kind of been indicated already with the addition of the new style .imports metadata for autoconfiguration. If you prefer a different approach maybe you could outline it here or in one of the other issue discussions. |
Thats the point I dont understand. Why is it required to update micrometer? |
Because Spring Boot 3 uses micrometer features not available before 1.10, and because Spring Cloud Sleuth no longer exists and has effectively been replaced with Micrometer 1.10. Without this upgrade there’s no path for Spring Boot users to get tracing when they migrate to 3.0. |
If they use the spring boot v3 parent bom, then they will automatically have the micrometer update. And if they dont, they can still update micrometer themselves. Depending on the order they are importing the dependencies in they might even get the micrometer update anyway. |
Apparently. There’s no more sleuth so we need to add micrometer tracing for grpc to this library. There’s no way to do that without an upgrade, but it can be done in such a way that existing Spring Boot 2.7 apps won’t be affected (I believe). |
Since it is an optional dependency the user has to add it to their dependencies anyway. |
It’s an optional dependency but this library contains autoconfiguration for tracing, and users will expect that the same level of feature will be available for Spring Boot 3 as with Spring Cloud Sleuth. Again, this requires an upgrade of Micrometer. |
So instead of just upgrading micrometer you want to add some bean config as well to automatically setup the tracing beans? |
I think that’s the best way forward, but you’re the one making decisions. I’m not going to propose any configuration changes until we agree it’s a good idea. I didn’t include those changes partly because I wanted to sound you out first, and partly because there are other blockers for Spring Boot 3 migration ( |
I added a new commit with some autoconfiguration changes. I tested the server configuration in a sample. There's no tracing sample in this project and also no Spring Boot 3 sample, so I didn't want to add that too at the same time. |
33d6e33
to
78486b2
Compare
This is still marked as "waiting for feedback" but I'm not sure what is needed. Can we move this forward please? |
I'm currently busy and don't have time to work on this project. 😿 |
I read the discussion above and it looks like this change will make it incompatible with spring boot 2.7, is it possible to make it compatible with both 2.7 and 3.0 while tracking is working? |
I think you misunderstood. The whole point is to make Spring Boot 3 and 2.7 work (you still have to pick one and add the right dependencies). |
Sorry, I'm not very familiar with spring boot 3.0 at the moment and I see compatibility issues mentioned here. I understand that micrometer was introduced to enable spring boot 3.0 applications to support grpc tracing, and if spring boot 2.7 is used and tracing still works (using spring cloud sleuth), then I think this PR is very valuable. Is there something I am missing? |
Don't think so. That pretty much sums it up - with Spring Boot 2.7 you need Sleuth and with Spring Boot 3.0 it's just Micrometer. |
* In the future, support the Trace feature by merging #829
Would you be able to take some time to merge the master branch and update it? |
This will activate in a Spring Boot 3 application if there is a dependency on one of the micrometer bridge jars, e.g. io.micrometer:micrometer-tracing-bridge-{otel,brave}.
I rebased and the tests are green. Haven't looked into the details much. |
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.
LGTM, I have tested it, and it appears to be working as expected.
Fixes #828