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 dropwizard-metrics to 4.0.2 #943
Conversation
Hi @jifwin, thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. Sincerely, |
Thank you @jifwin for signing the Contribution License Agreement. Cheers, |
Any idea on why DowngradingConsistencyRetryPolicyIntegrationTest.should_try_next_host_on_connection_error fails? It doesn't seem to be related with changes I made. |
Hi, Unfortunately this change breaks backward compatibility: Metrics 4 requires Java 8, but we still support Java 6 in our 3.x series. Our next major version, 4.0.0 (currently in late alpha stage) will require Java 8, and depend on Metrics 4 out of the box. In the meantime, if you really need something in Metrics 4, I think it's possible to upgrade from your application code. Add the dependency to the new version, and disable the built-in JMX reporting with |
Just leaving my comment here for maintainers. Not sure where else to do that. I would personally like to have this merged even if there wasn't java 6 compatibility issue. But I don't think it is the right thing to do for such a core library as cassandra driver. Lots of users will not be able to upgrade to v4 because it is very new and not all libraries are compatible with it yet, jut like this driver. I think the whole metrics thing needs to be revisited. It is better to provide hooks that people can plug in whatever metrics library they choose to use. Some default implementations can be provided, but the driver itself must not depend on any library. Dropwizard metrics v5 yet again has changed the top level package and if we want to avoid mess with versions, driver should not be dependant on any metrics lib. |
Very recently with the release of java driver 4.0.0-alpha3 we introduced a metrics component that is more featureful and extensible than the existing one in 3.x. The interfaces provided are not strictly dependent on dropwizard metrics (although we use similar terms in our interfaces, see here), so in theory one could develop and plug-in an alternative implementation that uses a different metrics library. I am curious though, are there popular alternatives to dropwizard metrics? I'm so accustomed myself to using it and it's always been adequate such that i've never explored alternatives. I don't expect that we would provide alternative implementations, unless there are popular alternatives that users are asking for.
The driver's use of dropwizard metrics is not a hard dependency per se. While we list it in our maven dependencies, if you pass |
Micrometer. Spring Boot 2 is moving their default metrics library from DropWizard to Micrometer. Once Spring Boot 2 adoption picks up micrometer will go to masses. And breaking changes in dropwizard library itself makes a clear case for not having it as a hard requirement if one wants to have metrics. I couldn't find Also you are using HDRHistogram library in 4.x branch. FYI Dropwizard v4 comes with a new Reservoir which you can consider using instead of HDR (or make it configurable). (SlidingTimeWindowArrayReservoir)[http://metrics.dropwizard.io/4.0.0/manual/core.html#sliding-time-window-reservoirs] |
We've merged Cluster and Session in 4.x. The equivalent is
Yes, at first sight I don't see anything preventing it, we should definitely explore this further (I've created JAVA-1759 to that effect). The dependency to Dropwizard can't be completely eliminated because of
SlidingTimeWindowArrayReservoir stores every datapoint, which wouldn't work well in our high-throughput environment. HDR is more appropriate for our use case. |
Neat, I was not aware of this library, it looks like it GA'd this week, so it's still very new but I agree it could see a lot of traction. 👍 for looking into ways so supporting alternative metrics libraries in java driver 4.x. |
Given @olim7t 's comment about Metrics 4.x's dependency on Java 8, I think we will stick to Metrics 3.2 as a dependency for now, so I'm closing this. However as also mentioned, Metrics 4.x will work with the driver with some caveats. Since I suspect a number of users will want to do this, I added some instructions to our documentation via #958 for how to use Metrics 4.x with the driver. I experimenting a bit with this and it appears to work well. |
No description provided.