最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

go - Prometheus Metric Label Inconsistency: was collected before with the same name and label values - Stack Overflow

programmeradmin3浏览0评论

Here’s the translation of your question for Stack Overflow:


I have a Prometheus-related question.

I expect the method label to appear consistently as GET and POST:

acs_go_http_requests_in_flight{method="GET",route="/ads/v1/mobile_leaderboard"} 0
acs_go_http_requests_in_flight{method="POST",route="/ads/v1/mobile_leaderboard"} 0
acs_go_http_requests_in_flight{method="GET",route="/ads/v1/promo_banner"} 0
acs_go_http_requests_in_flight{method="POST",route="/ads/v1/promo_banner"} 0
... and so on

However, in reality, the method label appears inconsistently, sometimes interchanging GET and POST. Occasionally, it even shows as GETT:

acs_go_http_requests_in_flight{method="GETT",route="/ads/v1/promo_banner"} 0

Here is a link to the relevant code:
middleware.go#L85-L121

I’ve seen a similar error message before, but I don’t think I’m registering the metric multiple times:

An error has occurred while serving metrics:
was collected before with the same name and label values

What could be causing this issue in my code?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论