Closed machty closed 3 years ago
An initializer creates a telegraf agent and stores it in app.config.telegraf.agent
. This agent is used when installing the sidekiq middleware in another initializer.
Are you doing some manual install? The sidekiq middleware should be automatically installed if used inside in a Rails application.
In a Rails application, it should be enough to add the require
statements to config/application.rb
:
# ...
require 'telegraf/rails'
module MyApp
class Application < Rails::Application
# ...
Oh, no I'm using Rails. I misread the docs and figured I still needed to do the Sidekiq chain config.
Let me try getting rid of the Sidekiq chaining code to see if it's all working.
Yeah it worked, just was surprised that my "background" metric was renamed to "sidekiq", so I made this PR: #13.
Man, if people know what's good for them I'd expect this repo to have 400 stars by July.
I have
config.telegraf.connect = "udp://localhost:61022"
in my config/application.rb; is there any way to just the Sidekiq middleware use the same agent configuration from config/application.rb? If not, I have to copy the"udp://localhost:61022"
everywhere else, which seems weird, but maybe I'm thinking about it wrong.