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:
parent
93226b7705
commit
be80d62ff9
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,14 @@ HEAD
|
||||||
|
|
||||||
- Fix thread-safety issue with Sidekiq::Pro::Config
|
- Fix thread-safety issue with Sidekiq::Pro::Config
|
||||||
- Allow job-specific options in Statsd metrics [#5037]
|
- 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
|
5.2.4
|
||||||
---------
|
---------
|
||||||
|
|
Loading…
Reference in a new issue