Millseconds vs seconds mis-match between measurement and Histogram

Bug #2069431 reported by tdevelioglu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstacksdk
New
Undecided
Unassigned

Bug Description

The Prometheus instrumentation is measuring the response time in milliseconds but the Histogram is configured using the default buckets which are in seconds so you end up without any useful measurements.

https://opendev.org/openstack/openstacksdk/src/commit/0f311ff3e2e57bf3659cef77e98551b6c0c7e3c9/openstack/proxy.py#L370

https://opendev.org/openstack/openstacksdk/src/commit/0f311ff3e2e57bf3659cef77e98551b6c0c7e3c9/openstack/config/cloud_region.py#L1184

https://github.com/prometheus/client_python/blob/4535ce0f43097aa48e44a65747d82064f2aadaf5/prometheus_client/metrics.py#L586

The idiomatic base unit when instrumenting time with Prometheus is seconds, reference https://prometheus.io/docs/practices/naming/#base-units

It would also be good if we could just pass a custom list of buckets instead of a full instance of Histogram without having to know what labels to use (and break the client side if they change).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.