From ba34d67efd6c4c79c6fb266e6221fa36d5d26385 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Wed, 30 Mar 2022 21:34:28 +0000 Subject: [PATCH] chore: AWS SDK min version 3.0 Bumps auto-instrumentation version to 3.0, which is the minimum supported version as of 2021-11-21 > We are announcing that version 2 of the AWS SDK For Ruby will enter maintenance mode on 11/20/2020. > Support for version 2 will end on 11/21/2021. https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/ --- instrumentation/aws_sdk/Appraisals | 48 ------------------- .../aws_sdk/gemfiles/aws_sdk_2.0.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.1.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.10.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.11.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.2.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.3.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.4.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.5.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.6.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.7.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.8.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_2.9.gemfile | 15 ------ .../aws_sdk/gemfiles/aws_sdk_3.0.gemfile | 1 + .../aws_sdk/gemfiles/aws_sdk_3.1.gemfile | 1 + .../aws_sdk/instrumentation.rb | 2 +- ...ntelemetry-instrumentation-aws_sdk.gemspec | 2 +- .../opentelemetry/instrumentation_test.rb | 4 +- 18 files changed, 5 insertions(+), 233 deletions(-) delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.0.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.1.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.10.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.11.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.2.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.3.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.4.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.5.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.6.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.7.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.8.gemfile delete mode 100644 instrumentation/aws_sdk/gemfiles/aws_sdk_2.9.gemfile diff --git a/instrumentation/aws_sdk/Appraisals b/instrumentation/aws_sdk/Appraisals index 5ecdbf591a..f50506544a 100644 --- a/instrumentation/aws_sdk/Appraisals +++ b/instrumentation/aws_sdk/Appraisals @@ -11,51 +11,3 @@ end appraise 'aws-sdk-3.0' do gem 'aws-sdk', '~> 3.0' end - -appraise 'aws-sdk-2.11' do - gem 'aws-sdk', '~> 2.11' -end - -appraise 'aws-sdk-2.10' do - gem 'aws-sdk', '~> 2.10' -end - -appraise 'aws-sdk-2.9' do - gem 'aws-sdk', '~> 2.9' -end - -appraise 'aws-sdk-2.8' do - gem 'aws-sdk', '~> 2.8' -end - -appraise 'aws-sdk-2.7' do - gem 'aws-sdk', '~> 2.7' -end - -appraise 'aws-sdk-2.6' do - gem 'aws-sdk', '~> 2.6' -end - -appraise 'aws-sdk-2.5' do - gem 'aws-sdk', '~> 2.5' -end - -appraise 'aws-sdk-2.4' do - gem 'aws-sdk', '~> 2.4' -end - -appraise 'aws-sdk-2.3' do - gem 'aws-sdk', '~> 2.3' -end - -appraise 'aws-sdk-2.2' do - gem 'aws-sdk', '~> 2.2' -end - -appraise 'aws-sdk-2.1' do - gem 'aws-sdk', '~> 2.1' -end - -appraise 'aws-sdk-2.0' do - gem 'aws-sdk', '~> 2.0' -end diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.0.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.0.gemfile deleted file mode 100644 index cef49f2c29..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.0.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.0" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.1.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.1.gemfile deleted file mode 100644 index db21a781e5..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.1.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.1" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.10.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.10.gemfile deleted file mode 100644 index dee32c620b..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.10.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.10" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.11.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.11.gemfile deleted file mode 100644 index 04384fcc4e..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.11.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.11" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.2.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.2.gemfile deleted file mode 100644 index ce98b33a09..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.2.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.2" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.3.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.3.gemfile deleted file mode 100644 index a0d81a8f2d..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.3.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.3" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.4.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.4.gemfile deleted file mode 100644 index b0de2baacc..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.4.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.4" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.5.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.5.gemfile deleted file mode 100644 index 8a49c3204f..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.5.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.5" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.6.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.6.gemfile deleted file mode 100644 index e3365f534b..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.6.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.6" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.7.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.7.gemfile deleted file mode 100644 index 2c8fe52a9c..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.7.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.7" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.8.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.8.gemfile deleted file mode 100644 index ed1eb523c3..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.8.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.8" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.9.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_2.9.gemfile deleted file mode 100644 index 66071d6977..0000000000 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_2.9.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "opentelemetry-api", path: "../../../api" -gem "opentelemetry-instrumentation-base", path: "../../base" -gem "aws-sdk", "~> 2.9" - -group :test do - gem "opentelemetry-common", path: "../../../common" - gem "opentelemetry-sdk", path: "../../../sdk" - gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" -end - -gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_3.0.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_3.0.gemfile index 0719f5fd91..c26893d3b3 100644 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_3.0.gemfile +++ b/instrumentation/aws_sdk/gemfiles/aws_sdk_3.0.gemfile @@ -10,6 +10,7 @@ group :test do gem "opentelemetry-common", path: "../../../common" gem "opentelemetry-sdk", path: "../../../sdk" gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" + gem "webrick", "~> 1.7" end gemspec path: "../" diff --git a/instrumentation/aws_sdk/gemfiles/aws_sdk_3.1.gemfile b/instrumentation/aws_sdk/gemfiles/aws_sdk_3.1.gemfile index 884b1f6f49..f2b83e8bb4 100644 --- a/instrumentation/aws_sdk/gemfiles/aws_sdk_3.1.gemfile +++ b/instrumentation/aws_sdk/gemfiles/aws_sdk_3.1.gemfile @@ -10,6 +10,7 @@ group :test do gem "opentelemetry-common", path: "../../../common" gem "opentelemetry-sdk", path: "../../../sdk" gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions" + gem "webrick", "~> 1.7" end gemspec path: "../" diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb index 640ebb4bc9..ac9e4e2b19 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb @@ -9,7 +9,7 @@ module Instrumentation module AwsSdk # Instrumentation class that detects and installs the AwsSdk instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base - MINIMUM_VERSION = Gem::Version.new('2.0') + MINIMUM_VERSION = Gem::Version.new('3.0') install do |_config| require_dependencies diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index 0097af3d70..aeaf66f2d6 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.19.0' spec.add_development_dependency 'appraisal', '~> 2.2.0' - spec.add_development_dependency 'aws-sdk', '>= 2.0' + spec.add_development_dependency 'aws-sdk', '>= 3.0' spec.add_development_dependency 'bundler', '>= 1.17' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' diff --git a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb index 5e79d4eb42..7f634593c2 100644 --- a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb +++ b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb @@ -29,9 +29,7 @@ end it 'returns true for supported gem versions' do - Gem.stub(:loaded_specs, 'aws-sdk' => Gem::Specification.new { |s| s.version = minimum_version }) do - _(instrumentation.compatible?).must_equal true - end + _(instrumentation.compatible?).must_equal true end end