Commit 9672d4aa authored by Robert Speicher's avatar Robert Speicher

Merge branch 'sh-add-gitlab-revision-to-prom-metrics' into 'master'

Add GitLab revision to Prometheus metric

See merge request gitlab-org/gitlab!65276
parents 6c1626e0 36046c63
...@@ -49,7 +49,7 @@ if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled? ...@@ -49,7 +49,7 @@ if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled?
Gitlab::Metrics::Samplers::PumaSampler.instance.start Gitlab::Metrics::Samplers::PumaSampler.instance.start
end end
Gitlab::Metrics.gauge(:deployments, 'GitLab Version', {}, :max).set({ version: Gitlab::VERSION }, 1) Gitlab::Metrics.gauge(:deployments, 'GitLab Version', {}, :max).set({ version: Gitlab::VERSION, revision: Gitlab.revision }, 1)
unless Gitlab::Runtime.sidekiq? unless Gitlab::Runtime.sidekiq?
Gitlab::Metrics::RequestsRackMiddleware.initialize_metrics Gitlab::Metrics::RequestsRackMiddleware.initialize_metrics
......
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