mtprotoproxy icon indicating copy to clipboard operation
mtprotoproxy copied to clipboard

mtprotoproxy_connects_by_duration metric from counter to histogram

Open Allineer opened this issue 4 years ago • 2 comments

Hello! I want to suggest using a histogram instead of several counters for the mtprotoproxy_connects_by_duration metric.

It was:

# HELP mtprotoproxy_connects_by_duration connects by duration
# TYPE mtprotoproxy_connects_by_duration counter
mtprotoproxy_connects_by_duration{bucket="0-0.1"}
mtprotoproxy_connects_by_duration{bucket="0.1-0.5"}
mtprotoproxy_connects_by_duration{bucket="0.5-1"}
mtprotoproxy_connects_by_duration{bucket="1-2"}
mtprotoproxy_connects_by_duration{bucket="2-5"}
mtprotoproxy_connects_by_duration{bucket="5-15"}
mtprotoproxy_connects_by_duration{bucket="15-60"}
mtprotoproxy_connects_by_duration{bucket="60-300"}
mtprotoproxy_connects_by_duration{bucket="300-600"}
mtprotoproxy_connects_by_duration{bucket="600-1800"}
mtprotoproxy_connects_by_duration{bucket="1800-+Inf"}

It became:

# HELP mtprotoproxy_connects_by_duration connects by duration
# TYPE mtprotoproxy_connects_by_duration histogram
mtprotoproxy_connects_by_duration_bucket{le="0.1"}
mtprotoproxy_connects_by_duration_bucket{le="0.5"}
mtprotoproxy_connects_by_duration_bucket{le="1"}
mtprotoproxy_connects_by_duration_bucket{le="2"}
mtprotoproxy_connects_by_duration_bucket{le="5"}
mtprotoproxy_connects_by_duration_bucket{le="15"}
mtprotoproxy_connects_by_duration_bucket{le="60"}
mtprotoproxy_connects_by_duration_bucket{le="300"}
mtprotoproxy_connects_by_duration_bucket{le="600"}
mtprotoproxy_connects_by_duration_bucket{le="1800"}
mtprotoproxy_connects_by_duration_bucket{le="+Inf"}
mtprotoproxy_connects_by_duration_sum
mtprotoproxy_connects_by_duration_count

https://prometheus.io/docs/concepts/metric_types/#histogram

Allineer avatar Jan 30 '20 12:01 Allineer

Very good idea

seriyps avatar Jan 30 '20 13:01 seriyps

I also like an idea. Will do

alexbers avatar Jan 31 '20 00:01 alexbers