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

Fix "Statsd.options" example (#5075)

This commit is contained in:
Jordan Brough 2021-12-01 08:00:03 -07:00 committed by GitHub
parent e093c1b0f9
commit 2890f81103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ Please see [sidekiq.org](https://sidekiq.org/) for more details and how to buy.
- Allow job-specific options in Statsd metrics [#5037]
```ruby
# add to your initializer
Sidekiq::Server::Middleware::Statsd.options = ->(klass, job, q) do
Sidekiq::Middleware::Server::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