Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Build Status Maven Central

bootique-metrics

Provides Dropwizard Metrics integration module for Bootique. See usage example bootique-metrics-demo.

Quick Start:

Add the Metrics module to your Bootique app:

<dependency>
	<groupId>io.bootique.metrics</groupId>
	<artifactId>bootique-metrics</artifactId>
	<scope>compile</scope>
</dependency>

Inject MetricRegistry anywhere in your code where you need to create Meters, Gauges, Counters, Histograms, Timers, etc. E.g.:

@Inject
public MyObject(MetricRegistry metrics) {
	this.timer = metrics.timer(MetricRegistry.name(RequestTimer.class, "work-timer"));
}
...
public void doWork() {
	Timer.Context context = this.timer.time();
	try {
		// do work
	} finally {
		long timeNanos = context.stop();
	}
}

About

Provides Dropwizard Metrics integration with Bootique

Resources

License

Languages

You can’t perform that action at this time.