Open edenisn opened 1 year ago
I think you would need to extend the class to support that. What exactly are you trying to achieve?
So, for example above with static label when we start sidekiq job - WorkerWithCustomLabels it will add two labels - my_label = 'value-here' and other_label = 'second-val', those labels are static. But, in some cases we want to add dynamic labels, for example:
class SomeTestJob
def perform(event_id)
event = Event.find(event_id)
label = event.type
end
end
and I want to set this label for this job with - label = event.type. Type of this label is not static - it's dynamic label. And my question: how can we add those type of labels to Sidekiq jobs? Thanks!
It's seems to me that it should look something like this https://github.com/yabeda-rb/yabeda/issues/12
Hi, thanks for this beautiful gem. I see that we can added static labels in sidekiq job (on official page of a gem): Custom labels can be added for individual jobs by defining a class method on the job class. These labels will be added to all Sidekiq metrics written by the job:
but, what about dynamic labels? How we can add those labels?