Motivation:
The DataStax Java driver for Cassandra can be configured to expose driver session operational metrics. Currently these metrics are not available through Spring Boot Actuator.
Modifications:
This commit adds support for Cassandra driver metrics through Spring Boot Actuator by binding the native driver metrics to Micrometer metrics.
Result:
Users are now able to access Cassandra driver enabled metrics through Actuator .
Comment From: emerkle826
Converting from Dropwizard metrics to Micrometer metrics tends to be lossy and have an impedance mismatch. Furthermore, if a MeterBinder is the solution that ends up being used, I'm not sure it belongs in Spring Boot as there is nothing specific to Spring or Spring Boot in it - either the Cassandra driver or Micrometer would seem more appropriate. Spring Boot could make use of that, then. That said, rather than mapping to non-idiomatic Micrometer metrics, it would be best if the Cassandra driver either:
* supported Micrometer directly as an option. Or * had hooks so that Micrometer could instrument the metrics natively, without passing through Dropwizard metrics.
See micrometer-metrics/micrometer#1397 and micrometer-metrics/micrometer#1359
Thank you for the review, you have valid points about this sort of metrics binding not being specific to Spring. We (the driver team at Datastax) have discussed it further and have decided to try the approach of providing different metrics bindings for the Cassandra driver (ticket is here).
I'll convert this to a draft PR and revisit it once that work is completed.
Comment From: snicoll
@emerkle826 thanks for the follow up!
Comment From: snicoll
@emerkle826 does this PR still make sense? I understand some major changes are pending in the driver so I am wondering if you would reuse this PR to update us. Thank you.
Comment From: emerkle826
@snicoll I think this PR will become obsolete once we make changes on the driver side. I'll close it. If a change still needs to happen in Spring Boot after the driver changes, I'll open a new PR as it will most likely not resemble this one much at all.
Comment From: snicoll
Thanks for confirming. Let us know if we can help!