Path forward with Spring?

47 views
Skip to first unread message

Rich MacDonald

unread,
Jan 29, 2019, 3:34:40 PM1/29/19
to metrics-user
What is the future path for using Dropwizard in Spring? And where are the required jars? On the one hand we see spring-boot using Micrometer to wrap DropWizard. But looking at the dependencies in micrometer.core, why would I want to include so many jars I don't use? On the other hand, where is the "spring-metrics" bridging jar? The Ryan Tenney code hasn't seen an upgrade since 2015 and version 3.1.3 prevents us from migrating to Dropwizard 4.

Is this a communication issue, and the webpages haven't been updated, or do we need to move on? Hope the former.

Rich MacDonald

Ryan Rupp

unread,
Dec 31, 2019, 2:39:33 AM12/31/19
to metrics-user
Old post and I don't know the exact answer but I just wanted to note that most of the dependencies in micrometer core are optional. It looks like they just have support for a bunch of different libraries and instead of having separate modules (like dropwizard metrics) they're leveraging the same core module with optional dependencies so they don't get pulled in transitively and are opt-in by the consuming application if they want to use features then that requires those dependencies. Guessing this is also because it just fits the style of Spring Boot better where auto configuration sees you have Hibernate on the classpath + Micrometer so it will then bootstrap Hibernate metrics from Micrometer automatically (no having to add special micrometer hibernate dependencies). Example of Spring Boot doing this for Hibernate metrics here - https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/orm/jpa/HibernateMetricsAutoConfiguration.java#L51

I haven't looked into this in a while but guessing moving more towards an API for metrics (e.g. micrometer) and shielding your application code from the implementation (Dropwizard) is probably ideal.
Reply all
Reply to author
Forward
0 new messages