我需要通过pushgateway方法将度量标准数据(每个API请求的响应时间)输入到Prometheus中。想法是将这些响应时间在源服务器上缓存两分钟,然后通过一个单个HTTP调用将所有这些指标发送到Pushgateway。
HTTP主体应如何显示?
我尝试了以下操作但未成功:
# TYPE request_routing_time summary
request_routing_time{basePath="/myApi1"} 3.0
request_routing_time{basePath="/myApi1"} 4.0
request_routing_time{basePath="/myApi2"} 3.0
request_routing_time{basePath="/myApi2"} 4.0
我想为每个缓存的API请求添加一行,但这似乎不起作用。 在一次通过pushgateway调用发送许多请求的指标之前,我的缓存想法可能吗?