Skip to content

Commit

Permalink
expand metrics appraisal matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
zvkemp committed Jan 6, 2025
1 parent 765a3a6 commit fa9b814
Showing 1 changed file with 36 additions and 43 deletions.
79 changes: 36 additions & 43 deletions instrumentation/sidekiq/Appraisals
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
# frozen_string_literal: true

appraise 'sidekiq-7.0' do
gem 'sidekiq', '~> 7.0'

remove_gem 'opentelemetry-metrics-sdk'
remove_gem 'opentelemetry-metrics-api'
end

appraise 'sidekiq-7.0-metrics-sdk' do
gem 'sidekiq', '~> 7.0'
end

# explicitly test without SDK
appraise 'sidekiq-7.0-metrics-api' do
gem 'sidekiq', '~> 7.0'

remove_gem 'opentelemetry-metrics-sdk'
end

appraise 'sidekiq-6.5' do
gem 'sidekiq', '>= 6.5', '< 7.0'
remove_gem 'opentelemetry-metrics-api'
remove_gem 'opentelemetry-metrics-sdk'
end

appraise 'sidekiq-6.0' do
gem 'sidekiq', '>= 6.0', '< 6.5'
gem 'redis', '< 4.8'
remove_gem 'opentelemetry-metrics-api'
remove_gem 'opentelemetry-metrics-sdk'
end

appraise 'sidekiq-5.2' do
gem 'sidekiq', '~> 5.2'
gem 'redis', '< 4.8'
remove_gem 'opentelemetry-metrics-api'
remove_gem 'opentelemetry-metrics-sdk'
end

appraise 'sidekiq-4.2' do
gem 'sidekiq', '~> 4.2'
gem 'redis', '< 4.8'
remove_gem 'opentelemetry-metrics-api'
remove_gem 'opentelemetry-metrics-sdk'
{
'sidekiq-7' => [['sidekiq', '~> 7.0']],
'sidekiq-6.5' => [['sidekiq', '>= 6.5', '< 7.0']],
'sidekiq-6.0' => [
['sidekiq', '>= 6.0', '< 6.5'],
['redis', '< 4.8']
],
'sidekiq-5.2' => [
['sidekiq', '~> 5.2'],
['redis', '< 4.8']
],
'sidekiq-4.2' => [
['sidekiq', '~> 4.2'],
['redis', '< 4.8']
]
}.each do |gemfile_name, specs|
appraise gemfile_name do
specs.each do |spec|
gem *spec
remove_gem 'opentelemetry-metrics-api'
remove_gem 'opentelemetry-metrics-sdk'
end
end

appraise "#{gemfile_name}-metrics-api" do
specs.each do |spec|
gem *spec
remove_gem 'opentelemetry-metrics-sdk'
end
end

appraise "#{gemfile_name}-metrics-sdk" do
specs.each do |spec|
gem *spec
end
end
end

0 comments on commit fa9b814

Please sign in to comment.