diff --git a/.github/actions/test_gem/action.yml b/.github/actions/test_gem/action.yml index 4b4ddfbcf..6d18d8997 100644 --- a/.github/actions/test_gem/action.yml +++ b/.github/actions/test_gem/action.yml @@ -66,7 +66,7 @@ runs: # ...but not for appraisals, sadly. - name: Install Ruby ${{ inputs.ruby }} with dependencies if: "${{ steps.setup.outputs.appraisals == 'false' }}" - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: "${{ inputs.ruby }}" working-directory: "${{ steps.setup.outputs.gem_dir }}" @@ -77,7 +77,7 @@ runs: # If we're using appraisals, do it all manually. - name: Install Ruby ${{ inputs.ruby }} without dependencies if: "${{ steps.setup.outputs.appraisals == 'true' }}" - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: "${{ inputs.ruby }}" bundler: "latest" diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index 5efb7c95e..c0dd04861 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 # ATTENTION: Dependabot does not know how to update shared actions file. # If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml - - uses: ruby/setup-ruby@v1.194.0 + - uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ matrix.ruby-version }} - name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}" diff --git a/.github/workflows/release-hook-on-closed.yml b/.github/workflows/release-hook-on-closed.yml index 29c07df0f..984ded503 100644 --- a/.github/workflows/release-hook-on-closed.yml +++ b/.github/workflows/release-hook-on-closed.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-hook-on-push.yml b/.github/workflows/release-hook-on-push.yml index 66653b863..80c2e3d72 100644 --- a/.github/workflows/release-hook-on-push.yml +++ b/.github/workflows/release-hook-on-push.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index e7cfd5af5..258414061 100644 --- a/.github/workflows/release-perform.yml +++ b/.github/workflows/release-perform.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 0e113ec04..f5a9507a1 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -50,7 +50,7 @@ jobs: chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - - uses: ruby/setup-ruby@v1.194.0 + - uses: ruby/setup-ruby@v1.196.0 with: ruby-version: "3.0" bundler: latest diff --git a/.github/workflows/release-request-weekly.yml b/.github/workflows/release-request-weekly.yml index 03c1ca27c..65c158239 100644 --- a/.github/workflows/release-request-weekly.yml +++ b/.github/workflows/release-request-weekly.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index 6d208071d..9c0a4746d 100644 --- a/.github/workflows/release-request.yml +++ b/.github/workflows/release-request.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index 27e8149d3..b20aa1fdc 100644 --- a/.github/workflows/release-retry.yml +++ b/.github/workflows/release-retry.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.194.0 + uses: ruby/setup-ruby@v1.196.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.instrumentation_generator/templates/gemspec.tt b/.instrumentation_generator/templates/gemspec.tt index fb51740b9..fdc83c9e2 100644 --- a/.instrumentation_generator/templates/gemspec.tt +++ b/.instrumentation_generator/templates/gemspec.tt @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.66.0' spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/CODEOWNERS b/CODEOWNERS index 732650bfb..96e9c51be 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -16,7 +16,7 @@ resources/container/ @scbjans @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @xuan-cao-swi -instrumentation/aws_sdk/ @NathanielRN @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @xuan-cao-swi +instrumentation/aws_sdk/ @jterapin @alextwoods @NathanielRN @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @xuan-cao-swi instrumentation/grape/ @muripic @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @xuan-cao-swi diff --git a/helpers/mysql/opentelemetry-helpers-mysql.gemspec b/helpers/mysql/opentelemetry-helpers-mysql.gemspec index 5cebc24d6..5279d529c 100644 --- a/helpers/mysql/opentelemetry-helpers-mysql.gemspec +++ b/helpers/mysql/opentelemetry-helpers-mysql.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.21.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec index 1ce168184..1b1ee1906 100644 --- a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec +++ b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.21.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec index 2a00a1534..df2373c87 100644 --- a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec +++ b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index 27745ffac..3218d7075 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index 79685ab32..88d93245e 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 974244bd7..abfbd6057 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec index 315ab5e41..0ddac5cf5 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index 29eeab35d..fdd43f1a5 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index e692985f1..eb596dec1 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -40,9 +40,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 438034604..459ab7e2b 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.66.0 / 2024-10-08 + +* ADDED: Integration with V3 telemetry provider for the aws-sdk + ### v0.65.0 / 2024-09-19 * ADDED: All AWS services emit traces diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 987e5b61d..c05a4c33d 100644 --- a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb +++ b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module All - VERSION = '0.65.0' + VERSION = '0.66.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 6434734c9..bccb40e24 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.20.1' spec.add_dependency 'opentelemetry-instrumentation-aws_lambda', '~> 0.1.0' - spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.6.0' + spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.21.1' spec.add_dependency 'opentelemetry-instrumentation-dalli', '~> 0.25.0' @@ -67,7 +67,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec index 79937f592..9bf702871 100644 --- a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec +++ b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/aws_sdk/Appraisals b/instrumentation/aws_sdk/Appraisals index 5ecdbf591..c9c9b908b 100644 --- a/instrumentation/aws_sdk/Appraisals +++ b/instrumentation/aws_sdk/Appraisals @@ -4,58 +4,27 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'aws-sdk-3.1' do - gem 'aws-sdk', '~> 3.1' +appraise 'aws-sdk-3' do + gem 'aws-sdk-core', '~> 3' + gem 'aws-sdk-lambda', '~> 1' + gem 'aws-sdk-dynamodb', '~> 1' + gem 'aws-sdk-sns', '~> 1' + gem 'aws-sdk-sqs', '~> 1' end -appraise 'aws-sdk-3.0' do - gem 'aws-sdk', '~> 3.0' +# pre-Observability support in V3 SDK +appraise 'aws-sdk-3.202' do + gem 'aws-sdk-core', '~> 3.202' + gem 'aws-sdk-lambda', '~> 1.127' + gem 'aws-sdk-dynamodb', '~> 1.118' + gem 'aws-sdk-sns', '~> 1.82' + gem 'aws-sdk-sqs', '~> 1.80' 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/CHANGELOG.md b/instrumentation/aws_sdk/CHANGELOG.md index a382f2c7a..4c00cd561 100644 --- a/instrumentation/aws_sdk/CHANGELOG.md +++ b/instrumentation/aws_sdk/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-aws_sdk +### v0.7.0 / 2024-10-08 + +* ADDED: Integration with V3 telemetry provider + ### v0.6.0 / 2024-09-19 * ADDED: All AWS services emit traces diff --git a/instrumentation/aws_sdk/README.md b/instrumentation/aws_sdk/README.md index e1885d7a9..fcf4de368 100644 --- a/instrumentation/aws_sdk/README.md +++ b/instrumentation/aws_sdk/README.md @@ -32,6 +32,30 @@ OpenTelemetry::SDK.configure do |c| c.use_all end ``` +### Configuration options +This instrumentation offers the following configuration options: +* `:inject_messaging_context` (default: `false`): When set to `true`, adds context key/value + to Message Attributes for SQS/SNS messages. +* `suppress_internal_instrumentation` (default: `false`): When set to `true`, any spans with + span kind of `internal` are suppressed from traces. + +## Integration with SDK V3's Telemetry support +AWS SDK for Ruby V3 added support for Observability which includes a new configuration, +`telemetry_provider` and an OpenTelemetry-based telemetry provider. Only applies to +AWS service gems released after 2024-09-03. + +Using later versions of these gems will give more details on the internal spans. +See below for example usage: +```ruby +# configures the OpenTelemetry SDK with instrumentation defaults +OpenTelemetry::SDK.configure do |c| + c.use 'OpenTelemetry::Instrumentation::AwsSdk' +end + +# create open-telemetry provider and pass to client config +otel_provider = Aws::Telemetry::OTelProvider.new +client = Aws::S3::Client.new(telemetry_provider: otel_provider) +``` ## Example diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb index c0b040956..40ec604c7 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb @@ -7,26 +7,23 @@ module OpenTelemetry module Instrumentation module AwsSdk - # Generates Spans for all interactions with AwsSdk + # This handler supports specifically supports V2 and V3 + # prior to Observability support released on 2024-09-03. class Handler < Seahorse::Client::Handler def call(context) return super unless context - service_id = service_name(context) - operation = context.operation&.name - client_method = "#{service_id}.#{operation}" + service_id = HandlerHelper.service_id(context, legacy: true) + client_method = HandlerHelper.client_method(service_id, context) tracer.in_span( - span_name(context, client_method, service_id), - attributes: attributes(context, client_method, service_id, operation), - kind: span_kind(client_method, service_id) + HandlerHelper.span_name(context, client_method, service_id, legacy: true), + attributes: HandlerHelper.span_attributes(context, client_method, service_id, legacy: true), + kind: HandlerHelper.span_kind(client_method, service_id) ) do |span| - if instrumentation_config[:inject_messaging_context] && - %w[SQS SNS].include?(service_id) - MessagingHelper.inject_context(context, client_method) - end + MessagingHelper.inject_context_if_supported(context, client_method, service_id) - if instrumentation_config[:suppress_internal_instrumentation] + if HandlerHelper.instrumentation_config[:suppress_internal_instrumentation] OpenTelemetry::Common::Utilities.untraced { super } else super @@ -49,47 +46,6 @@ def call(context) def tracer AwsSdk::Instrumentation.instance.tracer end - - def instrumentation_config - AwsSdk::Instrumentation.instance.config - end - - def service_name(context) - # Support aws-sdk v2.0.x, which 'metadata' has a setter method only - return context.client.class.to_s.split('::')[1] if ::Seahorse::Model::Api.instance_method(:metadata).parameters.length.positive? - - context.client.class.api.metadata['serviceId'] || context.client.class.to_s.split('::')[1] - end - - def span_kind(client_method, service_id) - case service_id - when 'SQS', 'SNS' - MessagingHelper.span_kind(client_method) - else - OpenTelemetry::Trace::SpanKind::CLIENT - end - end - - def span_name(context, client_method, service_id) - case service_id - when 'SQS', 'SNS' - MessagingHelper.legacy_span_name(context, client_method) - else - client_method - end - end - - def attributes(context, client_method, service_id, operation) - { - 'aws.region' => context.config.region, - OpenTelemetry::SemanticConventions::Trace::RPC_SYSTEM => 'aws-api', - OpenTelemetry::SemanticConventions::Trace::RPC_METHOD => operation, - OpenTelemetry::SemanticConventions::Trace::RPC_SERVICE => service_id - }.tap do |attrs| - attrs[SemanticConventions::Trace::DB_SYSTEM] = 'dynamodb' if service_id == 'DynamoDB' - MessagingHelper.apply_span_attributes(context, attrs, client_method, service_id) if %w[SQS SNS].include?(service_id) - end - end end # A Seahorse::Client::Plugin that enables instrumentation for all AWS services diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler_helper.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler_helper.rb new file mode 100644 index 000000000..9b5a01304 --- /dev/null +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler_helper.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module AwsSdk + # Utility module that contains shared methods between AwsSdk and Telemetry handlers + module HandlerHelper + class << self + def instrumentation_config + AwsSdk::Instrumentation.instance.config + end + + def client_method(service_id, context) + "#{service_id}.#{context.operation.name}".delete(' ') + end + + def span_attributes(context, client_method, service_id, legacy: false) + { + 'aws.region' => context.config.region, + OpenTelemetry::SemanticConventions::Trace::CODE_FUNCTION => context.operation_name.to_s, + OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE => 'Aws::Plugins::Telemetry', + OpenTelemetry::SemanticConventions::Trace::RPC_METHOD => context.operation.name, + OpenTelemetry::SemanticConventions::Trace::RPC_SERVICE => service_id, + OpenTelemetry::SemanticConventions::Trace::RPC_SYSTEM => 'aws-api' + }.tap do |attrs| + attrs[OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE] = 'Aws::Plugins::AwsSdk' if legacy + attrs[SemanticConventions::Trace::DB_SYSTEM] = 'dynamodb' if service_id == 'DynamoDB' + + MessagingHelper.apply_span_attributes(context, attrs, client_method, service_id) if MessagingHelper::SUPPORTED_SERVICES.include?(service_id) + end + end + + def span_kind(client_method, service_id) + case service_id + when *MessagingHelper::SUPPORTED_SERVICES + MessagingHelper.span_kind(client_method) + else + OpenTelemetry::Trace::SpanKind::CLIENT + end + end + + def span_name(context, client_method, service_id, legacy: false) + case service_id + when *MessagingHelper::SUPPORTED_SERVICES + if legacy + MessagingHelper.legacy_span_name(context, client_method) + else + MessagingHelper.span_name(context, client_method) + end + else + client_method + end + end + + def service_id(context, legacy: false) + if legacy + legacy_service_id(context) + else + context.config.api.metadata['serviceId'] || + context.config.api.metadata['serviceAbbreviation'] || + context.config.api.metadata['serviceFullName'] + end + end + + private + + def legacy_service_id(context) + # Support aws-sdk v2.0.x, which 'metadata' has a setter method only + return context.client.class.to_s.split('::')[1] if ::Seahorse::Model::Api.instance_method(:metadata).parameters.length.positive? + + context.client.class.api.metadata['serviceId'] || context.client.class.to_s.split('::')[1] + end + end + end + end + end +end 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 928b9b98e..fe8651c25 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb @@ -7,12 +7,38 @@ module OpenTelemetry module Instrumentation module AwsSdk - # Instrumentation class that detects and installs the AwsSdk instrumentation + # The `OpenTelemetry::Instrumentation::AwsSdk::Instrumentation` class contains + # logic to detect and install the AwsSdk instrumentation. + # + # ## Configuration keys and options + # + # ### `:inject_messaging_context` + # + # Allows adding of context key/value to Message Attributes for SQS/SNS messages. + # + # - `false` **(default)** - Context key/value will not be added. + # - `true` - Context key/value will be added. + # + # ### `:suppress_internal_instrumentation` + # + # Disables tracing of spans of `internal` span kind. + # + # - `false` **(default)** - Internal spans are traced. + # - `true` - Internal spans are not traced. + # + # @example An explicit default configuration + # OpenTelemetry::SDK.configure do |c| + # c.use 'OpenTelemetry::Instrumentation::AwsSdk', { + # inject_messaging_context: false, + # suppress_internal_instrumentation: false + # } + # end class Instrumentation < OpenTelemetry::Instrumentation::Base MINIMUM_VERSION = Gem::Version.new('2.0.0') install do |_config| require_dependencies + patch_telemetry_plugin if telemetry_plugin? add_plugins(Seahorse::Client::Base, *loaded_service_clients) end @@ -41,12 +67,34 @@ def gem_version def require_dependencies require_relative 'handler' + require_relative 'handler_helper' require_relative 'message_attributes' require_relative 'messaging_helper' + require_relative 'patches/telemetry' end def add_plugins(*targets) - targets.each { |klass| klass.add_plugin(AwsSdk::Plugin) } + targets.each do |klass| + next if supports_telemetry_plugin?(klass) + + klass.add_plugin(AwsSdk::Plugin) + end + end + + def supports_telemetry_plugin?(klass) + telemetry_plugin? && + klass.plugins.include?(Aws::Plugins::Telemetry) + end + + def telemetry_plugin? + ::Aws::Plugins.const_defined?(:Telemetry) + end + + # Patches AWS SDK V3's telemetry plugin for integration + # This patch supports configuration set by this gem and + # additional span attributes that was not provided by the plugin + def patch_telemetry_plugin + ::Aws::Plugins::Telemetry::Handler.prepend(Patches::Handler) end def loaded_service_clients diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/messaging_helper.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/messaging_helper.rb index 27064aa74..b821aca56 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/messaging_helper.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/messaging_helper.rb @@ -9,6 +9,7 @@ module Instrumentation module AwsSdk # An utility class to help SQS/SNS-related span attributes/context injection class MessagingHelper + SUPPORTED_SERVICES = %w[SQS SNS].freeze class << self SQS_SEND_MESSAGE = 'SQS.SendMessage' SQS_SEND_MESSAGE_BATCH = 'SQS.SendMessageBatch' @@ -16,6 +17,10 @@ class << self SNS_PUBLISH = 'SNS.Publish' SEND_MESSAGE_CLIENT_METHODS = [SQS_SEND_MESSAGE, SQS_SEND_MESSAGE_BATCH, SNS_PUBLISH].freeze + def supported_services + SUPPORTED_SERVICES + end + def queue_name(context) topic_arn = context.params[:topic_arn] target_arn = context.params[:target_arn] @@ -34,6 +39,17 @@ def queue_name(context) 'unknown' end + def span_name(context, client_method) + case client_method + when SQS_SEND_MESSAGE, SQS_SEND_MESSAGE_BATCH, SNS_PUBLISH + "#{client_method}.#{queue_name(context)}.Publish" + when SQS_RECEIVE_MESSAGE + "#{client_method}.#{queue_name(context)}.Receive" + else + client_method + end + end + def legacy_span_name(context, client_method) case client_method when SQS_SEND_MESSAGE, SQS_SEND_MESSAGE_BATCH, SNS_PUBLISH @@ -65,6 +81,13 @@ def span_kind(client_method) end end + def inject_context_if_supported(context, client_method, service_id) + if HandlerHelper.instrumentation_config[:inject_messaging_context] && + SUPPORTED_SERVICES.include?(service_id) + inject_context(context, client_method) + end + end + def inject_context(context, client_method) return unless SEND_MESSAGE_CLIENT_METHODS.include?(client_method) diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/patches/telemetry.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/patches/telemetry.rb new file mode 100644 index 000000000..31bb41c39 --- /dev/null +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/patches/telemetry.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module AwsSdk + module Patches + # Patch for Telemetry Plugin Handler in V3 SDK + module Handler + def call(context) + span_wrapper(context) { @handler.call(context) } + end + + private + + def span_wrapper(context, &block) + service_id = HandlerHelper.service_id(context) + client_method = HandlerHelper.client_method(service_id, context) + context.tracer.in_span( + HandlerHelper.span_name(context, client_method, service_id), + attributes: HandlerHelper.span_attributes(context, client_method, service_id), + kind: HandlerHelper.span_kind(client_method, service_id) + ) do |span| + MessagingHelper.inject_context_if_supported(context, client_method, service_id) + + if HandlerHelper.instrumentation_config[:suppress_internal_instrumentation] + OpenTelemetry::Common::Utilities.untraced { super } + else + yield span + end + end + end + end + end + end + end +end diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb index 0fbf946cf..6fe03e491 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module AwsSdk - VERSION = '0.6.0' + VERSION = '0.7.0' end end end diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index 6562625c6..7cb853d52 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -38,9 +38,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/aws_sdk/test/opentelemetry/handler_test.rb b/instrumentation/aws_sdk/test/opentelemetry/handler_test.rb new file mode 100644 index 000000000..8b178948c --- /dev/null +++ b/instrumentation/aws_sdk/test/opentelemetry/handler_test.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'test_helper' + +describe OpenTelemetry::Instrumentation::AwsSdk do + describe 'AwsSdk Plugin' do + let(:instrumentation_gem_version) do + OpenTelemetry::Instrumentation::AwsSdk::Instrumentation.instance.gem_version + end + let(:otel_semantic) { OpenTelemetry::SemanticConventions::Trace } + let(:exporter) { EXPORTER } + let(:span) { exporter.finished_spans.last } + let(:span_attrs) do + { + 'aws.region' => 'us-stubbed-1', + otel_semantic::HTTP_STATUS_CODE => 200, + otel_semantic::RPC_SYSTEM => 'aws-api' + } + end + + before do + exporter.reset + end + + describe 'Lambda' do + let(:service_name) { 'Lambda' } + let(:client) { Aws::Lambda::Client.new(stub_responses: true) } + let(:expected_attrs) do + span_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'ListFunctions' + attrs[otel_semantic::RPC_SERVICE] = service_name + end + end + + it 'creates a span with all the supplied parameters' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.list_functions + + _(span.name).must_equal('Lambda.ListFunctions') + _(span.kind).must_equal(:client) + TestHelper.match_span_attrs(expected_attrs, span, self) + end + + it 'should have correct span attributes when error' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.stub_responses(:list_functions, 'NotFound') + + begin + client.list_functions + rescue Aws::Lambda::Errors::NotFound + _(span.status.code).must_equal(2) + _(span.events[0].name).must_equal('exception') + _(span.attributes[otel_semantic::HTTP_STATUS_CODE]).must_equal(400) + end + end + end + + describe 'SNS' do + let(:service_name) { 'SNS' } + let(:client) { Aws::SNS::Client.new(stub_responses: true) } + let(:expected_attrs) do + span_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'Publish' + attrs[otel_semantic::RPC_SERVICE] = service_name + attrs[otel_semantic::MESSAGING_DESTINATION_KIND] = 'topic' + attrs[otel_semantic::MESSAGING_DESTINATION] = 'TopicName' + attrs[otel_semantic::MESSAGING_SYSTEM] = 'aws.sns' + end + end + + it 'creates a span with appropriate messaging attributes' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.publish( + message: 'msg', + topic_arn: 'arn:aws:sns:fake:123:TopicName' + ) + + _(span.name).must_equal('TopicName publish') + _(span.kind).must_equal(:producer) + TestHelper.match_span_attrs(expected_attrs, span, self) + end + + it 'creates a span that includes a phone number' do + # skip if using aws-sdk version before phone_number supported (v2.3.18) + skip if Gem::Version.new('2.3.18') > instrumentation_gem_version + skip if TestHelper.telemetry_plugin?(service_name) + + client.publish(message: 'msg', phone_number: '123456') + + _(span.name).must_equal('phone_number publish') + _(span.attributes[otel_semantic::MESSAGING_DESTINATION]) + .must_equal('phone_number') + end + end + + describe 'SQS' do + let(:service_name) { 'SQS' } + let(:client) { Aws::SQS::Client.new(stub_responses: true) } + let(:queue_url) { 'https://sqs.fake.amazonaws.com/1/QueueName' } + let(:expected_base_attrs) do + span_attrs.tap do |attrs| + attrs[otel_semantic::RPC_SERVICE] = service_name + attrs[otel_semantic::MESSAGING_DESTINATION_KIND] = 'queue' + attrs[otel_semantic::MESSAGING_DESTINATION] = 'QueueName' + attrs[otel_semantic::MESSAGING_SYSTEM] = 'aws.sqs' + attrs[otel_semantic::MESSAGING_URL] = queue_url + end + end + + describe '#SendMessage' do + let(:expected_attrs) do + span_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'SendMessage' + end + end + + it 'creates a span with appropriate messaging attributes' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.send_message(message_body: 'msg', queue_url: queue_url) + + _(span.name).must_equal('QueueName publish') + _(span.kind).must_equal(:producer) + TestHelper.match_span_attrs(expected_attrs, span, self) + end + end + + describe '#SendMessageBatch' do + let(:expected_attrs) do + expected_base_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'SendMessageBatch' + end + end + + it 'creates a span with appropriate messaging attributes' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.send_message_batch( + queue_url: queue_url, + entries: [{ id: 'Message1', message_body: 'Body1' }] + ) + + _(span.name).must_equal('QueueName publish') + _(span.kind).must_equal(:producer) + TestHelper.match_span_attrs(expected_attrs, span, self) + end + end + + describe '#ReceiveMessage' do + let(:expected_attrs) do + expected_base_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'ReceiveMessage' + attrs[otel_semantic::MESSAGING_OPERATION] = 'receive' + end + end + + it 'creates a span with appropriate messaging attributes' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.receive_message(queue_url: queue_url) + + _(span.name).must_equal('QueueName receive') + _(span.kind).must_equal(:consumer) + TestHelper.match_span_attrs(expected_attrs, span, self) + end + end + + describe '#GetQueueUrl' do + it 'creates a span with appropriate messaging attributes' do + skip if TestHelper.telemetry_plugin?(service_name) + + client.get_queue_url(queue_name: 'queue-name') + + _(span.attributes['messaging.destination']) + .must_equal('unknown') + _(span.attributes).wont_include('messaging.url') + end + end + end + + describe 'DynamoDB' do + let(:client) { Aws::DynamoDB::Client.new(stub_responses: true) } + + it 'creates a span with dynamodb-specific attribute' do + skip if TestHelper.telemetry_plugin?('DynamoDB') + + client.list_tables + + _(span.attributes[otel_semantic::DB_SYSTEM]) + .must_equal('dynamodb') + end + end + end +end diff --git a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb index f44e81bc5..7ffe3d33f 100644 --- a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb +++ b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb @@ -9,8 +9,6 @@ describe OpenTelemetry::Instrumentation::AwsSdk do let(:instrumentation) { OpenTelemetry::Instrumentation::AwsSdk::Instrumentation.instance } let(:minimum_version) { OpenTelemetry::Instrumentation::AwsSdk::Instrumentation::MINIMUM_VERSION } - let(:exporter) { EXPORTER } - let(:last_span) { exporter.finished_spans.last } it 'has #name' do _(instrumentation.name).must_equal 'OpenTelemetry::Instrumentation::AwsSdk' @@ -28,12 +26,24 @@ _(instrumentation.compatible?).must_equal false end - Gem.stub(:loaded_specs, { 'aws-sdk-core' => nil, 'aws-sdk' => Gem::Specification.new { |s| s.version = '1.0.0' } }) do + Gem.stub( + :loaded_specs, + { + 'aws-sdk-core' => nil, + 'aws-sdk' => Gem::Specification.new { |s| s.version = '1.0.0' } + } + ) do hide_const('::Aws::CORE_GEM_VERSION') _(instrumentation.compatible?).must_equal false end - Gem.stub(:loaded_specs, { 'aws-sdk-core' => Gem::Specification.new { |s| s.version = '1.0.0' }, 'aws-sdk' => nil }) do + Gem.stub( + :loaded_specs, + { + 'aws-sdk-core' => Gem::Specification.new { |s| s.version = '1.0.0' }, + 'aws-sdk' => nil + } + ) do hide_const('::Aws::CORE_GEM_VERSION') _(instrumentation.compatible?).must_equal false end @@ -55,216 +65,4 @@ instrumentation.instance_variable_set(:@installed, false) end end - - describe 'validate_spans' do - describe 'SNS' do - it 'should have correct attributes' do - sns = Aws::SNS::Client.new(stub_responses: true) - sns.stub_responses(:publish) - - sns.publish message: 'msg' - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['rpc.service']).must_equal 'SNS' - _(last_span.attributes['rpc.method']).must_equal 'Publish' - _(last_span.attributes['aws.region']).must_include 'stubbed' - _(last_span.attributes['db.system']).must_be_nil - - _(last_span.attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE]).must_equal 200 - - _(last_span.status.code).must_equal OpenTelemetry::Trace::Status::UNSET - end - end - - describe 'S3' do - it 'should have correct attributes when success' do - s3 = Aws::S3::Client.new(stub_responses: { list_buckets: { buckets: [{ name: 'bucket1' }] } }) - - s3.list_buckets - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['rpc.service']).must_equal 'S3' - _(last_span.attributes['rpc.method']).must_equal 'ListBuckets' - _(last_span.attributes['aws.region']).must_include 'stubbed' - _(last_span.attributes['db.system']).must_be_nil - - _(last_span.attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE]).must_equal 200 - - _(last_span.status.code).must_equal OpenTelemetry::Trace::Status::UNSET - end - - it 'should have correct attributes when error' do - s3 = Aws::S3::Client.new(stub_responses: true) - s3.stub_responses(:list_buckets, 'NotFound') - - begin - s3.list_buckets - rescue StandardError - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['rpc.service']).must_equal 'S3' - _(last_span.attributes['rpc.method']).must_equal 'ListBuckets' - _(last_span.attributes['aws.region']).must_include 'stubbed' - _(last_span.attributes['db.system']).must_be_nil - end - - _(last_span.attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE]).must_equal 400 - - _(last_span.status.code).must_equal OpenTelemetry::Trace::Status::ERROR - end - end - - describe 'dynamodb' do - it 'should have db.system attribute' do - dynamodb_client = Aws::DynamoDB::Client.new(stub_responses: true) - - dynamodb_client.list_tables - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['db.system']).must_equal 'dynamodb' - - _(last_span.attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE]).must_equal 200 - end - end - - describe 'sqs' do - it 'should have messaging attributes for send_message' do - sqs_client = Aws::SQS::Client.new(stub_responses: true) - - sqs_client.send_message message_body: 'msg', queue_url: 'https://sqs.fake.amazonaws.com/1/queue-name' - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['messaging.system']).must_equal 'aws.sqs' - _(last_span.attributes['messaging.destination_kind']).must_equal 'queue' - _(last_span.attributes['messaging.destination']).must_equal 'queue-name' - _(last_span.attributes['messaging.url']).must_equal 'https://sqs.fake.amazonaws.com/1/queue-name' - end - - it 'should have messaging attributes for send_message_batch' do - sqs_client = Aws::SQS::Client.new(stub_responses: true) - - entries = [ - { - id: 'Message1', - message_body: 'This is the first message.' - }, - { - id: 'Message2', - message_body: 'This is the second message.', - message_attributes: { - attr1: { - data_type: 'String', - string_value: 'value1' - } - } - } - ] - - sqs_client.send_message_batch( - queue_url: 'https://sqs.fake.amazonaws.com/1/queue-name', - entries: entries - ) - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['messaging.system']).must_equal 'aws.sqs' - _(last_span.attributes['messaging.destination_kind']).must_equal 'queue' - _(last_span.attributes['messaging.destination']).must_equal 'queue-name' - _(last_span.attributes['messaging.url']).must_equal 'https://sqs.fake.amazonaws.com/1/queue-name' - end - - it 'should have messaging attributes for get_queue_url' do - sqs_client = Aws::SQS::Client.new(stub_responses: true) - - sqs_client.get_queue_url queue_name: 'queue-name' - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['messaging.system']).must_equal 'aws.sqs' - _(last_span.attributes['messaging.destination_kind']).must_equal 'queue' - _(last_span.attributes['messaging.destination']).must_equal 'unknown' - _(last_span.attributes).wont_include('messaging.url') - end - end - - describe 'sns' do - it 'should have messaging attributes for publish' do - sns_client = Aws::SNS::Client.new(stub_responses: true) - - sns_client.publish message: 'msg', topic_arn: 'arn:aws:sns:fake:123:topic-name' - - _(last_span.attributes['rpc.system']).must_equal 'aws-api' - _(last_span.attributes['messaging.system']).must_equal 'aws.sns' - _(last_span.attributes['messaging.destination_kind']).must_equal 'topic' - _(last_span.attributes['messaging.destination']).must_equal 'topic-name' - end - - it 'should handle phone numbers' do - # skip if using aws-sdk version before phone_number supported (v2.3.18) - return if Gem::Version.new('2.3.18') > instrumentation.gem_version - - sns_client = Aws::SNS::Client.new(stub_responses: true) - - sns_client.publish message: 'msg', phone_number: '123456' - - _(last_span.attributes['messaging.destination']).must_equal 'phone_number' - _(last_span.name).must_equal 'phone_number publish' - end - end - end - - describe 'MessageAttributeSetter' do - it 'set when hash length is lower than 10' do - key = 'foo' - value = 'bar' - metadata_attributes = {} - OpenTelemetry::Instrumentation::AwsSdk::MessageAttributeSetter.set(metadata_attributes, key, value) - _(metadata_attributes[key]).must_equal(string_value: value, data_type: 'String') - end - - it 'should keep existing attributes' do - key = 'foo' - value = 'bar' - metadata_attributes = { - 'existingKey' => { string_value: 'existingValue', data_type: 'String' } - } - OpenTelemetry::Instrumentation::AwsSdk::MessageAttributeSetter.set(metadata_attributes, key, value) - _(metadata_attributes[key]).must_equal(string_value: value, data_type: 'String') - _(metadata_attributes['existingKey']).must_equal(string_value: 'existingValue', data_type: 'String') - end - - it 'should not add if there are 10 or more existing attributes' do - metadata_attributes = { - 'existingKey0' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey1' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey2' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey3' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey4' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey5' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey6' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey7' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey8' => { string_value: 'existingValue', data_type: 'String' }, - 'existingKey9' => { string_value: 'existingValue', data_type: 'String' } - } - OpenTelemetry::Instrumentation::AwsSdk::MessageAttributeSetter.set(metadata_attributes, 'new10', 'value') - _(metadata_attributes.keys).must_equal(%w[existingKey0 existingKey1 existingKey2 existingKey3 existingKey4 existingKey5 existingKey6 existingKey7 existingKey8 existingKey9]) - end - - describe 'MessageAttributeGetter' do - let(:getter) { OpenTelemetry::Instrumentation::AwsSdk::MessageAttributeGetter } - let(:carrier) do - { - 'traceparent' => { data_type: 'String', string_value: 'tp' }, - 'tracestate' => { data_type: 'String', string_value: 'ts' }, - 'x-source-id' => { data_type: 'String', string_value: '123' } - } - end - - it 'reads key from carrier' do - _(getter.get(carrier, 'traceparent')).must_equal('tp') - _(getter.get(carrier, 'x-source-id')).must_equal('123') - end - - it 'returns nil for non-existant key' do - _(getter.get(carrier, 'not-here')).must_be_nil - end - end - end end diff --git a/instrumentation/aws_sdk/test/opentelemetry/message_attributes_test.rb b/instrumentation/aws_sdk/test/opentelemetry/message_attributes_test.rb new file mode 100644 index 000000000..1d3486399 --- /dev/null +++ b/instrumentation/aws_sdk/test/opentelemetry/message_attributes_test.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'test_helper' + +describe OpenTelemetry::Instrumentation::AwsSdk do + let(:instrumentation) { OpenTelemetry::Instrumentation::AwsSdk } + + describe 'MessageAttributeSetter' do + it 'set when hash length is lower than 10' do + key = 'foo' + value = 'bar' + metadata_attributes = {} + instrumentation::MessageAttributeSetter.set(metadata_attributes, key, value) + _(metadata_attributes[key]).must_equal(string_value: value, data_type: 'String') + end + + it 'should keep existing attributes' do + key = 'foo' + value = 'bar' + metadata_attributes = { + 'existingKey' => { string_value: 'existingValue', data_type: 'String' } + } + instrumentation::MessageAttributeSetter.set(metadata_attributes, key, value) + _(metadata_attributes[key]).must_equal(string_value: value, data_type: 'String') + _(metadata_attributes['existingKey']) + .must_equal(string_value: 'existingValue', data_type: 'String') + end + + it 'should not add if there are 10 or more existing attributes' do + metadata_attributes = { + 'existingKey0' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey1' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey2' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey3' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey4' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey5' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey6' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey7' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey8' => { string_value: 'existingValue', data_type: 'String' }, + 'existingKey9' => { string_value: 'existingValue', data_type: 'String' } + } + instrumentation::MessageAttributeSetter.set(metadata_attributes, 'new10', 'value') + _(metadata_attributes.keys) + .must_equal( + %w[ + existingKey0 + existingKey1 + existingKey2 + existingKey3 + existingKey4 + existingKey5 + existingKey6 + existingKey7 + existingKey8 + existingKey9 + ] + ) + end + end + + describe 'MessageAttributeGetter' do + let(:getter) { instrumentation::MessageAttributeGetter } + let(:carrier) do + { + 'traceparent' => { data_type: 'String', string_value: 'tp' }, + 'tracestate' => { data_type: 'String', string_value: 'ts' }, + 'x-source-id' => { data_type: 'String', string_value: '123' } + } + end + + it 'reads key from carrier' do + _(getter.get(carrier, 'traceparent')).must_equal('tp') + _(getter.get(carrier, 'x-source-id')).must_equal('123') + end + + it 'returns nil for non-existant key' do + _(getter.get(carrier, 'not-here')).must_be_nil + end + end +end diff --git a/instrumentation/aws_sdk/test/opentelemetry/patches/telemetry_test.rb b/instrumentation/aws_sdk/test/opentelemetry/patches/telemetry_test.rb new file mode 100644 index 000000000..55fd83886 --- /dev/null +++ b/instrumentation/aws_sdk/test/opentelemetry/patches/telemetry_test.rb @@ -0,0 +1,297 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../../test_helper' + +describe OpenTelemetry::Instrumentation::AwsSdk do + describe 'Telemetry plugin' do + let(:instrumentation_gem_version) do + OpenTelemetry::Instrumentation::AwsSdk::Instrumentation.instance.gem_version + end + let(:otel_semantic) { OpenTelemetry::SemanticConventions::Trace } + let(:exporter) { EXPORTER } + let(:spans) { exporter.finished_spans } + let(:otel_provider) { Aws::Telemetry::OTelProvider.new } + let(:stub_span) { spans.find { |s| s.name == 'Handler.StubResponses' } } + let(:client_attrs) do + { + 'aws.region' => 'us-stubbed-1', + otel_semantic::CODE_NAMESPACE => 'Aws::Plugins::Telemetry', + otel_semantic::RPC_SYSTEM => 'aws-api' + } + end + + let(:stub_attrs) do + { + 'http.status_code' => '200', + 'net.protocol.name' => 'http', + 'net.protocol.version' => '1.1' + } + end + + before do + exporter.reset + end + + describe 'Lambda' do + let(:service_name) { 'Lambda' } + let(:service_uri) do + 'https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/' + end + let(:client) do + Aws::Lambda::Client.new( + telemetry_provider: otel_provider, + stub_responses: true + ) + end + let(:client_span) { spans.find { |s| s.name == 'Lambda.ListFunctions' } } + let(:internal_span) { spans.find { |s| s.name == 'Handler.NetHttp' } } + + let(:expected_client_attrs) do + client_attrs.tap do |attrs| + attrs[otel_semantic::CODE_FUNCTION] = 'list_functions' + attrs[otel_semantic::RPC_METHOD] = 'ListFunctions' + attrs[otel_semantic::RPC_SERVICE] = service_name + end + end + + let(:expected_stub_attrs) { stub_attrs.tap { |a| a['http.method'] = 'GET' } } + + let(:expected_internal_attrs) do + stub_attrs.tap do |attrs| + attrs['net.peer.name'] = 'lambda.us-east-1.amazonaws.com' + attrs['net.peer.port'] = '443' + end + end + + it 'creates spans with all the supplied parameters' do + skip unless TestHelper.telemetry_plugin?(service_name) + client.list_functions + + _(client_span.name).must_equal('Lambda.ListFunctions') + _(stub_span.name).must_equal('Handler.StubResponses') + _(client_span.kind).must_equal(:client) + _(stub_span.kind).must_equal(:internal) + TestHelper.match_span_attrs(expected_client_attrs, client_span, self) + TestHelper.match_span_attrs(expected_stub_attrs, stub_span, self) + _(stub_span.parent_span_id).must_equal(client_span.span_id) + end + + it 'creates spans with all the non-stubbed parameters' do + skip unless TestHelper.telemetry_plugin?(service_name) + stub_request(:get, 'https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/') + + client = Aws::Lambda::Client.new( + telemetry_provider: otel_provider, + credentials: Aws::Credentials.new('akid', 'secret'), + region: 'us-east-1' + ) + client.list_functions + + _(client_span.name).must_equal('Lambda.ListFunctions') + _(internal_span.name).must_equal('Handler.NetHttp') + _(client_span.kind).must_equal(:client) + _(internal_span.kind).must_equal(:internal) + _(client_span.attributes['aws.region']).must_equal('us-east-1') + TestHelper.match_span_attrs(expected_internal_attrs, internal_span, self) + end + + it 'should have correct span attributes when error' do + skip unless TestHelper.telemetry_plugin?(service_name) + stub_request(:get, 'foo').to_return(status: 400) + + begin + client.list_functions + rescue Aws::Lambda::Errors::BadRequest + _(client_span.status.code).must_equal(2) + _(client_span.events[0].name).must_equal('exception') + _(internal_span.attributes['http.status_code']).must_equal('400') + end + end + end + + describe 'SNS' do + let(:service_name) { 'SNS' } + let(:client) do + Aws::SNS::Client.new( + telemetry_provider: otel_provider, + stub_responses: true + ) + end + let(:client_span) { spans.find { |s| s.name.include?('SNS.Publish') } } + + let(:expected_client_attrs) do + client_attrs.tap do |attrs| + attrs[otel_semantic::CODE_FUNCTION] = 'publish' + attrs[otel_semantic::RPC_METHOD] = 'Publish' + attrs[otel_semantic::RPC_SERVICE] = service_name + attrs[otel_semantic::MESSAGING_DESTINATION_KIND] = 'topic' + attrs[otel_semantic::MESSAGING_DESTINATION] = 'TopicName' + attrs[otel_semantic::MESSAGING_SYSTEM] = 'aws.sns' + end + end + + let(:expected_stub_attrs) { stub_attrs.tap { |a| a['http.method'] = 'POST' } } + + it 'creates spans with appropriate messaging attributes' do + skip unless TestHelper.telemetry_plugin?(service_name) + + client.publish( + message: 'msg', + topic_arn: 'arn:aws:sns:fake:123:TopicName' + ) + + _(client_span.name).must_equal('SNS.Publish.TopicName.Publish') + _(client_span.kind).must_equal(:producer) + _(stub_span.name).must_equal('Handler.StubResponses') + _(stub_span.kind).must_equal(:internal) + TestHelper.match_span_attrs(expected_client_attrs, client_span, self) + TestHelper.match_span_attrs(expected_stub_attrs, stub_span, self) + _(stub_span.parent_span_id).must_equal(client_span.span_id) + end + + it 'creates a span that includes a phone number' do + # skip if using aws-sdk version before phone_number supported (v2.3.18) + skip if Gem::Version.new('2.3.18') > instrumentation_gem_version + skip unless TestHelper.telemetry_plugin?(service_name) + + client.publish(message: 'msg', phone_number: '123456') + + _(client_span.name).must_equal('SNS.Publish.phone_number.Publish') + _(client_span.attributes[otel_semantic::MESSAGING_DESTINATION]) + .must_equal('phone_number') + end + end + + describe 'SQS' do + let(:service_name) { 'SQS' } + let(:client) do + Aws::SQS::Client.new( + telemetry_provider: otel_provider, + stub_responses: true + ) + end + let(:queue_url) { 'https://sqs.us-east-1.amazonaws.com/1/QueueName' } + let(:expected_client_base_attrs) do + client_attrs.tap do |attrs| + attrs[otel_semantic::RPC_SERVICE] = service_name + attrs[otel_semantic::MESSAGING_DESTINATION_KIND] = 'queue' + attrs[otel_semantic::MESSAGING_DESTINATION] = 'QueueName' + attrs[otel_semantic::MESSAGING_SYSTEM] = 'aws.sqs' + attrs[otel_semantic::MESSAGING_URL] = queue_url + end + end + + let(:expected_stub_attrs) { stub_attrs.tap { |a| a['http.method'] = 'POST' } } + + describe '#SendMessage' do + let(:client_span) { spans.find { |s| s.name.include?('SQS.SendMessage') } } + let(:expected_client_attrs) do + expected_client_base_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'SendMessage' + end + end + + it 'creates spans with appropriate messaging attributes' do + skip unless TestHelper.telemetry_plugin?(service_name) + + client.send_message(message_body: 'msg', queue_url: queue_url) + + _(client_span.name).must_equal('SQS.SendMessage.QueueName.Publish') + _(client_span.kind).must_equal(:producer) + _(stub_span.name).must_equal('Handler.StubResponses') + _(stub_span.kind).must_equal(:internal) + TestHelper.match_span_attrs(expected_client_attrs, client_span, self) + TestHelper.match_span_attrs(expected_stub_attrs, stub_span, self) + _(stub_span.parent_span_id).must_equal(client_span.span_id) + end + end + + describe '#SendMessageBatch' do + let(:client_span) { spans.find { |s| s.name.include?('SQS.SendMessageBatch') } } + let(:expected_client_attrs) do + expected_client_base_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'SendMessageBatch' + end + end + + it 'creates spans with appropriate messaging attributes' do + skip unless TestHelper.telemetry_plugin?(service_name) + + client.send_message_batch( + queue_url: queue_url, + entries: [{ id: 'Message1', message_body: 'Body1' }] + ) + + _(client_span.name).must_equal('SQS.SendMessageBatch.QueueName.Publish') + _(client_span.kind).must_equal(:producer) + _(stub_span.name).must_equal('Handler.StubResponses') + _(stub_span.kind).must_equal(:internal) + TestHelper.match_span_attrs(expected_client_attrs, client_span, self) + TestHelper.match_span_attrs(expected_stub_attrs, stub_span, self) + _(stub_span.parent_span_id).must_equal(client_span.span_id) + end + end + + describe '#ReceiveMessage' do + let(:client_span) { spans.find { |s| s.name.include?('SQS.ReceiveMessage') } } + let(:expected_client_attrs) do + expected_client_base_attrs.tap do |attrs| + attrs[otel_semantic::RPC_METHOD] = 'ReceiveMessage' + attrs[otel_semantic::MESSAGING_OPERATION] = 'receive' + end + end + + it 'creates spans with appropriate messaging attributes' do + skip unless TestHelper.telemetry_plugin?(service_name) + + client.receive_message(queue_url: queue_url) + + _(client_span.name).must_equal('SQS.ReceiveMessage.QueueName.Receive') + _(client_span.kind).must_equal(:consumer) + _(stub_span.name).must_equal('Handler.StubResponses') + _(stub_span.kind).must_equal(:internal) + TestHelper.match_span_attrs(expected_client_attrs, client_span, self) + TestHelper.match_span_attrs(expected_stub_attrs, stub_span, self) + _(stub_span.parent_span_id).must_equal(client_span.span_id) + end + end + + describe '#GetQueueUrl' do + let(:client_span) { spans.find { |s| s.name.include?('SQS.GetQueueUrl') } } + + it 'creates a span with appropriate messaging attributes' do + skip unless TestHelper.telemetry_plugin?(service_name) + + client.get_queue_url(queue_name: 'queue-name') + + _(client_span.attributes[otel_semantic::MESSAGING_DESTINATION]).must_equal('unknown') + _(client_span.attributes).wont_include(otel_semantic::MESSAGING_URL) + end + end + end + + describe 'DynamoDB' do + let(:client) do + Aws::DynamoDB::Client.new( + telemetry_provider: otel_provider, + stub_responses: true + ) + end + let(:client_span) { TestHelper.find_span(spans, 'DynamoDB.ListTables') } + let(:client_span) { spans.find { |s| s.name == 'DynamoDB.ListTables' } } + + it 'creates a span with dynamodb-specific attribute' do + skip unless TestHelper.telemetry_plugin?('DynamoDB') + + client.list_tables + + _(client_span.attributes[otel_semantic::DB_SYSTEM]) + .must_equal('dynamodb') + end + end + end +end diff --git a/instrumentation/aws_sdk/test/test_helper.rb b/instrumentation/aws_sdk/test/test_helper.rb index 7153e99b2..b588f8c75 100644 --- a/instrumentation/aws_sdk/test/test_helper.rb +++ b/instrumentation/aws_sdk/test/test_helper.rb @@ -10,6 +10,7 @@ require 'opentelemetry-instrumentation-aws_sdk' require 'minitest/autorun' +require 'webmock/minitest' require 'rspec/mocks/minitest_integration' # global opentelemetry-sdk setup: @@ -22,3 +23,19 @@ c.use 'OpenTelemetry::Instrumentation::AwsSdk' c.add_span_processor span_processor end + +class TestHelper + class << self + def telemetry_plugin?(service) + m = ::Aws.const_get(service).const_get(:Client) + Aws.const_defined?('Plugins::Telemetry') && + m.plugins.include?(Aws::Plugins::Telemetry) + end + + def match_span_attrs(expected_attrs, span, expect) + expected_attrs.each do |key, value| + expect._(span.attributes[key]).must_equal(value) + end + end + end +end diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index 97da5f64f..4933ab7c4 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index 9f94081f0..6fe7ea968 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index 539887b96..c7c3cfd75 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index 08405e804..6ac5395a2 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index 8007aec82..7a2f90cdd 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -35,10 +35,10 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index b5b90f5d4..2a4aa2ab1 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 18c3f82ba..bf532e5d2 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -34,9 +34,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index f08ff6576..3bcbe0b08 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -34,9 +34,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 86306cddb..992bd08a7 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -39,9 +39,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 36aec82c3..661ab2810 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index bff04dd3e..24fe7727e 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers' spec.add_development_dependency 'rake', '~> 12.3.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index 54069ff29..b157b2827 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index 98a0a1170..30cd1c4c5 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec index b2f48305a..54e8139e2 100644 --- a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec +++ b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index 75d1d574e..90275d7d5 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 7a59efcaa..a800b74ea 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index f981355e7..c9710a4ea 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 8a3124f0f..992404fa0 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index c0d4f4857..78cc638fc 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0.1' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index 29feea416..9a75c42f4 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/que/CHANGELOG.md b/instrumentation/que/CHANGELOG.md index d77e66d0f..e9cff0dfd 100644 --- a/instrumentation/que/CHANGELOG.md +++ b/instrumentation/que/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-que +### v0.8.4 / 2024-10-08 + +* FIXED: Fix bulk_enqueue when enqueuing more than 5 jobs + ### v0.8.3 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb b/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb index eaa4552b6..964554f5d 100644 --- a/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb +++ b/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Que - VERSION = '0.8.3' + VERSION = '0.8.4' end end end diff --git a/instrumentation/que/opentelemetry-instrumentation-que.gemspec b/instrumentation/que/opentelemetry-instrumentation-que.gemspec index 5fa8dfcfb..f12f24eb5 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index ce4aceae2..ec6ff7596 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 7ecebeb6b..e1feadb7d 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index e8db79ecf..3cd4e629d 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -42,9 +42,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rack-test', '~> 2.1.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rails' if spec.respond_to?(:metadata) diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index f6f8b709b..a473dfde1 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -34,9 +34,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index e7b14e48a..c5d085f92 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index 183a9d8e0..0c139fcf9 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index 1c6e8e5ab..ba40ebc8d 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 2b4823aac..ab0e98a7b 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -34,9 +34,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 6c4760d0c..6c6ba2a5d 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -35,9 +35,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec index a6572baa6..50d7e8988 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index dc1939455..604599935 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index 4a1543785..b727abf57 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -36,9 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rack-test', '~> 2.1' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.19' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index 788ab8469..417a61af7 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -42,7 +42,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/processor/baggage/opentelemetry-processor-baggage.gemspec b/processor/baggage/opentelemetry-processor-baggage.gemspec index 18ef334bb..d8d6f4978 100644 --- a/processor/baggage/opentelemetry-processor-baggage.gemspec +++ b/processor/baggage/opentelemetry-processor-baggage.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index d00f57231..3282ee4d3 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/vitess/opentelemetry-propagator-vitess.gemspec b/propagator/vitess/opentelemetry-propagator-vitess.gemspec index 74d87c68f..2d3295eee 100644 --- a/propagator/vitess/opentelemetry-propagator-vitess.gemspec +++ b/propagator/vitess/opentelemetry-propagator-vitess.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index c4c056fc8..51803b368 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec index 8c92fea3c..45362a4ea 100644 --- a/resources/azure/opentelemetry-resource-detector-azure.gemspec +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -31,9 +31,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17' - spec.add_development_dependency 'webmock', '~> 3.23.0' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index caf0fc56c..a98a0fb7e 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec index 1603b54fe..ff176fa07 100644 --- a/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec +++ b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec @@ -32,9 +32,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.66.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.20' + spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' spec.add_development_dependency 'simplecov', '~> 0.17' - spec.add_development_dependency 'webmock', '~> 3.23.0' + spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata)