From bf77f1cd10e424be25ef9b155fc1b2a48d7556c2 Mon Sep 17 00:00:00 2001 From: Pawel Chojnacki Date: Wed, 22 Nov 2017 19:13:47 +0100 Subject: [PATCH] Force disable Prometheus metrics Until https://gitlab.com/gitlab-org/prometheus-client-mmap/merge_requests/11 is ready, Prometheus metrics will not work and cause issues such as #40457. --- changelogs/unreleased/pawel-disable_prometheus_metrics.yml | 5 +++++ lib/gitlab/metrics/prometheus.rb | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/pawel-disable_prometheus_metrics.yml diff --git a/changelogs/unreleased/pawel-disable_prometheus_metrics.yml b/changelogs/unreleased/pawel-disable_prometheus_metrics.yml new file mode 100644 index 00000000000..74d83256603 --- /dev/null +++ b/changelogs/unreleased/pawel-disable_prometheus_metrics.yml @@ -0,0 +1,5 @@ +--- +title: Force disable Prometheus metrics +merge_request: +author: +type: fixed diff --git a/lib/gitlab/metrics/prometheus.rb b/lib/gitlab/metrics/prometheus.rb index 09103b4ca2d..4f165d12a94 100644 --- a/lib/gitlab/metrics/prometheus.rb +++ b/lib/gitlab/metrics/prometheus.rb @@ -17,9 +17,9 @@ module Gitlab end def prometheus_metrics_enabled? - return @prometheus_metrics_enabled if defined?(@prometheus_metrics_enabled) - - @prometheus_metrics_enabled = prometheus_metrics_enabled_unmemoized + # force disable prometheus_metrics until + # https://gitlab.com/gitlab-org/prometheus-client-mmap/merge_requests/11 is ready + false end def registry