[英]What does apiserver_request_duration_seconds prometheus metric in Kubernetes mean?
I want to know if the apiserver_request_duration_seconds accounts the time needed to transfer the request (and/or response) from the clients (eg kubelets) to the server (and vice-versa) or it is just the time needed to process the request internally (apiserver + etcd) and no communication time is accounted for?我想知道 apiserver_request_duration_seconds 是否考虑了将请求(和/或响应)从客户端(例如 kubelets)传输到服务器(反之亦然)所需的时间,或者它只是在内部处理请求所需的时间( apiserver + etcd)并且没有考虑通信时间?
As a plus, I also want to know where this metric is updated in the apiserver's HTTP handler chains?另外,我还想知道该指标在 apiserver 的 HTTP 处理程序链中的更新位置?
How long API requests are taking to run. API 请求需要多长时间才能运行。 Whole thing, from when it starts the HTTP handler to when it returns a response.
整个事情,从它启动 HTTP 处理程序到它返回响应。
As an addition to the confirmation of @coderanger in the accepted answer.作为在接受的答案中确认@coderanger 的补充。 The metric is defined here and it is called from the function MonitorRequest which is defined here .
该指标在此处定义,并从此处定义的 function MonitorRequest 调用。 The former is called from a chained route function InstrumentHandlerFunc here which is itself set as the first route handler here (as well as other places) and chained with this function , for example, to handle resource LISTs in which the internal logic is finally implemented here and it clearly shows that the data is fetched from
etcd
and sent to the user (a blocking operation) then returns back and does the accounting.前者是从链式路由 function InstrumentHandlerFunc 这里调用的,它本身被设置为这里(以及其他地方)的第一个路由处理程序,并与此 function链式,例如,用于处理内部逻辑最终在此处实现的资源 LIST它清楚地表明数据是从
etcd
获取并发送给用户(阻塞操作)然后返回并进行记帐。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.