discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
538 stars 156 forks source link

Handle stale sidekiq queue and process metrics #262

Closed sosedoff closed 1 year ago

sosedoff commented 1 year ago

This PR adds a few handling bits for dealing with stale sidekiq metics. Root cause of the issue is described in #261.

sosedoff commented 1 year ago

With new MetricsContainer we can define auto-expiry upon insertion and iteration. Default is 60s, with ability to customize the value per collector.

Also, didn't want to touch other collectors, but we could expand the usage of the new class in a separate PR (if necessary).

SamSaffron commented 1 year ago

overall change looks good :confetti_ball:

would love an extra PR to expand usage.

SamSaffron commented 1 year ago

Thanks @sosedoff !