discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
532 stars 154 forks source link

Add per worker custom labels #208

Closed TLischkaRemerge closed 2 years ago

TLischkaRemerge commented 2 years ago

This adds the ability for sidekiq worker classes to have a self.custom_labels field which lets them set custom labels to be attached to metrics they export. This makes it easier to alerts based on the metrics for specific workers or groups of workers

SamSaffron commented 2 years ago

I am good to merge this, but there is a merge conflict and also looks like we need a README update

TLischkaRemerge commented 2 years ago

Thanks for the review, I fixed the merge conflict and added a note to the README with an example of how to add the custom labels to a Sidekiq job

SamSaffron commented 2 years ago

thanks heaps @TLischkaRemerge !