Adjust client middleware metrics Counter
What does this MR do?
According to https://github.com/mperham/sidekiq/wiki/Middleware
the client middleware worker
argument of Sidekiq can either be a String of a class
name, or the class itself.
Here we're fixing the metrics by ensuring we're always passing a worker class to the create_labels
method.
We can see locally that now we're storing the attributes correctly for latency sensitive and non-latency sensitive jobs:
sidekiq_enqueued_jobs_total{queue="new_issue",latency_sensitive="yes",external_dependencies="no",feature_category="issue_tracking",boundary="cpu"} 1
sidekiq_enqueued_jobs_total{queue="project_export",latency_sensitive="no",external_dependencies="no",feature_category="source_code_management",boundary="memory"} 1
Edited by Oswaldo Ferreira