Coerce label values to strings

Label values are converted to strings for output:

http_request_duration_seconds_count{method="get",status="200"} 0

When label values are submitted with string and non-string labels like:

http_request_duration_seconds.get({ method: 'GET', status: 200 })

http_request_duration_seconds.get({ method: 'GET', status: '200' })

Two identical metrics would be produced on the metrics endpoint with potentially different values:

http_request_duration_seconds_count{method="get",status="200"} 0

http_request_duration_seconds_count{method="get",status="200"} 100

The prometheus results were undefined / unpredictable.

Associated with gitlab-org/gitlab#34887 (closed)

Merge request reports

Loading