Sidekiq 6 compatibility when using "additional_dimensions" option
oskarpearson opened this issue · 1 comments
Hi Samuel - thanks for what looks like a great Gem.
Would you be able to create a new official 2.* series gem that matches current 'master', with support for sidekiq 6? I think merging https://github.com/sj26/sidekiq-cloudwatchmetrics/pull/9/files and bumping rubygem version to a version number > 2.0.0 should do it.
Thanks for any time you spend on this - really appreciate it. Don't hesitate to let me know if I can help in any way
Context:
We're using Sidekiq 6 - and while it looks like sidekiq-cloudwatchmetrics supports it from version 2.0.0 and above, I get an error when trying to use the additional_dimensions
flag.
From what I can see, 2.0.0 doesn't include this commit: 332a43a Version 2.0.0 isn't reflected in this repo's tags list.
Relevent error:
ArgumentError: unknown keyword: :additional_dimensions
/Users/oskar/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sidekiq-cloudwatchmetrics-2.0.0/lib/sidekiq/cloudwatchmetrics.rb:4
The sidekiq-cloudwatchmetrics-2.0.0/lib/sidekiq/cloudwatchmetrics.rb file contains this, which doesn't use kwargs
def initialize(client: Aws::CloudWatch::Client.new)
@client = client
end
Versions 1.* are limited to sidekiq 5 as per https://github.com/sj26/sidekiq-cloudwatchmetrics/blob/master/sidekiq-cloudwatchmetrics.gemspec#L22 Attempting to force a 1.0 series into my gemfile returned this error:
In Gemfile:
sidekiq-cloudwatchmetrics (~> 1) was resolved to 1.2.0, which depends on
sidekiq (~> 5.0)
sidekiq-pro was resolved to 5.2.1, which depends on
sidekiq (>= 6.1.0)
Sorry @oskarpearson, I'm not sure what happened to v2.0.0.
There are releases since then which should retain backwards compatibility and also include all features, including additional_dimensions. Please upgrade and give it a go.