Closed asarkar closed 4 years ago
This issue is stale because it has been open 180 days with no activity. Remove the "stale" label or comment or this will be closed in 14 days.
If the methods in a MetricRegistryListener are invoked before a meter has been added to the registry, clients may choose to proxy/wrap desired meters, thus making it possible to easily collect metrics using the library of their choice.
Hello @asarkar Your assumption is wrong because in opposite to Micrometer were the user is not able to register timers or histograms created by herself Metrics-Core allows this, so histogram bellow can not be intercepted in way that you suppose:
Histogram compactionHistogram = new Histogram(new DecayingEstimatedHistogramReservoir());
CassandraMetricsRegistry.Metrics.register("my-histogram", compactionHistogram);
Since the user already achieved reference to histogram any decoration will not work.
I'm trying to capture Cassandra client-side query latency metrics using Micrometer. Cassandra Java driver exposes some metrics through Dropwizard, but there's no way to bridge Dropwizard -> Micrometer for general meters like timers and histograms; Dropwizard
MetricRegistryListener
methods are invoked after a meter has been added to the registry, thus eliminating any chance of interception.If the methods in a
MetricRegistryListener
are invoked before a meter has been added to the registry, clients may choose to proxy/wrap desired meters, thus making it possible to easily collect metrics using the library of their choice.