Collect counter metric when Sidekiq concurrency limits are triggered
The following discussion from !156224 (merged) should be addressed:
-
@DylanGriffith started a discussion:
@terrichu I really like this idea. Related to this I think it would be great to add metrics to the
::Gitlab::SidekiqMiddleware::ConcurrencyLimit::Middleware
so that we have counters for everytime wedefer_job!
. If we can monitor the rate of this it will help us get a sense if a specific queue is frequently going over the limit. Because every time we do this we're wasting Redis resources by pushing things back and forth between different Redis lists.Just having counts on the queues might make it hard to see here if there is inefficient concurrency limit set somewhere. Because ideally the concurrency limits are hit infrequently during bursty operations but most of the time the queues should be operating under the limit.