Skip to content

Commit

Permalink
Merge pull request #597 from alphagov/add-sidekiq-statsd
Browse files Browse the repository at this point in the history
 Using sidekiq-statsd gem to plot sidekiq activity
  • Loading branch information
danielroseman committed Nov 9, 2015
2 parents 84bca17 + 8cd146d commit fd3ac12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gem "plek", "1.7.0"
gem "quiet_assets", "1.0.3"
gem "rack", "~> 1.4.6" # explicitly requiring patched version re: CVE-2015-3225
gem "sidekiq", "3.2.1"
gem "sidekiq-statsd", "0.1.5"
gem "unicorn", "4.8.2"

if ENV["GOVSPEAK_DEV"]
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ GEM
json
redis (>= 3.0.6)
redis-namespace (>= 1.3.1)
sidekiq-statsd (0.1.5)
activesupport
sidekiq (>= 2.6)
statsd-ruby (>= 1.1.0)
simplecov (0.10.0)
docile (~> 1.1.0)
json (~> 1.8)
Expand All @@ -330,6 +334,7 @@ GEM
sprockets-rails (0.0.1)
sprockets (>= 1.0.2)
state_machine (1.2.0)
statsd-ruby (1.2.1)
thor (0.19.1)
tilt (1.4.1)
timecop (0.7.1)
Expand Down Expand Up @@ -403,6 +408,7 @@ DEPENDENCIES
sass-rails (= 3.2.6)
select2-rails (= 3.5.9)
sidekiq (= 3.2.1)
sidekiq-statsd (= 0.1.5)
simplecov
sinatra
timecop
Expand Down
4 changes: 4 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Sidekiq.configure_server do |config|
config.redis = redis_config
config.error_handlers << Proc.new {|ex, context_hash| Airbrake.notify(ex, context_hash) }

config.server_middleware do |chain|
chain.add Sidekiq::Statsd::ServerMiddleware, env: "govuk.app.specialist-publisher", prefix: "workers"
end
end

Sidekiq.configure_client do |config|
Expand Down

0 comments on commit fd3ac12

Please sign in to comment.