I'm in the process of setting up the ELK stack for all our applications to manage log aggregation.
Lograge has been extremely useful to compress rails multi-line log into a single-line JSON log.
It would be great to have the same for Sidekiq, so I'm here asking if there's anything already in place (a setting, a plugin, ...) which will do the job.
If that's not the case, what's the preferred course of actions in this case?
Thanks,
Mattia
Sidekiq.configure_server do |config|
config.logger.formatter = LogrageFormatter.new
end
Now you provide LogrageFormatter based on the default formatter. I'm not aware of an existing plugin but you are welcome to OSS your solution.
Many thanks, I'll work on it based on the 'default formatter'.
Would you prefer this to be implemented as an additional formatter inside sidekiq gem (PR) or as a standalone plugin-gem?
Standalone. It's small enough that someone can put it in an initializer and customize as necessary.
As promised: https://github.com/iMacTia/sidekiq-logstash
It's still a WIP and I would like to make it customisable based on input from other developers.
@mperham, I know you're a busy man, but your input would be really much appreciated :)
I have no real input but thanks for publishing it; I hope it works well for you and your users.
Most helpful comment
As promised: https://github.com/iMacTia/sidekiq-logstash
It's still a WIP and I would like to make it customisable based on input from other developers.
@mperham, I know you're a busy man, but your input would be really much appreciated :)