Skip to content

Replace dropwizard-metrics with micrometer 1.15.4 - #2218

Open
Baqirrizvidev wants to merge 1 commit into
finos:mainfrom
Baqirrizvidev:fix-1785-micrometer
Open

Replace dropwizard-metrics with micrometer 1.15.4#2218
Baqirrizvidev wants to merge 1 commit into
finos:mainfrom
Baqirrizvidev:fix-1785-micrometer

Conversation

@Baqirrizvidev

Copy link
Copy Markdown

Fixes #1785

What changed

  • toolbox now depends on micrometer-core and micrometer-registry-jmx 1.15.4 (aligned with the Spring Boot BOM) instead of io.dropwizard.metrics.
  • MetricsProvider keeps its meter/counter/histogram API shape, but hands out Micrometer Counters and DistributionSummarys. Summaries publish the percentiles the metrics tables display (50/75/99/99.9). When JMX is enabled the registry is a JmxMeterRegistry, otherwise a SimpleMeterRegistry — matching the old conditional JmxReporter.
  • Call sites: inc()/mark()increment(), update(millis)record(millis), snapshot reads (getMean/getMax/getMedian/getNNthPercentile) → takeSnapshot() + mean()/max()/percentile lookup.

One semantic decision to review

Dropwizard Meter exposed getOneMinuteRate (1-minute EWMA), read by MetricsTableProvider (updatesPerSecond) and MetricsViewPortParallelismProvider. 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 small CounterRatePerSecond helper — 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) replaces getValues.length (reservoir sample size) for the _samples columns.
  • JMX bean naming follows Micrometer's HierarchicalNameMapper, so bean names may differ slightly from the Dropwizard reporter's.

Testing

  • mvn -pl toolbox test: 55/55 pass (including the migrated MetricsProviderTest).
  • mvn -pl vuu test -Dsuites=org.finos.vuu.core.table.InMemSessionDataTableTest: passes (counter/meter counts still recorded through InMemDataTable).
  • mvn -pl toolbox,vuu -am compile: clean.

🤖 Generated with Claude Code

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>
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for papaya-valkyrie-395400 canceled.

Name Link
🔨 Latest commit 5d6421e
🔍 Latest deploy log https://app.netlify.com/projects/papaya-valkyrie-395400/deploys/6a5b4138af97e300086fcefa

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Missing ID

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@stonesmi

Copy link
Copy Markdown
Contributor

Hi @Baqirrizvidev, thanks for your contribution!

Before we can review it, we'll need you to complete the EasyCLA steps above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace dropwizard metrics with micrometer 1.15.4

2 participants