【问题标题】:http_client_requests_seconds_count missing in spring boot promethus endpointspring boot promethus端点中缺少http_client_requests_seconds_count
【发布时间】:2022-10-22 00:00:50
【问题描述】:

我正在尝试在具有以下依赖项的 springboot 项目中启用 Prometheus 端点。

春季启动版本:

   <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.12-SNAPSHOT</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

依赖项:

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

我正在使用 restTemplate 进行出站呼叫,但是当我检查 Prometheus 端点时,数据与http_client_requests_* 缺失

应用属性:

management.endpoints.web.exposure.include=health,metrics,prometheus
management.endpoint.health.show-details=always
management.endpoint.health.enabled=true
management.endpoint.info.enabled=true
management.metrics.web.server.request.autotime.percentiles=0.90,0.95
management.metrics.web.client.request.autotime.percentiles=0.90,0.95
management.metrics.web.client.request.autotime.enabled=true

【问题讨论】:

  • 我还使用RestTemplate 进行外呼,当我访问/actuator/metrics 时没有看到http.client.requests

标签: spring-boot prometheus spring-boot-actuator spring-micrometer


【解决方案1】:

嗨,我面临同样的问题。 http_client_requests_seconds 缺少执行器/prometheus。你们中有人碰巧找到了解决方案吗?如果可以,请分享。

【讨论】:

    猜你喜欢
    • 2021-12-02
    • 1970-01-01
    • 1970-01-01
    • 2016-07-20
    • 2018-05-21
    • 2023-03-31
    • 2016-02-14
    • 2016-06-02
    相关资源
    最近更新 更多