Commit 327ff31e authored by Robert Speicher's avatar Robert Speicher

Merge branch '60303-replace-sidekiq-mtail-metrics' into 'master'

Adds sidekiq worker label for ruby metrics

Closes #60303

See merge request gitlab-org/gitlab-ce!29215
parents 40a9d054 d0e68506
---
title: Replaces sidekiq mtail metrics with ruby instrumentation metrics
merge_request: 29215
author:
type: changed
......@@ -19,12 +19,6 @@ Gitlab::Application.configure do |config|
config.middleware.insert(1, Gitlab::Metrics::RequestsRackMiddleware)
end
Sidekiq.configure_server do |config|
config.on(:startup) do
Gitlab::Metrics::SidekiqMetricsExporter.instance.start
end
end
if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled?
Gitlab::Cluster::LifecycleEvents.on_worker_start do
defined?(::Prometheus::Client.reinitialize_on_pid_change) && Prometheus::Client.reinitialize_on_pid_change
......
......@@ -77,10 +77,10 @@ module Gitlab
end
def worker_label
return { worker: 'sidekiq' } if Sidekiq.server?
return {} unless defined?(Unicorn::Worker)
worker_no = ::Prometheus::Client::Support::Unicorn.worker_id
if worker_no
{ worker: worker_no }
else
......
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