1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Add sample code

This commit is contained in:
Mike Perham 2021-11-05 09:03:37 -07:00
parent 93226b7705
commit be80d62ff9

View file

@ -9,6 +9,14 @@ HEAD
- Fix thread-safety issue with Sidekiq::Pro::Config
- Allow job-specific options in Statsd metrics [#5037]
```ruby
# add to your initializer
Sidekiq::Server::Middleware::Statsd.options = ->(klass, job, q) do
{tags: ["worker:#{klass}", "queue:#{q}"]}.tap do |h|
h[:tags] << "tenant:#{job['tenant_id']}" if job["tenant_id"]
end
end
```
5.2.4
---------