Extending the current library with extra metrics

Wouldn’t it be beneficial to include GitHub - Strech/sidekiq-prometheus-exporter: All the basic metrics of Sidekiq with pluggable contribs prepared for Prometheus in the project? For example, I am missing finished and failed job count with this plugin, and that is one of the most important metrics to see if something is failing…

2 Likes

That project is entirely stand alone and not something we would integrate

If you are missing metrics make feature request to add the or add in a PR

Unfortunately Ruby is not my cup of tea, so making a PR seems like a bumpy road for me. I can give it a try, but there will be a steep learning curve for me. On the other hand, the official repo mentioned above doesn’t allow tickets to be created, hence I have a limited number of places where I can ask for new features. Namely – here.

Hence I am asking to extend the current library with the metrics listed below. Which is, not accidentally, the list of metrics from the library listed above. I already marked those that are available in the current version. The ones in bold seem to be the most obvious to fully monitor Sidekiq executing in the background.

Metric Type Description Already Implemented metric
sidekiq_processed_jobs_total counter The total number of processed jobs discourse_sidekiq_job_count
sidekiq_failed_jobs_total counter The total number of failed jobs
sidekiq_workers gauge The number of workers across all the processes discourse_sidekiq_workers
sidekiq_processes gauge The number of processes discourse_sidekiq_processes
sidekiq_busy_workers gauge The number of workers performing the job
sidekiq_enqueued_jobs gauge The number of enqueued jobs discourse_sidekiq_jobs_enqueued
sidekiq_scheduled_jobs gauge The number of jobs scheduled for a future execution
sidekiq_retry_jobs gauge The number of jobs scheduled for the next try
sidekiq_dead_jobs gauge The number of jobs being dead
sidekiq_queue_latency_seconds gauge The number of seconds between oldest job being pushed to the queue and current time (labels: name)
sidekiq_queue_max_processing_time_seconds gauge The number of seconds between oldest job of the queue being executed and current time (labels: name)
sidekiq_queue_enqueued_jobs gauge The number of enqueued jobs in the queue (labels: name)

Please, do correct me if I missed one or misunderstood something.

1 Like