【发布时间】:2018-05-02 23:04:56
【问题描述】:
我有两个服务,ping 和 pong,其中ping 向pong 发送请求。此指标显示在ping 服务的/metrics 端点上:
gauge.servo.hystrix.hystrixcommand.http://pong.pongclient#hello().90
但它没有出现在/prometheus 端点上。其他指标出现在此端点上,但没有包含有关 Feign/Hystrix http 请求信息的伺服指标。
如何让这些指标显示在/prometheus 端点上?
我的build.gradle 有以下依赖项
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.cloud:spring-cloud-starter-eureka'
compile 'org.springframework.cloud:spring-cloud-starter-hystrix'
compile 'org.springframework.cloud:spring-cloud-starter-feign'
compile 'org.springframework.retry:spring-retry'
compile "io.micrometer:micrometer-core:${micrometerVersion}"
compile "io.micrometer:micrometer-spring-legacy:${micrometerVersion}"
compile "io.micrometer:micrometer-registry-prometheus:${micrometerVersion}"
以下版本
springCloudVersion = 'Dalston.SR4'
micrometerVersion = '1.0.0-rc.4'
【问题讨论】:
-
您可以添加指向源的链接吗?
标签: spring-boot spring-cloud hystrix prometheus micrometer