README.md in sidekiq-statsd-1.0.0 vs README.md in sidekiq-statsd-2.0.1

- old
+ new

@@ -9,12 +9,15 @@ Sidekiq::Statsd is tested against [several Ruby versions](.travis.yml#L4). ## Installation -Add this line to your application's Gemfile: +Add these lines to your application's Gemfile: + gem "statsd-ruby" + # or if you are using Datadog + # gem "dogstatsd-ruby" gem "sidekiq-statsd" And then execute: $ bundle @@ -27,12 +30,19 @@ In a Rails initializer or wherever you've configured Sidekiq, add Sidekiq::Statsd to your server middleware: ```ruby +require 'statsd' +statsd = Statsd.new('localhost', 8125) + +# or if you are using Datadog +# require 'datadog/statsd' +# statsd = Datadog::Statsd.new('localhost', 8125) + Sidekiq.configure_server do |config| config.server_middleware do |chain| - chain.add Sidekiq::Statsd::ServerMiddleware, env: "production", prefix: "worker", host: "localhost", port: 8125 + chain.add Sidekiq::Statsd::ServerMiddleware, env: "production", prefix: "worker", statsd: statsd end end ``` ### Sidekiq::Statsd::ServerMiddleware options