I have a simple Spring MVC application. For that application I have Implemented Circuit Breaker Pattern using @EnableCircuitBreaker Annotation. It is working fine. But While trying to generate the hystrix stream it showing 404 error. Can anyone please help me out this.
Asked
Active
Viewed 808 times
1 Answers
1
Hystrix stream (/hystrix.stream
) is only enabled if you have spring boot actuator dependency. Please try to add the below dependency into your pom or gradle build file.
org.springframework.boot:spring-boot-starter-actuator
Updated @ 2017/06/26
If your application is not based on spring boot, you need to configure HystrixMetricsStreamServlet
by yourself. Because /hystrix.stream is auto-configured by spring cloud netflix and it is based on spring boot.
First, you need to add dependency of com.netflix.hystrix:hystrix-metrics-event-stream
into your application.
Second, you should HystrixMetricsStreamServlet
servlet into web.xml
like below.
<servlet>
<description></description>
<display-name>HystrixMetricsStreamServlet</display-name>
<servlet-name>HystrixMetricsStreamServlet</servlet-name>
<servlet-class>com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HystrixMetricsStreamServlet</servlet-name>
<url-pattern>/hystrix.stream</url-pattern>
</servlet-mapping
If you find the details about how to configure HystrixMetricsStreamServlet
in your web application here.

yongsung.yoon
- 5,489
- 28
- 32
-
If I place spring-boot-starter-actuator in my pom.xml my project artifact is going to fail. FYI: My application is in Spring MVC. No boot dependencies. So I have added spring-boot-starter-web, then also I'm getting issue while running the code. – RamaKrishna Ankireddy Jun 22 '17 at 18:24
-
I've updated my answer because you are not using spring-boot. – yongsung.yoon Jun 26 '17 at 06:03