Skip to content

A library that captures hystrix circuit breaker metrics in provided metrics registry

License

Notifications You must be signed in to change notification settings

noorulhaq/dropwizard-hystrix-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Dropwizard Hystrix Metrics

A library that captures hystrix circuit breaker metrics in provided metrics registry.

Getting it

  1. Define maven repository
	<repository>
	  <id>sonatype-snapshots</id>
	  <name>Sonatype Snapshots</name>
	  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  <snapshots>
	    <enabled>true</enabled>
	  </snapshots>
	</repository>
  1. Add dependency
	<dependency>
	   <groupId>io.github.noorulhaq</groupId>
	   <artifactId>hystrix-metrics</artifactId>
       <version>1.0.0-SNAPSHOT</version>
	</dependency>

Setup

Add below lines in your application bootstrap process.

HystrixPlugins.reset();
HystrixPlugins.getInstance().registerMetricsPublisher(new DropWizardMetricsPublisher(metricRegistry))

Sample Spring Boot Configuration

	@Configuration
	@EnableMetrics
	class MetricsConfiguration extends MetricsConfigurerAdapter{

		@Autowired
		private MetricRegistry metricRegistry;

		@PostConstruct
		private void onStartup(){
			HystrixPlugins.reset();
			HystrixPlugins.getInstance().registerMetricsPublisher(new DropWizardMetricsPublisher(metricRegistry));
		}
	}

Licensed under Apache Software License 2.0

About

A library that captures hystrix circuit breaker metrics in provided metrics registry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages