sidekiq / sidekiq

Simple, efficient background processing for Ruby
https://sidekiq.org
Other
13.13k stars 2.41k forks source link

Native Prometheus instrumentation? #5404

Open modulitos opened 2 years ago

modulitos commented 2 years ago

It looks like Sidekiq Pro supports sending metrics to Statsd: https://github.com/mperham/sidekiq/wiki/Pro-Metrics#commercial-metrics

and to support Prometheus, the only suggestion is to use the statsd_exporter. However, at the top of that project's readme, it says:

We recommend using the exporter only as an intermediate solution, and switching to native Prometheus instrumentation in the long term.

(this Github issue offers some details why: https://github.com/prometheus/statsd_exporter/issues/269)

Is this still the recommended way to send Sidekiq metrics to Prometheus?

I'm wondering if I should prefer solutions that provide native Prometheus instrumentation for Sidekiq, like this project: https://github.com/Strech/sidekiq-prometheus-exporter

but it's not mentioned in the above Sidekiq Pro wiki, so maybe it's best to stick with the Statsd-to-Prometheus exporter option? Or maybe there's other guidance on how we can make this decision?

mperham commented 2 years ago

There hasn't been a lot of demand for Prometheus so I haven't felt the need to support it directly. I've never used Prometheus or those projects you linked so I can't really give any advice or opinion on what to use. I wish I had a better answer for you.

modulitos commented 2 years ago

Looks like prometheus_exporter can also export Sidekiq metrics: https://github.com/discourse/prometheus_exporter#sidekiq-metrics