Dropwizard Metrics: The JVM Metrics Library That Keeps 4.2 Alive While 5.0 Waits
Capturing JVM- and application-level metrics. So you know what's going on.
At a glance
- What is it?
- Dropwizard Metrics is a Java library for capturing JVM and application metrics. The 4.2.x line is maintained, 5.0.x is on pause, and the project is clear about breaking changes.
- Who is it for?
- Adopt 4.2.x if you need a stable, maintained metrics library for JVM and application metrics today, and you are comfortable with the existing API. Do not adopt 5.0.x unless you are prepared to handle a new package name, new Maven coordinates, and a backwards-incompatible API, since it is on pause and not documented.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Dropwizard Metrics Solves and Who Needs It
Dropwizard Metrics is a Java library for capturing JVM and application-level metrics. The README says it exists so you know what is going on. That is a plain way of saying it gives you counters, gauges, meters, timers, and histograms for your application, plus metrics from the JVM itself, like memory and thread usage. It is for Java developers who need to observe their services in production, not for people building a new metrics system from scratch. The library has been around since 2010, originally at Yammer, then under Coda Hale and the Dropwizard team. If you run a JVM service and you want a standard, boring way to expose metrics without inventing your own format, this is the kind of library you reach for. It is not a full monitoring platform. It does not store data or draw dashboards. It captures measurements and hands them to you, or to a reporter that sends them somewhere else.
The Version Table Is the Real Story
The most informative part of the README is the version table. It lists every release line from 2.2.x down to 5.0.x, with a status column. Versions below 2.2.x are unmaintained, as are 2.2.x, 3.0.x, 3.1.x, 3.2.x, 4.0.x, and 4.1.x. The only line marked maintained is 4.2.x. Version 5.0.x is marked on pause. That is a striking state for a project that has a recent release, v5.0.8, pushed on 2026-08-28. The project still ships 5.0.x releases, but the README labels that line as on pause. The maintenance status is not a judgement of code quality. It tells you where the project's attention is. If you adopt 4.2.x, you are on a line the project says it maintains. If you adopt 5.0.x, you are on a line that is on pause, with no documentation link in the table. That asymmetry matters for anyone choosing a dependency.
How the Library Works: API and Reporting
The library is structured around a core module, `metrics-core`, which is the artifact you pull from Maven Central. The README does not go into detail on the API, but the project's documentation at metrics.dropwizard.io does. Based on the repository layout and the project's history, the mechanism is straightforward: your code creates metric registries, registers metrics like counters and timers, and then reporters periodically push those metrics to a backend. The JVM metrics are collected via built-in gauges, so you get heap usage, thread counts, and garbage collection times without writing code. Application metrics require you to instrument your own methods. The library does not do bytecode instrumentation or automatic collection of every method call. That is a design choice: you decide what to measure. The trade-off is that you get full control, but you also have to add the instrumentation yourself. The documentation would show you the exact calls, like `MetricRegistry` and `Counter`, but the README alone does not give code examples.
Getting It Running: Maven Coordinates and Branches
To use Dropwizard Metrics, you add a dependency on `io.dropwizard.metrics:metrics-core` from Maven Central. The README links to a Maven badge for that artifact, which is the standard entry point. The version you choose determines the package name and API. For 4.2.x, the package is `com.codahale.metrics`. For 5.x, the README explicitly says there will be a new package name and new Maven coordinates. The source for 5.x lives in the `release/5.0.x` branch, while 4.2.x is on `release/4.2.x`. If you are building with Maven, you would add a dependency like `io.dropwizard.metrics:metrics-core:4.2.40` for the latest 4.2 release. The README does not show a full Maven snippet, but the coordinates are enough to get started. For Gradle, the same coordinates apply. The project also supports other modules, like `metrics-jvm` and `metrics-servlets`, but the README does not list them. You need to check the documentation for the full set.
The 5.0 Pause and the Breaking Change Problem
The README states that new not-backward compatible features, such as support for tags, will be implemented in a 5.x.x release. That release will have new Maven coordinates, a new package name, and a backwards-incompatible API. This is a genuine limitation for anyone considering 5.0.x today. The version is on pause, meaning development is not active, but releases like v5.0.8 still appear. The lack of documentation for 5.0.x in the version table is a red flag. If you adopt 5.0.x now, you are betting on an API that may change again when the pause ends. The tags feature is a common need in modern metrics systems, where you want to attach dimensions to every metric. The 4.2.x line does not support tags, according to the README's implication. That is a concrete gap. If tags are essential for your use case, 4.2.x will not give you them, and 5.0.x is not stable enough to trust.
Alternatives: Micrometer and Prometheus Client
The obvious alternative is Micrometer, which is a metrics facade that supports tags natively and integrates with many monitoring systems. Micrometer's approach is different: it provides a vendor-neutral API, and you choose a registry for your backend, like Prometheus or Datadog. Dropwizard Metrics, in contrast, is a standalone library with its own registry and reporters. If you need tags and a wide range of backend integrations, Micrometer is a stronger fit. Another alternative is the Prometheus Java client, which is tightly coupled to the Prometheus exposition format. That client gives you histograms and counters with labels, but it pushes you toward Prometheus as the consumer. Dropwizard Metrics is more agnostic, since it can report to Graphite, Ganglia, or other backends via reporters. The choice comes down to whether you want a library that is part of a larger ecosystem or a self-contained tool. The README does not mention alternatives, but the comparison is clear from the project's design.
Maintenance and Upgrade Cost
The maintenance status is the most concrete cost signal. The project maintains only 4.2.x, and it does so actively, with v4.2.40 released on 2026-08-28. The 5.0.x line is on pause, but it also gets releases, which suggests someone is still tending it. The upgrade cost from 4.2.x to 5.x is high by design: new Maven coordinates, a new package name, and a backwards-incompatible API. That means a migration is not a simple version bump. You will need to change imports and possibly your build files. The license is Apache-2.0, which is permissive and does not impose copyleft obligations. That is a low legal barrier, but you should still check the LICENSE file for exact terms. The project has been around since 2010, which is a long time for a Java library, and the version table shows a pattern of retiring old lines. If you adopt 4.2.x, you are on a line that will eventually become unmaintained, just as 4.1.x did. The question is when.
Editorial conclusion
Adopt 4.2.x if you need a stable, maintained metrics library for JVM and application metrics today, and you are comfortable with the existing API. Do not adopt 5.0.x unless you are prepared to handle a new package name, new Maven coordinates, and a backwards-incompatible API, since it is on pause and not documented. Before adopting, verify which version your dependencies expect, and check the documentation for 4.2.0 to see if it supports your reporting backends. The project's future is tied to 5.x, but the present is 4.2.x, so choose accordingly.
Community notes