aiven
aiven

Reputation: 4313

prometheus: are there some benefits to use counter if I also use histogram for the same kind of metric?

For example imagine that we need to measure two metrics: requests number (counter) and request duration (histogram). Histogram already has inner counter, so when I what to query requests rate I can use histogram metric instead of counter.

Are there some benefits for using separate counter metric?

Upvotes: 0

Views: 503

Answers (1)

slauth
slauth

Reputation: 3178

I'd say there is a benefit of using an additional counter: naming. Say you have a histogram named http_request_duration_seconds, the associated counter is named http_request_duration_seconds_count, whereas http_requests_total would be a much better name.

Upvotes: 0

Related Questions