New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Hystrix metrics to Actuator /metrics (and /prometheus) #3004

Closed
alexanderabramov opened this Issue Jun 12, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@alexanderabramov
Copy link

alexanderabramov commented Jun 12, 2018

I would like to expose Hystrix metrics to Prometheus. It seems to me that the most natural way with spring-boot 2.0 is to use spring-boot-starter-actuator, spring-cloud-starter-netflix-hystrix and micrometer-registry-prometheus.

However with spring-cloud Finchley.RC2 this does not work. Hystrix stream is exposed to /actuator/hystrix.stream, but metrics are not exposed to /actuator/metrics

In spring-boot 1.5 + spring-cloud Edgware.SR3 Hystrix metrics were exposed to Actuator /metrics endpoint like so: gauge.servo.hystrix.hystrixcommand.*

This might have something to do with org.springframework.cloud.netflix.hystrix.HystrixMetricsPollerConfiguration being commented out in 49fdcae with a comment "FIXME 2.0.0".

@spencergibb

This comment has been minimized.

Copy link
Member

spencergibb commented Jun 12, 2018

All metrics for Hystrix (besides hystrix.stream) and their export are being handled directly with micrometer

@alexanderabramov

This comment has been minimized.

Copy link

alexanderabramov commented Jun 12, 2018

Sorry, could you expand on that a little bit?
Are you saying the metrics for Hystrix that spring-cloud-netflix configures are already being handled and I should see them in /actuator/metrics, or that they are not handled, by design, and micrometer is expected to somehow provide that?

@spencergibb

This comment has been minimized.

Copy link
Member

spencergibb commented Jun 12, 2018

They will be exported by micrometer directly, not thru /metrics

@spencergibb

This comment has been minimized.

Copy link
Member

spencergibb commented Jun 12, 2018

@alexanderabramov

This comment has been minimized.

Copy link

alexanderabramov commented Jun 12, 2018

I see, so when I manually configure a micrometer binder, the metrics do show up in both /actuator/metrics and /actuator/prometheus.

@Bean
HystrixMetricsBinder hystrixMetrics(){
    return new HystrixMetricsBinder();
}

Thank you for your help. I was not able to find this step in docs until I knew what exactly to look for.

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