diff --git a/.github/actions/test_gem/action.yml b/.github/actions/test_gem/action.yml index 07e934fb26..a2d7221817 100644 --- a/.github/actions/test_gem/action.yml +++ b/.github/actions/test_gem/action.yml @@ -66,18 +66,18 @@ runs: # ...but not for appraisals, sadly. - name: Install Ruby ${{ inputs.ruby }} with dependencies if: "${{ steps.setup.outputs.appraisals == 'false' }}" - uses: ruby/setup-ruby@v1.144.1 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: "${{ inputs.ruby }}" working-directory: "${{ steps.setup.outputs.gem_dir }}" bundler: "latest" bundler-cache: true - cache-version: "v1-${{ steps.setup.outputs.cache_key }}" + cache-version: "${{ inputs.ruby }}-${{ steps.setup.outputs.cache_key }}" # 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.144.1 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: "${{ inputs.ruby }}" bundler: "latest" diff --git a/.github/workflows/ci-contrib-canary.yml b/.github/workflows/ci-contrib-canary.yml index a29e4cd2bf..68dc07d1ac 100644 --- a/.github/workflows/ci-contrib-canary.yml +++ b/.github/workflows/ci-contrib-canary.yml @@ -68,6 +68,12 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-propagator-${{ matrix.gem }}" + ruby: "3.3" + latest: "true" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -121,6 +127,12 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-${{ matrix.gem }}" + ruby: "3.3" + latest: "true" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index 69eae406ed..943a8a8548 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -62,6 +62,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-propagator-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -102,6 +107,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-canary.yml b/.github/workflows/ci-instrumentation-canary.yml index ae32dd9bba..a731bffd26 100644 --- a/.github/workflows/ci-instrumentation-canary.yml +++ b/.github/workflows/ci-instrumentation-canary.yml @@ -59,6 +59,14 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + # BLOCKED BY: https://github.com/bigcommerce/gruf/pull/197 + if: "${{ matrix.gem != 'gruf' }}" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" + latest: "true" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-with-services-canary.yml b/.github/workflows/ci-instrumentation-with-services-canary.yml index b375afb7cc..63d2d087c5 100644 --- a/.github/workflows/ci-instrumentation-with-services-canary.yml +++ b/.github/workflows/ci-instrumentation-with-services-canary.yml @@ -29,6 +29,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" + latest: "true" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 3b1f9a3422..259d97127e 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -23,6 +23,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -69,6 +74,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -106,6 +116,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -159,6 +174,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -203,6 +223,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -244,6 +269,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index d06fe5d5b7..ebfefb3096 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -50,6 +50,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: "Test Ruby 3.3" + # BLOCKED BY: https://github.com/bigcommerce/gruf/pull/197 + if: "${{ matrix.gem != 'gruf' }}" + uses: ./.github/actions/test_gem + with: + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" + ruby: "3.3" - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index c5f792896f..0640afd08e 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -15,6 +15,7 @@ jobs: fail-fast: false matrix: ruby-version: + - 3.3 - 3.2 - 3.1 - 3.0 @@ -22,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 + - uses: ruby/setup-ruby@v1.165.1 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 6a80f4146b..a5c252b602 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 + uses: ruby/setup-ruby@v1.165.1 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 d3a85043de..9376de3364 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 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index 60ebeaee57..f38f7efb91 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 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000000..ad9b765c95 --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,63 @@ +--- +name: Release Please + +on: + workflow_dispatch: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release: + name: Process Release + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e + id: release + + outputs: + paths_released: ${{ steps.release.outputs.paths_released }} + + publish: + needs: release + name: Publish Gems + runs-on: ubuntu-latest + if: ${{ needs.release.outputs.paths_released != '[]'}} + + strategy: + fail-fast: false + max-parallel: 1 + matrix: + path: ${{ fromJson(needs.release.outputs.paths_released) }} + + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + + - name: Setup Ruby + uses: ruby/setup-ruby@360dc864d5da99d54fcb8e9148c14a84b90d3e88 + with: + ruby-version: 3.0.0 + bundler: latest + bundler-cache: false + + - name: Configure RubyGems + env: + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" + + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + + - name: Release Gem + working-directory: ${{ matrix.path }} + run: | + bundle install + bundle exec rake --trace build + bundle exec rake --trace release:rubygem_push diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index 00997a9ba2..ec07aefb93 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 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index 381987aec7..793354b360 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 + uses: ruby/setup-ruby@v1.165.1 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000000..7adc63ff67 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,49 @@ +{ + "instrumentation/gruf": "0.1.1", + "instrumentation/grape": "0.1.6", + "instrumentation/racecar": "0.3.0", + "instrumentation/rake": "0.2.1", + "instrumentation/rdkafka": "0.4.2", + "instrumentation/trilogy": "0.57.0", + "instrumentation/active_support": "0.5.1", + "instrumentation/action_view": "0.7.0", + "instrumentation/action_pack": "0.8.0", + "instrumentation/active_job": "0.7.1", + "instrumentation/resque": "0.5.0", + "instrumentation/bunny": "0.21.1", + "instrumentation/base": "0.22.3", + "instrumentation/active_record": "0.7.0", + "instrumentation/aws_sdk": "0.5.0", + "instrumentation/lmdb": "0.22.1", + "instrumentation/http": "0.23.2", + "instrumentation/graphql": "0.27.0", + "instrumentation/http_client": "0.22.3", + "instrumentation/httpx": "0.1.1", + "instrumentation/koala": "0.20.2", + "instrumentation/active_model_serializers": "0.20.1", + "instrumentation/concurrent_ruby": "0.21.2", + "instrumentation/dalli": "0.25.0", + "instrumentation/delayed_job": "0.22.1", + "instrumentation/ethon": "0.21.3", + "instrumentation/excon": "0.22.0", + "instrumentation/faraday": "0.23.4", + "instrumentation/mongo": "0.22.2", + "instrumentation/mysql2": "0.25.0", + "instrumentation/net_http": "0.22.4", + "instrumentation/pg": "0.26.1", + "instrumentation/que": "0.7.1", + "instrumentation/rack": "0.23.5", + "instrumentation/rails": "0.29.1", + "instrumentation/redis": "0.25.3", + "instrumentation/restclient": "0.22.3", + "instrumentation/rspec": "0.3.2", + "instrumentation/ruby_kafka": "0.21.0", + "instrumentation/sidekiq": "0.25.0", + "instrumentation/sinatra": "0.23.2", + "instrumentation/all": "0.54.0", + "propagator/ottrace": "0.21.2", + "propagator/xray": "0.22.1", + "resources/azure": "0.1.0", + "resources/container": "0.1.1", + "resources/google_cloud_platform": "0.1.0" +} diff --git a/.toys/.data/releases.yml b/.toys/.data/releases.yml index 2951f1536e..fcbdabbb08 100644 --- a/.toys/.data/releases.yml +++ b/.toys/.data/releases.yml @@ -6,10 +6,10 @@ repo: open-telemetry/opentelemetry-ruby-contrib main_branch: main # Time in seconds for release scripts to wait for CI to complete. required_checks_timeout: 1200 -required_jobs: "^(ci|CI).*" +required_checks: "^(ci|CI).*" # Git user attached to commits for release pull requests. -git_user_name: Ariel Valentin -git_user_email: ariel@arielvalentin.com +git_user_name: OpenTelemetry Bot +git_user_email: 107717825+opentelemetrybot@users.noreply.github.com # Control the conventional commit linter. commit_lint: diff --git a/CODEOWNERS b/CODEOWNERS index 8c2435bb42..0276cc2eaf 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -12,22 +12,22 @@ # https://help.github.com/en/articles/about-code-owners # -* @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle @open-telemetry/ruby-contrib-approvers +* @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -resources/container/ @scbjans @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +resources/container/ @scbjans @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/aws_sdk/ @NathanielRN @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +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 -instrumentation/grape/ @muripic @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/grape/ @muripic @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/graphql/ @swalkinshaw @rmosolgo @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/graphql/ @swalkinshaw @rmoslogo @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/httpx/ @HoneyryderChuck @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/httpx/ @HoneyryderChuck @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/mongo/ @johnnyshields @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/mongo/ @johnnyshields @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/racecar/ @chrisholmes @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/racecar/ @chrisholmes @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/rspec/ @chrisholmes @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/rspec/ @chrisholmes @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle -instrumentation/que/ @indrekj @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd +instrumentation/que/ @indrekj @open-telemetry/ruby-contrib-maintainers @open-telemetry/ruby-contrib-approvers @fbogsany @mwear @robertlaurin @dazuma @ericmustin @arielvalentin @ahayworth @plantfansam @robbkidd @simi @kaylareopelle diff --git a/Gemfile b/Gemfile index 593f654cdc..bc32156cce 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,5 @@ source 'https://rubygems.org' gem 'rake', '~> 13.0' -gem 'rubocop', '~> 1.58.0' +gem 'rubocop', '~> 1.59.0' gem 'rubocop-performance', '~> 1.19.1' diff --git a/instrumentation/action_pack/CHANGELOG.md b/instrumentation/action_pack/CHANGELOG.md index ce51354e59..015a170fd5 100644 --- a/instrumentation/action_pack/CHANGELOG.md +++ b/instrumentation/action_pack/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-action_pack +### v0.9.0 / 2024-01-09 + +* BREAKING CHANGE: Use ActiveSupport instead of patches #703 + ### v0.8.0 / 2023-11-22 * BREAKING CHANGE: Drop Rails 6.0 EOL diff --git a/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/version.rb b/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/version.rb index ac520594ef..b746ac4144 100644 --- a/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/version.rb +++ b/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActionPack - VERSION = '0.8.0' + VERSION = '0.9.0' end end end diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index eccdf81a61..ed58c921d6 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -36,8 +36,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/action_pack/test/test_helpers/app_config.rb b/instrumentation/action_pack/test/test_helpers/app_config.rb index 8874d61e25..f00733ad44 100644 --- a/instrumentation/action_pack/test/test_helpers/app_config.rb +++ b/instrumentation/action_pack/test/test_helpers/app_config.rb @@ -48,9 +48,7 @@ def initialize_app(use_exceptions_app: false, remove_rack_tracer_middleware: fal private def remove_rack_middleware(application) - application.middleware.delete( - OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware - ) + application.middleware.delete(Rack::Events) end def add_exceptions_app(application) diff --git a/instrumentation/action_pack/test/test_helpers/middlewares/redirect_middleware.rb b/instrumentation/action_pack/test/test_helpers/middlewares/redirect_middleware.rb index c531fe3dda..da843c704e 100644 --- a/instrumentation/action_pack/test/test_helpers/middlewares/redirect_middleware.rb +++ b/instrumentation/action_pack/test/test_helpers/middlewares/redirect_middleware.rb @@ -10,7 +10,7 @@ def initialize(app, _options = {}) end def call(env) - return [307, {}, 'Temporary Redirect'] if should_redirect?(env) + return [307, { 'Location' => '/ok', 'Content-Type' => 'text/plain' }, ['Temporary Redirect']] if should_redirect?(env) @app.call(env) end diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index ae3b8d2097..af56e9964e 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -36,8 +36,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/handlers/default.rb b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/handlers/default.rb index 3c6b6aa7d0..9a5db43b59 100644 --- a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/handlers/default.rb +++ b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/handlers/default.rb @@ -80,7 +80,7 @@ def finish_span(span, tokens) end # pops the context stack - tokens&.reverse&.each do |token| + tokens&.reverse_each do |token| OpenTelemetry::Context.detach(token) rescue StandardError => e OpenTelemetry.handle_error(exception: e) diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 2039a15767..7b8502fe79 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -35,8 +35,8 @@ 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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' 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 f27de220ca..0341fa8426 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -35,8 +35,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index 001334973c..59b7688e20 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -36,8 +36,8 @@ 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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index 0725d2221d..5fd7f082af 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -38,8 +38,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 887e719128..1ce96900c3 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History: opentelemetry-instrumentation-all +### v0.56.0 / 2024-01-09 + +* BREAKING CHANGE: Use ActiveSupport instead of patches #703 + +### v0.55.0 / 2024-01-06 + +* CHANGED: Upgrade Trilogy and Rack [#796](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/796) + ### v0.54.0 / 2023-11-28 * ADDED: Updated excon to include connect spans diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 00e9084e3f..b7827cad9d 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.54.0' + VERSION = '0.56.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index e544a750b3..79e1946978 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -48,8 +48,8 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-pg', '~> 0.26.0' spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0' - spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.23.1' - spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.29.0' + spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.24.0' + spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.30.0' spec.add_dependency 'opentelemetry-instrumentation-rake', '~> 0.2.1' spec.add_dependency 'opentelemetry-instrumentation-rdkafka', '~> 0.4.0' spec.add_dependency 'opentelemetry-instrumentation-redis', '~> 0.25.1' @@ -58,15 +58,15 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-sidekiq', '~> 0.25.0' spec.add_dependency 'opentelemetry-instrumentation-sinatra', '~> 0.23.1' - spec.add_dependency 'opentelemetry-instrumentation-trilogy', '~> 0.57.0' + spec.add_dependency 'opentelemetry-instrumentation-trilogy', '~> 0.58.0' spec.add_development_dependency 'active_model_serializers' spec.add_development_dependency 'activesupport' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index bd1ce75a15..bc0247fb97 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -37,8 +37,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index ba6ff4563e..d74b1f0bae 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.gemspec @@ -32,8 +32,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 c502ce30b2..df174b3230 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -34,8 +34,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 c5831665d1..03fd88188c 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -34,8 +34,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 1ee0aeec8e..c0feca6a5a 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -35,8 +35,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 d92561f641..671de83a69 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -35,8 +35,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' spec.add_development_dependency 'webmock', '~> 3.19' diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index 7feb678d6b..fbfb958c36 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -35,8 +35,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/excon/Appraisals b/instrumentation/excon/Appraisals index f84de92ff7..4538446e41 100644 --- a/instrumentation/excon/Appraisals +++ b/instrumentation/excon/Appraisals @@ -2,6 +2,12 @@ # add more tests for excon -appraise 'excon-0.71' do - gem 'excon', '~> 0.71.0' +%w[0.71 0.109].each do |version| + appraise "excon-#{version}" do + gem 'excon', "~> #{version}.0" + end +end + +appraise 'excon-latest' do + gem 'excon' end diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 79534f7d44..1a1dca474f 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -31,12 +31,12 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' - spec.add_development_dependency 'excon', '~> 0.71.0' + spec.add_development_dependency 'excon' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/excon/test/opentelemetry/instrumentation/excon/instrumentation_test.rb b/instrumentation/excon/test/opentelemetry/instrumentation/excon/instrumentation_test.rb index fa166e1e69..94f354c09a 100644 --- a/instrumentation/excon/test/opentelemetry/instrumentation/excon/instrumentation_test.rb +++ b/instrumentation/excon/test/opentelemetry/instrumentation/excon/instrumentation_test.rb @@ -244,9 +244,9 @@ _(span.attributes['net.peer.port']).must_equal(99_999) span_event = span.events.first - _(span_event.name).must_equal 'exception' - _(span_event.attributes['exception.type']).must_equal(SocketError.name) + # Depending on the Ruby and Excon Version this will be a SocketError, Socket::ResolutionError or Resolv::ResolvError + _(span_event.attributes['exception.type']).must_match(/(Socket|Resolv)/) assert_http_spans(host: 'invalid.com', target: '/example') end diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index 9744b96769..1029cc7016 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -35,8 +35,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 08162fda13..dcd86a7dd3 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -39,8 +39,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rack-test' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/grape/test/opentelemetry/instrumentation/grape_test.rb b/instrumentation/grape/test/opentelemetry/instrumentation/grape_test.rb index 0e7ab4850b..f9d6744cd6 100644 --- a/instrumentation/grape/test/opentelemetry/instrumentation/grape_test.rb +++ b/instrumentation/grape/test/opentelemetry/instrumentation/grape_test.rb @@ -272,7 +272,7 @@ class RaisedErrorAPI < Grape::API it 'sets span status to error' do _(span.name).must_equal expected_span_name _(span.status.code).must_equal OpenTelemetry::Trace::Status::ERROR - _(span.status.description).must_equal "Unhandled exception of type: #{expected_error_type}" + _(span.status.description).must_equal expected_error_type end it 'records the exception event' do @@ -316,7 +316,7 @@ class ErrorInFilterAPI < Grape::API it 'sets span status to error' do _(span.name).must_equal expected_span_name _(span.status.code).must_equal OpenTelemetry::Trace::Status::ERROR - _(span.status.description).must_equal "Unhandled exception of type: #{expected_error_type}" + _(span.status.description).must_equal expected_error_type end it 'records the exception event' do diff --git a/instrumentation/graphql/Appraisals b/instrumentation/graphql/Appraisals index d478f591ba..05298c160c 100644 --- a/instrumentation/graphql/Appraisals +++ b/instrumentation/graphql/Appraisals @@ -4,18 +4,39 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'graphql-1.13' do +# Max compatible version of 1.x +appraise 'graphql-1.x' do gem 'graphql', '~> 1.13' end -appraise 'graphql-2.0.17' do - gem 'graphql', '2.0.17' -end - +# A bug was introduced in 2.0.18 that was fixed in 2.0.19 appraise 'graphql-2.0.18' do gem 'graphql', '2.0.18' end -appraise 'graphql-2.x' do - gem 'graphql', '>= 2.0.18', '< 3.0.0' +# Max compatible version of 2.0.x +appraise 'graphql-2.0' do + gem 'graphql', '~> 2.0.27' +end + +# Max compatible version of 2.1.x +appraise 'graphql-2.1' do + gem 'graphql', '~> 2.1.8' +end + +appraise 'graphql-c_parser-2.2.x' do + gem 'graphql', '~> 2.2.1' + gem 'graphql-c_parser', '~> 1.0.7' +end + +appraise 'graphql-2.2.x' do + gem 'graphql', '~> 2.2.1', '< 3.0.0' +end + +appraise 'graphql-c_parser-latest' do + gem 'graphql-c_parser' +end + +appraise 'graphql-latest' do + gem 'graphql' end diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index b3f06ed7b8..1804bb0de7 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -35,8 +35,8 @@ 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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/graphql/test/instrumentation/graphql/instrumentation_test.rb b/instrumentation/graphql/test/instrumentation/graphql/instrumentation_test.rb index 916beaca51..580918fb8d 100644 --- a/instrumentation/graphql/test/instrumentation/graphql/instrumentation_test.rb +++ b/instrumentation/graphql/test/instrumentation/graphql/instrumentation_test.rb @@ -54,7 +54,7 @@ OpenTelemetry::TestHelpers.with_test_logger do |log| instrumentation.install(config) _(log.string).must_match( - / Unable to patch schema Old::Truck: undefined method `trace_with' for Old::Truck:Class/ + /undefined method `trace_with'.*Old::Truck/ ) end end @@ -90,7 +90,7 @@ instrumentation.install(config) _(log.string).must_match( - /Unable to patch schema Old::Truck: undefined method `use' for Old::Truck:Class/ + /undefined method `use'.*Old::Truck/ ) end end diff --git a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb index 59de004736..4ae7fb15e1 100644 --- a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb +++ b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_trace_test.rb @@ -54,6 +54,8 @@ 'graphql.execute_multiplex' ] + expected_spans.delete('graphql.lex') unless trace_lex_supported? + expected_result = { 'simpleField' => 'Hello.', 'resolvedField' => { 'originalValue' => 'testing=1', 'uppercasedValue' => 'TESTING=1' } @@ -103,7 +105,7 @@ it 'traces the provided schemas' do SomeOtherGraphQLAppSchema.execute('query SimpleQuery{ __typename }') - _(spans.size).must_equal(8) + _(spans.select { |s| s.name.start_with?('graphql.') }).wont_be(:empty?) end it 'does not trace all schemas' do diff --git a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb index 35e5e4b0d6..0813c22c07 100644 --- a/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb +++ b/instrumentation/graphql/test/instrumentation/graphql/tracers/graphql_tracer_test.rb @@ -53,6 +53,7 @@ 'graphql.execute_query_lazy', 'graphql.execute_multiplex' ] + expected_spans.delete('graphql.lex') unless trace_lex_supported? expected_result = { 'simpleField' => 'Hello.', @@ -102,7 +103,7 @@ it 'traces the provided schemas' do SomeOtherGraphQLAppSchema.execute('query SimpleQuery{ __typename }') - _(spans.size).must_equal(8) + _(spans.select { |s| s.name.start_with?('graphql.') }).wont_be(:empty?) end it 'does not trace all schemas' do diff --git a/instrumentation/graphql/test/test_helper.rb b/instrumentation/graphql/test/test_helper.rb index 75f349b28b..4fae892ce1 100644 --- a/instrumentation/graphql/test/test_helper.rb +++ b/instrumentation/graphql/test/test_helper.rb @@ -25,8 +25,9 @@ module SchemaTestPatches # Reseting @graphql_definition is needed for tests running against version `1.9.x` # Other variables are used by ~> 2.0.19 def _reset_tracer_for_testing - %w[own_tracers trace_modes trace_class tracers graphql_definition own_trace_modes].each do |ivar| - remove_instance_variable("@#{ivar}") if instance_variable_defined?("@#{ivar}") + %w[own_tracers trace_modes trace_class tracers graphql_definition own_trace_modes].each do |name| + ivar_name = "@#{name}" + remove_instance_variable(ivar_name) if instance_variable_defined?(ivar_name) end end end @@ -125,3 +126,12 @@ def uses_platform_interfaces? def gem_version Gem::Version.new(GraphQL::VERSION) end + +# When tracing, is the parser expected to call `lex` before `parse` +def trace_lex_supported? + return @trace_lex_supported if defined?(@trace_lex_supported) + + # In GraphQL 2.2, the default parser was changed such that `lex` is no longer called + @trace_lex_supported = Gem::Requirement.new('< 2.2').satisfied_by?(Gem::Version.new(GraphQL::VERSION)) \ + || (defined?(GraphQL::CParser) == 'constant') +end diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 70b299c9f5..dfa4879cd1 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -36,8 +36,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers' spec.add_development_dependency 'rake', '~> 12.3.3' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index 68442db16a..bf7b0c853d 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -36,8 +36,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index 9beb7fbb97..f67ec42468 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -36,8 +36,8 @@ 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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec index 296177a315..2cc31b766b 100644 --- a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec +++ b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec @@ -36,8 +36,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index a3b5ae2617..d368dfa418 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -37,8 +37,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index fbc70cbbe9..fbe1729afc 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -35,8 +35,8 @@ 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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index 60ebed8cbd..964bebb072 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -37,8 +37,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index c8c87c71b4..21e64c5464 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -38,8 +38,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 3f8c366e2d..1b6afcaae3 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -35,8 +35,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0.1' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index 983f689951..67091a0388 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -38,8 +38,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pg', '>= 1.1.0' spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/que/opentelemetry-instrumentation-que.gemspec b/instrumentation/que/opentelemetry-instrumentation-que.gemspec index 1ce51a70a6..f1c86780ba 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -38,8 +38,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pg', '~> 1.1' spec.add_development_dependency 'que' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 142715ecda..2d5f60a57c 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -37,8 +37,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'racecar', '~> 2.7' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rack/CHANGELOG.md b/instrumentation/rack/CHANGELOG.md index 3df214395a..56fabc6614 100644 --- a/instrumentation/rack/CHANGELOG.md +++ b/instrumentation/rack/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History: opentelemetry-instrumentation-rack +### v0.24.0 / 2024-01-06 + +* BREAKING CHANGE: Use Rack Events By Default + +* ADDED: Use Rack Events By Default +* FIXED: Backport Rack proxy event to middleware + ### v0.23.5 / 2023-11-23 * CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727) diff --git a/instrumentation/rack/README.md b/instrumentation/rack/README.md index f154e504fc..1c66728299 100644 --- a/instrumentation/rack/README.md +++ b/instrumentation/rack/README.md @@ -42,6 +42,23 @@ OpenTelemetry::SDK.configure do |c| c.use_all end ``` + +## Rack Middleware vs Rack Events + +Since `v0.24.0`, this instrumentation uses `Rake::Events` as opposed to `Middleware` to support Requests that use Buffered Response Bodies. + +If your application does not support `Rack::Events`, you may disable it by setting `use_rack_events: false`, e.g. + +```ruby +OpenTelemetry::SDK.configure do |c| + c.use 'OpenTelemetry::Instrumentation::Rack', use_rack_events: false +end +``` + +This will switch to using `Rack::Middleware` by default in dependent instrumentations. + +See [#342](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/342) for more details. + ## Controlling span name cardinality By default we will set the rack span name to match the format "HTTP #{method}" (ie. HTTP GET). There are different ways to control span names with this instrumentation. diff --git a/instrumentation/rack/example/trace_demonstration.rb b/instrumentation/rack/example/trace_demonstration.rb index e6253f57cf..02fc8a7128 100644 --- a/instrumentation/rack/example/trace_demonstration.rb +++ b/instrumentation/rack/example/trace_demonstration.rb @@ -18,7 +18,7 @@ builder = Rack::Builder.app do # integration should be automatic in web frameworks (like rails), # but for a plain Rack application, enable it in your config.ru, e.g., - use OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware + use ::Rack::Events, [OpenTelemetry::Instrumentation::Rack::Middlewares::EventHandler.new] app = ->(_env) { [200, { 'Content-Type' => 'text/plain' }, ['All responses are OK']] } run app diff --git a/instrumentation/rack/example/trace_demonstration2.rb b/instrumentation/rack/example/trace_demonstration2.rb index c6ac649e9e..66941cfb07 100644 --- a/instrumentation/rack/example/trace_demonstration2.rb +++ b/instrumentation/rack/example/trace_demonstration2.rb @@ -24,7 +24,7 @@ end # integrate instrumentation explicitly: -builder.use OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware +builder.use ::Rack::Events, [OpenTelemetry::Instrumentation::Rack::Middlewares::EventHandler.new] # demonstrate tracing (span output to console): puts Rack::MockRequest.new(builder).get('/') diff --git a/instrumentation/rack/example/trace_demonstration3.rb b/instrumentation/rack/example/trace_demonstration3.rb index a444ecfebe..38226a72a1 100644 --- a/instrumentation/rack/example/trace_demonstration3.rb +++ b/instrumentation/rack/example/trace_demonstration3.rb @@ -19,7 +19,7 @@ builder = Rack::Builder.app do # integration should be automatic in web frameworks (like rails), # but for a plain Rack application, enable it in your config.ru, e.g., - use OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware + use ::Rack::Events, [OpenTelemetry::Instrumentation::Rack::Middlewares::EventHandler.new] app = ->(_env) { [200, { 'Content-Type' => 'text/plain' }, ['All responses are OK']] } run app diff --git a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/instrumentation.rb b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/instrumentation.rb index 35be3a5199..91e1f9f330 100644 --- a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/instrumentation.rb +++ b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/instrumentation.rb @@ -28,8 +28,8 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base option :url_quantization, default: nil, validate: :callable option :untraced_requests, default: nil, validate: :callable option :response_propagators, default: [], validate: :array - # This option is only valid for applicaitons using Rack 2.0 or greater - option :use_rack_events, default: false, validate: :boolean + # This option is only valid for applications using Rack 2.0 or greater + option :use_rack_events, default: true, validate: :boolean # Temporary Helper for Sinatra and ActionPack middleware to use during installation # diff --git a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb index 80096c77f1..338bd95dd1 100644 --- a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb +++ b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb @@ -90,7 +90,7 @@ def on_error(request, _, error) return unless span.recording? span.record_exception(error) - span.status = OpenTelemetry::Trace::Status.error + span.status = OpenTelemetry::Trace::Status.error(error.class.name) rescue StandardError => e OpenTelemetry.handle_error(exception: e) end @@ -192,7 +192,7 @@ def request_span_attributes(env) end def detach_contexts(request) - request.env[TOKENS_KEY]&.reverse&.each do |token| + request.env[TOKENS_KEY]&.reverse_each do |token| OpenTelemetry::Context.detach(token) OpenTelemetry::Trace.current_span.finish end diff --git a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb index 353d5192f7..608728ac6c 100644 --- a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb +++ b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/middlewares/tracer_middleware.rb @@ -77,6 +77,8 @@ def call(env) tracer.in_span(request_span_name, attributes: request_span_attributes(env: env), kind: request_span_kind) do |request_span| + request_start_time = OpenTelemetry::Instrumentation::Rack::Util::QueueTime.get_request_start(env) + request_span.add_event('http.proxy.request.started', timestamp: request_start_time) unless request_start_time.nil? OpenTelemetry::Instrumentation::Rack.with_span(request_span) do @app.call(env).tap do |status, headers, response| set_attributes_after_request(request_span, status, headers, response) diff --git a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/version.rb b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/version.rb index 07c864bd7a..0c1c489ccd 100644 --- a/instrumentation/rack/lib/opentelemetry/instrumentation/rack/version.rb +++ b/instrumentation/rack/lib/opentelemetry/instrumentation/rack/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Rack - VERSION = '0.23.5' + VERSION = '0.24.0' end end end diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 36fca16bb2..4df693784b 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -39,8 +39,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rack-test' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rack/test/opentelemetry/instrumentation/rack/instrumentation_test.rb b/instrumentation/rack/test/opentelemetry/instrumentation/rack/instrumentation_test.rb index 3e95292451..2a0cf5d6dd 100644 --- a/instrumentation/rack/test/opentelemetry/instrumentation/rack/instrumentation_test.rb +++ b/instrumentation/rack/test/opentelemetry/instrumentation/rack/instrumentation_test.rb @@ -32,7 +32,7 @@ _(instrumentation.config[:url_quantization]).must_be_nil _(instrumentation.config[:untraced_requests]).must_be_nil _(instrumentation.config[:response_propagators]).must_be_empty - _(instrumentation.config[:use_rack_events]).must_equal false + _(instrumentation.config[:use_rack_events]).must_equal true end end diff --git a/instrumentation/rack/test/opentelemetry/instrumentation/rack/middlewares/tracer_middleware_test.rb b/instrumentation/rack/test/opentelemetry/instrumentation/rack/middlewares/tracer_middleware_test.rb index 9deb47183b..89c68c328b 100644 --- a/instrumentation/rack/test/opentelemetry/instrumentation/rack/middlewares/tracer_middleware_test.rb +++ b/instrumentation/rack/test/opentelemetry/instrumentation/rack/middlewares/tracer_middleware_test.rb @@ -25,6 +25,7 @@ let(:exporter) { EXPORTER } let(:finished_spans) { exporter.finished_spans } let(:first_span) { exporter.finished_spans.first } + let(:proxy_event) { first_span.events&.first } let(:default_config) { {} } let(:config) { default_config } @@ -84,6 +85,15 @@ end end + describe 'given request proxy headers' do + let(:env) { Hash('HTTP_X_REQUEST_START' => '1677723466') } + + it 'records an event' do + _(proxy_event.name).must_equal 'http.proxy.request.started' + _(proxy_event.timestamp).must_equal 1_677_723_466_000_000_000 + end + end + describe 'config[:untraced_endpoints]' do describe 'when an array is passed in' do let(:config) { { untraced_endpoints: ['/ping'] } } diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index e727af268b..7ac7b5e63c 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.30.0 / 2024-01-09 + +* BREAKING CHANGE: Use ActiveSupport instead of patches #703 + ### v0.29.1 / 2023-11-23 * CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727) diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index 77fad14591..915937bd61 100644 --- a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb +++ b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Rails - VERSION = '0.29.1' + VERSION = '0.30.0' end end end diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 4ceaf44cd5..dd5ecf0f05 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0' spec.add_dependency 'opentelemetry-api', '~> 1.0' - spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.8.0' + spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.9.0' spec.add_dependency 'opentelemetry-instrumentation-action_view', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-active_job', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-active_record', '~> 0.7.0' @@ -41,8 +41,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rack-test', '~> 2.1.0' spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/instrumentation_test.rb b/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/instrumentation_test.rb deleted file mode 100644 index bae64a5b66..0000000000 --- a/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/instrumentation_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -# Copyright The OpenTelemetry Authors -# -# SPDX-License-Identifier: Apache-2.0 - -require 'test_helper' - -describe OpenTelemetry::Instrumentation::Rails::Instrumentation do - it 'adds the rack tracing middleware' do - _(DEFAULT_RAILS_APP.config.middleware).must_include OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware - end -end diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 3cf76962e7..3acfea121f 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -34,8 +34,8 @@ 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 'rake', '>= 0.9.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index fbafb7a96e..5b95ef1eb1 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -37,8 +37,8 @@ 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 'rdkafka', '>= 0.12' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index 491456f174..9702fb53f8 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -36,8 +36,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'redis', '~> 4.1' spec.add_development_dependency 'redis-client', '~> 0.7' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 61172db991..7bd7ab90fe 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -35,8 +35,8 @@ 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 'resque' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 7d392fadfa..32ffc816b0 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -35,8 +35,8 @@ 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 'rest-client', '~> 2.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 4e3089ec96..9c2200607c 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -35,8 +35,8 @@ 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 'rspec', '~> 3.10.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec index 884799779c..8ff72e8243 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -34,8 +34,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'ruby-kafka' 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 0aabd6b60e..877b155349 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -36,8 +36,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'sidekiq' 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 e5f71d8d5c..088afdd08d 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -36,8 +36,8 @@ 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 'rack-test', '~> 1.1.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sinatra' spec.add_development_dependency 'webmock', '~> 3.19' diff --git a/instrumentation/trilogy/CHANGELOG.md b/instrumentation/trilogy/CHANGELOG.md index 1cd9e405d7..dc8d352314 100644 --- a/instrumentation/trilogy/CHANGELOG.md +++ b/instrumentation/trilogy/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History: opentelemetry-instrumentation-trilogy +### v0.58.0 / 2024-01-06 + +* BREAKING CHANGE: Change db.mysql.instance.address to db.instance.id + +* ADDED: Change db.mysql.instance.address to db.instance.id +* FIXED: Trilogy only set db.instance.id attribute if there is a value + ### v0.57.0 / 2023-10-27 * ADDED: Instrument connect and ping diff --git a/instrumentation/trilogy/README.md b/instrumentation/trilogy/README.md index 10259f6281..4bbd0be7ac 100644 --- a/instrumentation/trilogy/README.md +++ b/instrumentation/trilogy/README.md @@ -51,6 +51,19 @@ OpenTelemetry::Instrumentation::Trilogy.with_attributes('pizzatoppings' => 'mush end ``` +## Semantic Conventions + +This instrumentation generally uses [Database semantic conventions](https://opentelemetry.io/docs/specs/semconv/database/database-spans/). + +| Attribute Name | Type | Notes | +| - | - | - | +| `db.instance.id` | String | The name of the DB host executing the query e.g. `SELECT @@hostname` | +| `db.name` | String | The name of the database from connection_options | +| `db.statement` | String | SQL statement being executed | +| `db.user` | String | The username from connection_options | +| `db.system` | String | `mysql` | +| `net.peer.name` | String | The name of the remote host from connection_options | + ## How can I get involved? The `opentelemetry-instrumentation-trilogy` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`. diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb index 79743b910d..30d7cd98b4 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/patches/client.rb @@ -62,7 +62,7 @@ def client_attributes(sql = nil) attributes[::OpenTelemetry::SemanticConventions::Trace::DB_NAME] = database_name if database_name attributes[::OpenTelemetry::SemanticConventions::Trace::DB_USER] = database_user if database_user attributes[::OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] unless config[:peer_service].nil? - attributes['db.instance.id'] = @connected_host if defined?(@connected_host) + attributes['db.instance.id'] = @connected_host unless @connected_host.nil? if sql case config[:db_statement] diff --git a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb index a88022366b..98cb68e0db 100644 --- a/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb +++ b/instrumentation/trilogy/lib/opentelemetry/instrumentation/trilogy/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Trilogy - VERSION = '0.57.0' + VERSION = '0.58.0' end end end diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index ed0b63439f..90ce438568 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -40,8 +40,8 @@ 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 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'trilogy', '>= 2.0', '< 3.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 14cdee8983..4c44d26e0d 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -28,8 +28,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 daddd3e79d..642c355db2 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -31,8 +31,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000000..022572d773 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,204 @@ +{ + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "draft": true, + "include-component-in-tag": true, + "include-v-in-tag": true, + "prerelease": true, + "release-type": "ruby", + "separate-pull-requests": false, + "sequential-calls": true, + "signoff": "OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com>", + "skip-github-release": false, + "tag-separator": " ", + "packages": { + "instrumentation/gruf": { + "package-name": "opentelemetry-instrumentation-gruf", + "version-file": "lib/opentelemetry/instrumentation/gruf/version.rb" + }, + "instrumentation/grape": { + "package-name": "opentelemetry-instrumentation-grape", + "version-file": "lib/opentelemetry/instrumentation/grape/version.rb" + }, + "instrumentation/racecar": { + "package-name": "opentelemetry-instrumentation-racecar", + "version-file": "lib/opentelemetry/instrumentation/racecar/version.rb" + }, + "instrumentation/rake": { + "package-name": "opentelemetry-instrumentation-rake", + "version-file": "lib/opentelemetry/instrumentation/rake/version.rb" + }, + "instrumentation/rdkafka": { + "package-name": "opentelemetry-instrumentation-rdkafka", + "version-file": "lib/opentelemetry/instrumentation/rdkafka/version.rb" + }, + "instrumentation/trilogy": { + "package-name": "opentelemetry-instrumentation-trilogy", + "version-file": "lib/opentelemetry/instrumentation/trilogy/version.rb" + }, + "instrumentation/active_support": { + "package-name": "opentelemetry-instrumentation-active_support", + "version-file": "lib/opentelemetry/instrumentation/active_support/version.rb" + }, + "instrumentation/action_view": { + "package-name": "opentelemetry-instrumentation-action_view", + "version-file": "lib/opentelemetry/instrumentation/action_view/version.rb" + }, + "instrumentation/action_pack": { + "package-name": "opentelemetry-instrumentation-action_pack", + "version-file": "lib/opentelemetry/instrumentation/action_pack/version.rb" + }, + "instrumentation/active_job": { + "package-name": "opentelemetry-instrumentation-active_job", + "version-file": "lib/opentelemetry/instrumentation/active_job/version.rb" + }, + "instrumentation/resque": { + "package-name": "opentelemetry-instrumentation-resque", + "version-file": "lib/opentelemetry/instrumentation/resque/version.rb" + }, + "instrumentation/bunny": { + "package-name": "opentelemetry-instrumentation-bunny", + "version-file": "lib/opentelemetry/instrumentation/bunny/version.rb" + }, + "instrumentation/base": { + "package-name": "opentelemetry-instrumentation-base", + "version-file": "lib/opentelemetry/instrumentation/version.rb" + }, + "instrumentation/active_record": { + "package-name": "opentelemetry-instrumentation-active_record", + "version-file": "lib/opentelemetry/instrumentation/active_record/version.rb" + }, + "instrumentation/aws_sdk": { + "package-name": "opentelemetry-instrumentation-aws_sdk", + "version-file": "lib/opentelemetry/instrumentation/aws_sdk/version.rb" + }, + "instrumentation/lmdb": { + "package-name": "opentelemetry-instrumentation-lmdb", + "version-file": "lib/opentelemetry/instrumentation/lmdb/version.rb" + }, + "instrumentation/http": { + "package-name": "opentelemetry-instrumentation-http", + "version-file": "lib/opentelemetry/instrumentation/http/version.rb" + }, + "instrumentation/graphql": { + "package-name": "opentelemetry-instrumentation-graphql", + "version-file": "lib/opentelemetry/instrumentation/graphql/version.rb" + }, + "instrumentation/http_client": { + "package-name": "opentelemetry-instrumentation-http_client", + "version-file": "lib/opentelemetry/instrumentation/http_client/version.rb" + }, + "instrumentation/httpx": { + "package-name": "opentelemetry-instrumentation-httpx", + "version-file": "lib/opentelemetry/instrumentation/httpx/version.rb" + }, + "instrumentation/koala": { + "package-name": "opentelemetry-instrumentation-koala", + "version-file": "lib/opentelemetry/instrumentation/koala/version.rb" + }, + "instrumentation/active_model_serializers": { + "package-name": "opentelemetry-instrumentation-active_model_serializers", + "version-file": "lib/opentelemetry/instrumentation/active_model_serializers/version.rb" + }, + "instrumentation/concurrent_ruby": { + "package-name": "opentelemetry-instrumentation-concurrent_ruby", + "version-file": "lib/opentelemetry/instrumentation/concurrent_ruby/version.rb" + }, + "instrumentation/dalli": { + "package-name": "opentelemetry-instrumentation-dalli", + "version-file": "lib/opentelemetry/instrumentation/dalli/version.rb" + }, + "instrumentation/delayed_job": { + "package-name": "opentelemetry-instrumentation-delayed_job", + "version-file": "lib/opentelemetry/instrumentation/delayed_job/version.rb" + }, + "instrumentation/ethon": { + "package-name": "opentelemetry-instrumentation-ethon", + "version-file": "lib/opentelemetry/instrumentation/ethon/version.rb" + }, + "instrumentation/excon": { + "package-name": "opentelemetry-instrumentation-excon", + "version-file": "lib/opentelemetry/instrumentation/excon/version.rb" + }, + "instrumentation/faraday": { + "package-name": "opentelemetry-instrumentation-faraday", + "version-file": "lib/opentelemetry/instrumentation/faraday/version.rb" + }, + "instrumentation/mongo": { + "package-name": "opentelemetry-instrumentation-mongo", + "version-file": "lib/opentelemetry/instrumentation/mongo/version.rb" + }, + "instrumentation/mysql2": { + "package-name": "opentelemetry-instrumentation-mysql2", + "version-file": "lib/opentelemetry/instrumentation/mysql2/version.rb" + }, + "instrumentation/net_http": { + "package-name": "opentelemetry-instrumentation-net_http", + "version-file": "lib/opentelemetry/instrumentation/net/http/version.rb" + }, + "instrumentation/pg": { + "package-name": "opentelemetry-instrumentation-pg", + "version-file": "lib/opentelemetry/instrumentation/pg/version.rb" + }, + "instrumentation/que": { + "package-name": "opentelemetry-instrumentation-que", + "version-file": "lib/opentelemetry/instrumentation/que/version.rb" + }, + "instrumentation/rack": { + "package-name": "opentelemetry-instrumentation-rack", + "version-file": "lib/opentelemetry/instrumentation/rack/version.rb" + }, + "instrumentation/rails": { + "package-name": "opentelemetry-instrumentation-rails", + "version-file": "lib/opentelemetry/instrumentation/rails/version.rb" + }, + "instrumentation/redis": { + "package-name": "opentelemetry-instrumentation-redis", + "version-file": "lib/opentelemetry/instrumentation/redis/version.rb" + }, + "instrumentation/restclient": { + "package-name": "opentelemetry-instrumentation-restclient", + "version-file": "lib/opentelemetry/instrumentation/restclient/version.rb" + }, + "instrumentation/rspec": { + "package-name": "opentelemetry-instrumentation-rspec", + "version-file": "lib/opentelemetry/instrumentation/rspec/version.rb" + }, + "instrumentation/ruby_kafka": { + "package-name": "opentelemetry-instrumentation-ruby_kafka", + "version-file": "lib/opentelemetry/instrumentation/ruby_kafka/version.rb" + }, + "instrumentation/sidekiq": { + "package-name": "opentelemetry-instrumentation-sidekiq", + "version-file": "lib/opentelemetry/instrumentation/sidekiq/version.rb" + }, + "instrumentation/sinatra": { + "package-name": "opentelemetry-instrumentation-sinatra", + "version-file": "lib/opentelemetry/instrumentation/sinatra/version.rb" + }, + "instrumentation/all": { + "package-name": "opentelemetry-instrumentation-all", + "version-file": "lib/opentelemetry/instrumentation/all/version.rb" + }, + "propagator/ottrace": { + "package-name": "opentelemetry-propagator-ottrace", + "version-file": "lib/opentelemetry/propagator/ottrace/version.rb" + }, + "propagator/xray": { + "package-name": "opentelemetry-propagator-xray", + "version-file": "lib/opentelemetry/propagator/xray/version.rb" + }, + "resources/azure": { + "package-name": "opentelemetry-resource-detector-azure", + "version-file": "lib/opentelemetry/resource/detector/azure/version.rb" + }, + "resources/container": { + "package-name": "opentelemetry-resource-detector-container", + "version-file": "lib/opentelemetry/resource/detector/container/version.rb" + }, + "resources/google_cloud_platform": { + "package-name": "opentelemetry-resource-detector-google_cloud_platform", + "version-file": "lib/opentelemetry/resource/detector/google_cloud_platform/version.rb" + } + } +} diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec index 002cdfde11..09f7344d52 100644 --- a/resources/azure/opentelemetry-resource-detector-azure.gemspec +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -30,8 +30,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.19.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index 5137d2600e..f18f7929c4 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -30,8 +30,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' 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 0fa9f9dd00..61dd91da4f 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 @@ -31,8 +31,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.58.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' + spec.add_development_dependency 'rubocop', '~> 1.59.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.19.1' spec.add_development_dependency 'yard', '~> 0.9'