Dropwizard Metrics captures JVM and application-level measurements in Java services. It offers instrument types, integrations for common stacks, and reporters that ship data to monitoring backends.
Overview
Metrics, often called Dropwizard Metrics, is a Java library aimed at production visibility. It measures how critical components behave under load by exposing counters, timers, histograms, and related primitives you embed beside business code.
The project ships instrumentation modules for widely used components such as Jetty, Logback, Log4j, Apache HttpClient, Ehcache, JDBI, and Jersey. Reporting modules can forward metrics to systems like Graphite so operators can chart JVM and service health in one place.
Documentation on the project site describes the library as giving insight into what running code is doing, with a maintained 4.x line and a paused 5.x branch planned for incompatible API changes including tag support. Teams add the dependency through Maven coordinates and wire reporters and instrumented components as part of their service configuration.
It is a library you embed rather than a standalone server: your application owns deployment, while Metrics focuses on measurement APIs and adapters. Future major releases are expected to change package naming and coordinates when breaking features land.
Key features
- JVM and application metric instruments
- Jetty and Jersey instrumentation modules
- Logging framework integrations
- Database and cache client metrics
- Graphite reporting backend
- HTTP client instrumentation
- Production-focused measurement APIs
- Modular Maven artifacts
Use cases
- Timing and counting REST endpoints in Java
- Exporting service stats to Graphite
- Tracking connection pools and caches
- Correlating JVM stats with app events
- Standardizing metrics across microservices