簡體   English   中英

spring 引導 2.7.0 不公開 http.server.request 指標

[英]spring boot 2.7.0 doesn't expose http.server.request metrics

我正在使用 Spring boot 2.7.0 並且我正在嘗試公開 http.server.request 指標,以便我可以在 Prometheus 中抓取它,但它不起作用。 我的 application.yml 屬性如下所示:

management:
    endpoint:
        health:
            probes:
                enabled: true
            show-details: always
    endpoints:
        web:
            exposure:
                include: '*'

    health:
        livenessState:
            enabled: true
        readinessState:
            enabled: true
    metrics:
        tags:
            application: ${spring.application.name}
        distribution:
            percentiles-histogram:
                http:
                    server:
                        requests: true

我有以下依賴項:

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

但在/actuator/metrics端點中,我看不到任何關於 http.server.request 指標的信息。

{
  "names": [
    "application.ready.time",
    "application.started.time",
    "disk.free",
    "disk.total",
    "executor.active",
    "executor.completed",
    "executor.pool.core",
    "executor.pool.max",
    "executor.pool.size",
    "executor.queue.remaining",
    "executor.queued",
    "hikaricp.connections",
    "hikaricp.connections.acquire",
    "hikaricp.connections.active",
    "hikaricp.connections.creation",
    "hikaricp.connections.idle",
    "hikaricp.connections.max",
    "hikaricp.connections.min",
    "hikaricp.connections.pending",
    "hikaricp.connections.timeout",
    "hikaricp.connections.usage",
    "jdbc.connections.active",
    "jdbc.connections.idle",
    "jdbc.connections.max",
    "jdbc.connections.min",
    "jvm.buffer.count",
    "jvm.buffer.memory.used",
    "jvm.buffer.total.capacity",
    "jvm.classes.loaded",
    "jvm.classes.unloaded",
    "jvm.gc.live.data.size",
    "jvm.gc.max.data.size",
    "jvm.gc.memory.allocated",
    "jvm.gc.memory.promoted",
    "jvm.gc.overhead",
    "jvm.gc.pause",
    "jvm.memory.committed",
    "jvm.memory.max",
    "jvm.memory.usage.after.gc",
    "jvm.memory.used",
    "jvm.threads.daemon",
    "jvm.threads.live",
    "jvm.threads.peak",
    "jvm.threads.states",
    "logback.events",
    "process.cpu.usage",
    "process.start.time",
    "process.uptime",
    "resilience4j.circuitbreaker.buffered.calls",
    "resilience4j.circuitbreaker.calls",
    "resilience4j.circuitbreaker.failure.rate",
    "resilience4j.circuitbreaker.not.permitted.calls",
    "resilience4j.circuitbreaker.slow.call.rate",
    "resilience4j.circuitbreaker.slow.calls",
    "resilience4j.circuitbreaker.state",
    "system.cpu.count",
    "system.cpu.usage",
    "tomcat.sessions.active.current",
    "tomcat.sessions.active.max",
    "tomcat.sessions.alive.max",
    "tomcat.sessions.created",
    "tomcat.sessions.expired",
    "tomcat.sessions.rejected"
  ]
}

我的隊友能夠通過將 spring 引導版本降級到 2.3.7.release 來解決這個問題,但我不太喜歡這個。 有沒有其他方法可以公開這些指標?

這是 2.7.0 spring 引導版本的問題 升級到 2.7.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM