Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[knot-resolver 6] Prometheus histogram broken #117

Open
Jean-Daniel opened this issue Sep 24, 2024 · 0 comments
Open

[knot-resolver 6] Prometheus histogram broken #117

Jean-Daniel opened this issue Sep 24, 2024 · 0 comments

Comments

@Jean-Daniel
Copy link

Actually, Prometheus requires cumulative value in buckets, that is each bucket should be count of all values in the bucket + count in smaller buckets.

Instead of reporting:

resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.001"} 4.542029e+06
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.01"} 889205.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.05"} 127169.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.1"} 8488.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.25"} 12968.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.5"} 7277.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="1.0"} 4574.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="1.5"} 768.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="+Inf"} 953.0
resolver_response_latency_count{instance_id="kresd:kresd1"} 953.0

the reported metrics should be

resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.001"} 4.542029e+06
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.01"} 5431234.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.05"} 5558403.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.1"} 5566891.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.25"} 5579859.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="0.5"} 5587136.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="1.0"} 5591710.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="1.5"} 5592478.0
resolver_response_latency_bucket{instance_id="kresd:kresd1",le="+Inf"} 5593431.0
resolver_response_latency_count{instance_id="kresd:kresd1"} 5593431.0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant