Spring Boot Actuator'http.server.requests'指标最大时间 [英] Spring Boot Actuator 'http.server.requests' metric MAX time

查看:2493
本文介绍了Spring Boot Actuator'http.server.requests'指标最大时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spring Boot应用程序,并且我正在使用Spring Boot Actuator和Micrometer来跟踪有关我的应用程序的指标.我特别关注"http.server.requests"指标和MAX统计信息:

I have a Spring Boot application and I am using Spring Boot Actuator and Micrometer in order to track metrics about my application. I am specifically concerned about the 'http.server.requests' metric and the MAX statistic:

{
    "name": "http.server.requests",
    "measurements": [
        {
            "statistic": "COUNT",
            "value": 2
        },
        {
            "statistic": "TOTAL_TIME",
            "value": 0.079653001
        },
        {
            "statistic": "MAX",
            "value": 0.032696019
        }
    ],
    "availableTags": [
        {
            "tag": "exception",
            "values": [
                "None"
            ]
        },
        {
            "tag": "method",
            "values": [
                "GET"
            ]
        },
        {
            "tag": "status",
            "values": [
                "200", 
                "400"

            ]
        }
    ]
}

我认为MAX统计量是执行一个请求的最长时间(因为我已经发出了两个请求,所以这是对其中一个请求进行较长时间处理的时间).

I suppose the MAX statistic is the maximum time of execution of a request (since I have made two requests, it's the the time of the longer processing of one of them).

每当我通过任何标签(例如localhost:9090/actuator/metrics?tag=status:200

Whenever I filter the metric by any tag, like localhost:9090/actuator/metrics?tag=status:200

{
        "name": "http.server.requests",
        "measurements": [
            {
                "statistic": "COUNT",
                "value": 1
            },
            {
                "statistic": "TOTAL_TIME",
                "value": 0.029653001
            },
            {
                "statistic": "MAX",
                "value": 0.0
            }
        ],
        "availableTags": [
            {
                "tag": "exception",
                "values": [
                    "None"
                ]
            },
            {
                "tag": "method",
                "values": [
                    "GET"
                ]
            }
        ]
    }

我总是得到0.0作为最大时间.这是什么原因呢?

I am always getting 0.0 as a max time. What is the reason of this?

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆