Closed jjank closed 3 months ago
Great start here @jjank ; thanks for your continued support of the project. These changes look great to me; We can include them in the Spring Boot 3.3 migration in rewrite-spring already to ensure users are at least seeing a start to the required changes.
That makes sense (I see this is already refered to in https://github.com/openrewrite/rewrite-spring/issues/526).
I'd be happy to contribute this particular recipe to the Boot 3.3 migration after it's released. At some point it probably should be incorporated into the "generic" org.openrewrite.micrometer.UpgradeMicrometer
recipe.
I've indeed linked the two right now ; in rewrite-spring I think it's best to include org.openrewrite.micrometer.UpgradeMicrometer13
for the Spring Boot 3.3 migration, as opposed to UpgradeMicrometer
, such that a year from now that's not picking up a wildly different version just yet.
That makes sense (I see this is already refered to in openrewrite/rewrite-spring#526).
I'd be happy to contribute this particular recipe to the Boot 3.3 migration after it's released.
Great! The way our projects depend upon each other there's no need to wait for a release; rewrite-spring would be able to depend on this change already. Be sure to refresh your dependencies to pull down the latest snapshot from Sonatype OSS Snapshots, built from the main branch here.
We wouldn't need more than just an added dependency + inclusion of the recipe there; we already tested the changes here.
Cool, I'll give it a try right away 👍
What's changed?
Initial work on Migrate to micrometer v1.13.+
What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
@timtebeek
Any additional context
The migration from
io.prometheus.client.CollectorRegistry
toio.prometheus.metrics.model.registry.PrometheusRegistry
is probably not covering all cases. But for many code bases simply changing the type might be sufficient becauseCollectorRegistry
andPrometheusRegistry
have a very similar (and small) public api that essentially only offers a singleton - exposed as constant with equal names - and a constructorChecklist