Skip to content
\n

The issue is that only the last probe is recorded for the histogram metric. The /metrics endpoint always returns a response like this (count doesn't exceed 1):

\n
latency_count{probe=\"ext-google\",dst=\"8.8.8.8\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.001\"} 0 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.005\"} 0 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.01\"} 0 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.02\"} 0 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.03\"} 0 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.05\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.075\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.1\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.2\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.5\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"0.75\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"1\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"1.5\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"2\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"2.5\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"3\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"4\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"5\"} 1 1724571103875\nlatency_bucket{probe=\"ext-google\",dst=\"8.8.8.8\",le=\"+Inf\"} 1 1724571103875\n
\n
\n

My question: Is this behavior intentional or can it be considered a bug?

\n

This line is likely causing the behavior. It should be put in the Start method or should be changed like this:

\n
if result.latency == nil {\n    result.latency = p.opts.LatencyDist.CloneDist()\n}
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

@therealak12, which version you're running?

\n

I think you've found a bug in the unreleased version (which is great), but latest release should be okay.

\n

Context: I recently moved DNS probe to the common scheduler, but that expects metrics to be accumulated. Earlier DNS probe was using statskeeper (now retired), which took care of accumulating the metrics. So if you're using a released version it should be working ok.

","upvoteCount":1,"url":"https://github.com/cloudprober/cloudprober/discussions/833#discussioncomment-10441662"}}}

Does latency_distribution work in practice? #833

Answered by manugarg
therealak12 asked this question in Q&A
Discussion options

You must be logged in to vote

@therealak12, which version you're running?

I think you've found a bug in the unreleased version (which is great), but latest release should be okay.

Context: I recently moved DNS probe to the common scheduler, but that expects metrics to be accumulated. Earlier DNS probe was using statskeeper (now retired), which took care of accumulating the metrics. So if you're using a released version it should be working ok.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by therealak12
Comment options

You must be logged in to vote
1 reply
@manugarg
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants