Commit 3bcd5302 authored by Stan Hu's avatar Stan Hu

Merge branch '34887-fix-prom-duplicate-metrics' into 'master'

Fix Prometheus duplicate metrics

See merge request gitlab-org/gitlab!19327
parents 6a337153 4b53ae67
---
title: Fix Prometheus duplicate metrics
merge_request: 19327
author:
type: fixed
......@@ -35,7 +35,7 @@ module Gitlab
def self.initialize_http_request_duration_seconds
HTTP_METHODS.each do |method, statuses|
statuses.each do |status|
http_request_duration_seconds.get({ method: method, status: status })
http_request_duration_seconds.get({ method: method, status: status.to_i })
end
end
end
......
......@@ -69,7 +69,7 @@ describe Gitlab::Metrics::RequestsRackMiddleware do
expected_labels = []
described_class::HTTP_METHODS.each do |method, statuses|
statuses.each do |status|
expected_labels << { method: method, status: status }
expected_labels << { method: method, status: status.to_i }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment