Replace dropwizard-metrics with micrometer 1.15.4 - #2218
Open
Baqirrizvidev wants to merge 1 commit into
Open
Conversation
MetricsProvider now hands out Micrometer Counters (for the old meters and counters) and DistributionSummaries configured to publish the percentiles the metrics tables display (50/75/99/99.9), registered against a JmxMeterRegistry when JMX is enabled. Dropwizard meters exposed a one-minute EWMA rate; Micrometer counters leave rates to the consumer, so the two providers that read getOneMinuteRate now sample the counter on their run cycle via a small CounterRatePerSecond helper. Fixes finos#1785 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Deploy Preview for papaya-valkyrie-395400 canceled.
|
One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via: Supported
Alternatively, if the co-author should not be included, remove the Please update your commit message(s) by doing |
Contributor
|
Hi @Baqirrizvidev, thanks for your contribution! Before we can review it, we'll need you to complete the EasyCLA steps above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1785
What changed
toolboxnow depends onmicrometer-coreandmicrometer-registry-jmx1.15.4 (aligned with the Spring Boot BOM) instead ofio.dropwizard.metrics.MetricsProviderkeeps itsmeter/counter/histogramAPI shape, but hands out MicrometerCounters andDistributionSummarys. Summaries publish the percentiles the metrics tables display (50/75/99/99.9). When JMX is enabled the registry is aJmxMeterRegistry, otherwise aSimpleMeterRegistry— matching the old conditionalJmxReporter.inc()/mark()→increment(),update(millis)→record(millis), snapshot reads (getMean/getMax/getMedian/getNNthPercentile) →takeSnapshot()+mean()/max()/percentile lookup.One semantic decision to review
Dropwizard
MeterexposedgetOneMinuteRate(1-minute EWMA), read byMetricsTableProvider(updatesPerSecond) andMetricsViewPortParallelismProvider. Micrometer counters deliberately leave rate computation to the backend/consumer, so those providers now sample the counter on their 1-second run cycle via a smallCounterRatePerSecondhelper — a windowed instantaneous rate rather than a 1-minute EWMA. The displayed values will be less smoothed than before; happy to add EWMA smoothing to the helper if you'd rather preserve the old feel.Two smaller notes:
snapshot.count()(total recorded events) replacesgetValues.length(reservoir sample size) for the_samplescolumns.HierarchicalNameMapper, so bean names may differ slightly from the Dropwizard reporter's.Testing
mvn -pl toolbox test: 55/55 pass (including the migratedMetricsProviderTest).mvn -pl vuu test -Dsuites=org.finos.vuu.core.table.InMemSessionDataTableTest: passes (counter/meter counts still recorded throughInMemDataTable).mvn -pl toolbox,vuu -am compile: clean.🤖 Generated with Claude Code