spring-cloud - 无法在 Spring Cloud 中获取/hystrix.stream

标签 spring-cloud hystrix spring-cloud-netflix

我创建了一个具有以下 Spring Cloud 版本依赖项的微服务 Camden.SR2 . Spring 启动 1.4.1。 http://localhost:8080/hystrix.stream没有响应。

如果我将 Spring Cloud 版本设为 Brixton.* (RELEASE, SR1,...), 我只得到 ping:作为浏览器中的回复。

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-hystrix</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

应用程序属性
spring.application.name=sample-service
server.port = 8080

应用
@SpringBootApplication
@EnableCircuitBreaker
public class SampleApplication {

    public static void main(String[] args) {
        SpringApplication.run(SampleApplication.class, args);
    }
}

最佳答案

对于使用 spring boot 2 的用户(我使用的是 2.0.2.RELEASE)hystrix.stream 端点已移至 /actuator/hystrix.stream

对我来说,这个网址有效:

http://localhost:8082/actuator/hystrix.stream

是的,通过以下属性启用此执行器端点:
management.endpoints.web.exposure.include=hystrix.stream

关于spring-cloud - 无法在 Spring Cloud 中获取/hystrix.stream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40447916/

相关文章:

java - 将应用程序迁移到 Spring boot 2 后,无法将 hystrix 指标公开给/actuator/prometheus

netflix-eureka - 在 Eureka 中设置接受区域列表

spring-cloud - 如何在 Zuul 中使用基于 regexmapper 的路由? PatternServiceRouteMapper 不起作用?

spring-cloud - Spring Cloud Feign : Is Feign efficient enough compared with RestTemplate?

java - kubernetes 上的可扩展 spring 批处理作业

java - 为单个 Feign 客户端禁用 Hystrix

java - 无法在 Hystrix 仪表板上查看 Hystrix 报告

spring-cloud-netflix - Springcloud Netflix Feign参数顺序

spring - 排除 Spring Cloud Sleuth 中的资源