From c28588eab848237e415901a72be84d61e6acdcda Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 19 Nov 2024 10:37:50 -0600 Subject: [PATCH 01/32] test: Fix Sinatra Tests (#1253) * test: Fix Sinatra Tests Sinatra 4.1 now includes a stricter host authorization check by default, which caused our tests to fail. The host authorization is not enforced in development and test mode so this PR sets the Sinatra environment to run in `test` mode. See: https://github.com/sinatra/sinatra/pull/2053 fixes https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/1252 * squash: update appraisals --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- instrumentation/sinatra/Appraisals | 14 ++++---------- .../opentelemetry/instrumentation/sinatra_test.rb | 5 ++++- instrumentation/sinatra/test/test_helper.rb | 1 + 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/instrumentation/sinatra/Appraisals b/instrumentation/sinatra/Appraisals index f04c6775b..73cb3a9d4 100644 --- a/instrumentation/sinatra/Appraisals +++ b/instrumentation/sinatra/Appraisals @@ -4,16 +4,10 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'sinatra-4.x' do - gem 'sinatra', '~> 4.0' -end - -appraise 'sinatra-3.x' do - gem 'sinatra', '~> 3.0' -end - -appraise 'sinatra-2.x' do - gem 'sinatra', '~> 2.1' +%w[4.1 3.0 2.1].each do |version| + appraise "sinatra-#{version}" do + gem 'sinatra', "~> #{version}" + end end appraise 'sinatra-latest' do diff --git a/instrumentation/sinatra/test/opentelemetry/instrumentation/sinatra_test.rb b/instrumentation/sinatra/test/opentelemetry/instrumentation/sinatra_test.rb index 0425595b8..4c9d5814a 100644 --- a/instrumentation/sinatra/test/opentelemetry/instrumentation/sinatra_test.rb +++ b/instrumentation/sinatra/test/opentelemetry/instrumentation/sinatra_test.rb @@ -17,6 +17,7 @@ class CustomError < StandardError; end let(:app_one) do Class.new(Sinatra::Application) do + set :raise_errors, false get '/endpoint' do '1' end @@ -41,6 +42,7 @@ class CustomError < StandardError; end let(:app_two) do Class.new(Sinatra::Application) do + set :raise_errors, false get '/endpoint' do '2' end @@ -165,7 +167,8 @@ class CustomError < StandardError; end 'http.method' => 'GET', 'http.route' => '/error', 'http.scheme' => 'http', - 'http.target' => '/error' + 'http.target' => '/error', + 'http.status_code' => 500 ) _(exporter.finished_spans.flat_map(&:events).map(&:name)).must_equal(['exception']) end diff --git a/instrumentation/sinatra/test/test_helper.rb b/instrumentation/sinatra/test/test_helper.rb index 6caf4af52..48ae2a681 100644 --- a/instrumentation/sinatra/test/test_helper.rb +++ b/instrumentation/sinatra/test/test_helper.rb @@ -3,6 +3,7 @@ # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 +ENV['APP_ENV'] = 'test' require 'bundler/setup' Bundler.require(:default, :development, :test) From 37584d018df41addb259cbe9ec58002769039ef9 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 19 Nov 2024 10:53:35 -0600 Subject: [PATCH 02/32] test: Add Rails 7.2 to Appraisals (#1242) * test: Add Rails 7.2 to Appraisals --- .github/actions/test_gem/action.yml | 1 + .gitignore | 2 ++ instrumentation/action_mailer/Appraisals | 24 ++++++++--------- instrumentation/action_pack/Appraisals | 24 ++++++++--------- .../handlers/action_controller_test.rb | 2 +- .../action_pack/test/test_helper.rb | 5 ---- .../test/test_helpers/app_config.rb | 4 +-- instrumentation/action_view/Appraisals | 24 ++++++++--------- instrumentation/active_job/Appraisals | 12 +++++++-- instrumentation/active_record/Appraisals | 27 ++++++++++--------- instrumentation/active_record/Gemfile | 1 - instrumentation/active_support/Appraisals | 24 ++++++++--------- instrumentation/delayed_job/Appraisals | 27 +++++++++++-------- instrumentation/delayed_job/Gemfile | 1 - instrumentation/rails/Appraisals | 24 ++++++++--------- .../patches/action_controller/metal_test.rb | 2 +- .../rails/test/instrumentation/test_helper.rb | 5 ---- .../test_helpers/app_config.rb | 9 +++---- .../controllers/example_controller.rb | 2 +- .../instrumentation/test_helpers/routes.rb | 2 +- .../rails/test/railtie/dummy/tmp/.gitkeep | 0 21 files changed, 114 insertions(+), 108 deletions(-) create mode 100644 instrumentation/rails/test/railtie/dummy/tmp/.gitkeep diff --git a/.github/actions/test_gem/action.yml b/.github/actions/test_gem/action.yml index 0d4feddb8..d68836326 100644 --- a/.github/actions/test_gem/action.yml +++ b/.github/actions/test_gem/action.yml @@ -95,6 +95,7 @@ runs: run: | # 💎 Install dependencies and generate appraisals 💎 bundle install --quiet --jobs=3 --retry=4 + bundle exec appraisal clean bundle exec appraisal generate working-directory: "${{ steps.setup.outputs.gem_dir }}" diff --git a/.gitignore b/.gitignore index a14376cfb..616fb0f93 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ # Appraisals instrumentation/**/gemfiles +instrumentation/**/tmp/**/* # Sqlite file for tests instrumentation/active_record/db @@ -26,3 +27,4 @@ instrumentation/active_record/db .ruby-version tags +!**/*/.gitkeep diff --git a/instrumentation/action_mailer/Appraisals b/instrumentation/action_mailer/Appraisals index e6c48d017..bd32cbe25 100644 --- a/instrumentation/action_mailer/Appraisals +++ b/instrumentation/action_mailer/Appraisals @@ -4,20 +4,20 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'rails-6.1' do - gem 'rails', '~> 6.1.0' -end - -appraise 'rails-7.0' do - gem 'rails', '~> 7.0.0' -end - -appraise 'rails-7.1' do - gem 'rails', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "action_mailer-#{version}" do + gem 'rails', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'rails-7.2' do - gem 'rails', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "action_mailer-#{version}" do + gem 'rails', "~> #{version}" + end + end + + appraise 'action_mailer-latest' do + gem 'rails' end end diff --git a/instrumentation/action_pack/Appraisals b/instrumentation/action_pack/Appraisals index e6c48d017..2f466100e 100644 --- a/instrumentation/action_pack/Appraisals +++ b/instrumentation/action_pack/Appraisals @@ -4,20 +4,20 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'rails-6.1' do - gem 'rails', '~> 6.1.0' -end - -appraise 'rails-7.0' do - gem 'rails', '~> 7.0.0' -end - -appraise 'rails-7.1' do - gem 'rails', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "rails-#{version}" do + gem 'rails', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'rails-7.2' do - gem 'rails', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "rails-#{version}" do + gem 'rails', "~> #{version}" + end + end + + appraise 'rails-latest' do + gem 'rails' end end diff --git a/instrumentation/action_pack/test/opentelemetry/instrumentation/action_pack/handlers/action_controller_test.rb b/instrumentation/action_pack/test/opentelemetry/instrumentation/action_pack/handlers/action_controller_test.rb index 00433df24..bec7648c5 100644 --- a/instrumentation/action_pack/test/opentelemetry/instrumentation/action_pack/handlers/action_controller_test.rb +++ b/instrumentation/action_pack/test/opentelemetry/instrumentation/action_pack/handlers/action_controller_test.rb @@ -16,7 +16,7 @@ let(:exporter) { EXPORTER } let(:spans) { exporter.finished_spans } let(:span) { exporter.finished_spans.last } - let(:rails_app) { DEFAULT_RAILS_APP } + let(:rails_app) { AppConfig.initialize_app } let(:config) { {} } # Clear captured spans diff --git a/instrumentation/action_pack/test/test_helper.rb b/instrumentation/action_pack/test/test_helper.rb index 4405450bc..c6ad0deee 100644 --- a/instrumentation/action_pack/test/test_helper.rb +++ b/instrumentation/action_pack/test/test_helper.rb @@ -22,8 +22,3 @@ c.use 'OpenTelemetry::Instrumentation::ActionPack' c.add_span_processor span_processor end - -# Create a globally available Rails app, this should be used in test unless -# specifically testing behaviour with different initialization configs. -DEFAULT_RAILS_APP = AppConfig.initialize_app -Rails.application = DEFAULT_RAILS_APP diff --git a/instrumentation/action_pack/test/test_helpers/app_config.rb b/instrumentation/action_pack/test/test_helpers/app_config.rb index f00733ad4..ce0f7ff6d 100644 --- a/instrumentation/action_pack/test/test_helpers/app_config.rb +++ b/instrumentation/action_pack/test/test_helpers/app_config.rb @@ -4,8 +4,8 @@ # # SPDX-License-Identifier: Apache-2.0 -class Application < Rails::Application; end require 'action_controller/railtie' +class Application < Rails::Application; end require_relative 'middlewares' require_relative 'controllers' require_relative 'routes' @@ -30,7 +30,7 @@ def initialize_app(use_exceptions_app: false, remove_rack_tracer_middleware: fal case Rails.version when /^6\.1/ apply_rails_6_1_configs(new_app) - when /^7\./ + when /^7|8\./ apply_rails_7_configs(new_app) end diff --git a/instrumentation/action_view/Appraisals b/instrumentation/action_view/Appraisals index e6c48d017..76b37a422 100644 --- a/instrumentation/action_view/Appraisals +++ b/instrumentation/action_view/Appraisals @@ -4,20 +4,20 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'rails-6.1' do - gem 'rails', '~> 6.1.0' -end - -appraise 'rails-7.0' do - gem 'rails', '~> 7.0.0' -end - -appraise 'rails-7.1' do - gem 'rails', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "action_view-#{version}" do + gem 'rails', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'rails-7.2' do - gem 'rails', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "rails-#{version}" do + gem 'rails', "~> #{version}" + end + end + + appraise 'rails-latest' do + gem 'rails' end end diff --git a/instrumentation/active_job/Appraisals b/instrumentation/active_job/Appraisals index a25edd334..6d4d4dc42 100644 --- a/instrumentation/active_job/Appraisals +++ b/instrumentation/active_job/Appraisals @@ -10,6 +10,14 @@ end end -appraise 'activejob-latest' do - gem 'activejob' +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') + %w[7.2.0].each do |version| + appraise "activejob-#{version}" do + gem 'activejob', "~> #{version}" + end + end + + appraise 'activejob-latest' do + gem 'activejob' + end end diff --git a/instrumentation/active_record/Appraisals b/instrumentation/active_record/Appraisals index 36f641b64..faa0add16 100644 --- a/instrumentation/active_record/Appraisals +++ b/instrumentation/active_record/Appraisals @@ -4,20 +4,23 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'activerecord-6.1' do - gem 'activerecord', '~> 6.1.0' -end - -appraise 'activerecord-7.0' do - gem 'activerecord', '~> 7.0.0' -end - -appraise 'activerecord-7.1' do - gem 'activerecord', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "activerecord-#{version}" do + gem 'sqlite3', '~> 1.4' + gem 'activerecord', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'activerecord-7.2' do - gem 'activerecord', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "activerecord-#{version}" do + gem 'sqlite3', '~> 1.4' + gem 'activerecord', "~> #{version}" + end + end + + appraise 'activerecord-latest' do + gem 'sqlite3', '>= 2.1' + gem 'activerecord' end end diff --git a/instrumentation/active_record/Gemfile b/instrumentation/active_record/Gemfile index 4475d27bf..02f64ca9a 100644 --- a/instrumentation/active_record/Gemfile +++ b/instrumentation/active_record/Gemfile @@ -12,5 +12,4 @@ group :test do gem 'byebug' gem 'opentelemetry-instrumentation-base', path: '../base' gem 'pry-byebug' - gem 'sqlite3', '~> 1.4' end diff --git a/instrumentation/active_support/Appraisals b/instrumentation/active_support/Appraisals index ef832823b..3a6dfc3fe 100644 --- a/instrumentation/active_support/Appraisals +++ b/instrumentation/active_support/Appraisals @@ -4,20 +4,20 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'activesupport-6.1' do - gem 'activesupport', '~> 6.1.0' -end - -appraise 'activesupport-7.0' do - gem 'activesupport', '~> 7.0.0' -end - -appraise 'activesupport-7.1' do - gem 'activesupport', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "activesupport-#{version}" do + gem 'activesupport', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'activesupport-7.2' do - gem 'activesupport', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "activesupport-#{version}" do + gem 'activesupport', "~> #{version}" + end + end + + appraise 'activesupport-latest' do + gem 'activesupport' end end diff --git a/instrumentation/delayed_job/Appraisals b/instrumentation/delayed_job/Appraisals index e4d86e84f..9099f1369 100644 --- a/instrumentation/delayed_job/Appraisals +++ b/instrumentation/delayed_job/Appraisals @@ -4,18 +4,23 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'delayed_job_4.1-rails-latest' do - gem 'activejob' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "delayed_job_4.1-activejob-#{version}" do + gem 'delayed_job', '~> 4.1' + gem 'activejob', "~> #{version}" + end end -appraise 'delayed_job_4.1-rails-7.1' do - gem 'activejob', '~> 7.1.0' -end - -appraise 'delayed_job_4.1-rails-7.0' do - gem 'activejob', '~> 7.0.0' -end +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') + %w[7.2.0].each do |version| + appraise "delayed_job-4.1-activejob-#{version}" do + gem 'delayed_job', '~> 4.1' + gem 'activejob', "~> #{version}" + end + end -appraise 'delayed_job-4.1-rails-6.1' do - gem 'activejob', '~> 6.1.0' + appraise 'delayed_job-latest' do + gem 'delayed_job' + gem 'activejob' + end end diff --git a/instrumentation/delayed_job/Gemfile b/instrumentation/delayed_job/Gemfile index 3c182227f..2baf57ac4 100644 --- a/instrumentation/delayed_job/Gemfile +++ b/instrumentation/delayed_job/Gemfile @@ -9,6 +9,5 @@ source 'https://rubygems.org' gemspec group :test do - gem 'delayed_job', '~> 4.1' gem 'opentelemetry-instrumentation-base', path: '../base' end diff --git a/instrumentation/rails/Appraisals b/instrumentation/rails/Appraisals index e6c48d017..2f466100e 100644 --- a/instrumentation/rails/Appraisals +++ b/instrumentation/rails/Appraisals @@ -4,20 +4,20 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'rails-6.1' do - gem 'rails', '~> 6.1.0' -end - -appraise 'rails-7.0' do - gem 'rails', '~> 7.0.0' -end - -appraise 'rails-7.1' do - gem 'rails', '~> 7.1.0' +%w[6.1.0 7.0.0 7.1.0].each do |version| + appraise "rails-#{version}" do + gem 'rails', "~> #{version}" + end end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0') - appraise 'rails-7.2' do - gem 'rails', '~> 7.2.0' + %w[7.2.0].each do |version| + appraise "rails-#{version}" do + gem 'rails', "~> #{version}" + end + end + + appraise 'rails-latest' do + gem 'rails' end end diff --git a/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/patches/action_controller/metal_test.rb b/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/patches/action_controller/metal_test.rb index 96fd40cb3..731d4fead 100644 --- a/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/patches/action_controller/metal_test.rb +++ b/instrumentation/rails/test/instrumentation/opentelemetry/instrumentation/rails/patches/action_controller/metal_test.rb @@ -12,7 +12,7 @@ let(:exporter) { EXPORTER } let(:spans) { exporter.finished_spans } let(:span) { exporter.finished_spans.last } - let(:rails_app) { DEFAULT_RAILS_APP } + let(:rails_app) { AppConfig.initialize_app } # Clear captured spans before { exporter.reset } diff --git a/instrumentation/rails/test/instrumentation/test_helper.rb b/instrumentation/rails/test/instrumentation/test_helper.rb index 2690c04d0..b95b64235 100644 --- a/instrumentation/rails/test/instrumentation/test_helper.rb +++ b/instrumentation/rails/test/instrumentation/test_helper.rb @@ -23,8 +23,3 @@ c.use_all c.add_span_processor span_processor end - -# Create a globally available Rails app, this should be used in test unless -# specifically testing behaviour with different initialization configs. -DEFAULT_RAILS_APP = AppConfig.initialize_app -Rails.application = DEFAULT_RAILS_APP diff --git a/instrumentation/rails/test/instrumentation/test_helpers/app_config.rb b/instrumentation/rails/test/instrumentation/test_helpers/app_config.rb index 3e8c23ee1..ad4898551 100644 --- a/instrumentation/rails/test/instrumentation/test_helpers/app_config.rb +++ b/instrumentation/rails/test/instrumentation/test_helpers/app_config.rb @@ -4,8 +4,9 @@ # # SPDX-License-Identifier: Apache-2.0 -class Application < Rails::Application; end require 'action_controller/railtie' +class Application < Rails::Application; end + require_relative 'middlewares' require_relative 'controllers' require_relative 'routes' @@ -28,7 +29,7 @@ def initialize_app(use_exceptions_app: false, remove_rack_tracer_middleware: fal case Rails.version when /^6\.1/ apply_rails_6_1_configs(new_app) - when /^7\./ + when /^7|8\./ apply_rails_7_configs(new_app) end @@ -46,9 +47,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/rails/test/instrumentation/test_helpers/controllers/example_controller.rb b/instrumentation/rails/test/instrumentation/test_helpers/controllers/example_controller.rb index 9bb554655..abe86b587 100644 --- a/instrumentation/rails/test/instrumentation/test_helpers/controllers/example_controller.rb +++ b/instrumentation/rails/test/instrumentation/test_helpers/controllers/example_controller.rb @@ -12,6 +12,6 @@ def ok end def internal_server_error - raise :internal_server_error + raise 'internal_server_error' end end diff --git a/instrumentation/rails/test/instrumentation/test_helpers/routes.rb b/instrumentation/rails/test/instrumentation/test_helpers/routes.rb index 88f0565f2..bef13feb6 100644 --- a/instrumentation/rails/test/instrumentation/test_helpers/routes.rb +++ b/instrumentation/rails/test/instrumentation/test_helpers/routes.rb @@ -6,7 +6,7 @@ def draw_routes(rails_app) rails_app.routes.draw do - get '/ok', to: 'example#ok' + get 'ok', to: 'example#ok' get '/internal_server_error', to: 'example#internal_server_error' end end diff --git a/instrumentation/rails/test/railtie/dummy/tmp/.gitkeep b/instrumentation/rails/test/railtie/dummy/tmp/.gitkeep new file mode 100644 index 000000000..e69de29bb From bf6394d2ef3918a1a67e03b773352598e40adcbc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:25:24 -0800 Subject: [PATCH 03/32] release: Release 3 gems (#1255) * release: Release 3 gems * opentelemetry-instrumentation-all 0.69.0 (was 0.68.0) * opentelemetry-instrumentation-action_pack 0.10.0 (was 0.9.0) * opentelemetry-instrumentation-rails 0.33.0 (was 0.32.0) * squash: Update instrumentation/all/CHANGELOG.md * squash: Update opentelemetry-instrumentation-rails.gemspec * squash: Update opentelemetry-instrumentation-all.gemspec --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/action_pack/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/action_pack/version.rb | 2 +- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- instrumentation/rails/CHANGELOG.md | 4 ++++ .../rails/lib/opentelemetry/instrumentation/rails/version.rb | 2 +- .../rails/opentelemetry-instrumentation-rails.gemspec | 2 +- 8 files changed, 17 insertions(+), 5 deletions(-) diff --git a/instrumentation/action_pack/CHANGELOG.md b/instrumentation/action_pack/CHANGELOG.md index 015a170fd..2532b7580 100644 --- a/instrumentation/action_pack/CHANGELOG.md +++ b/instrumentation/action_pack/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-action_pack +### v0.10.0 / 2024-11-19 + +* ADDED: Use Semconv Naming For ActionPack + ### v0.9.0 / 2024-01-09 * BREAKING CHANGE: Use ActiveSupport instead of patches #703 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 b746ac414..034f29d38 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.9.0' + VERSION = '0.10.0' end end end diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 8bc1cd95a..5fd7e693d 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.69.0 / 2024-11-19 + +* ADDED: Use Semconv Naming For ActionPack + ### v0.68.0 / 2024-10-23 * ADDED: Set span error only for 5xx response range diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index be8895ff5..4ea9fa7d5 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.68.0' + VERSION = '0.69.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index b9906921a..77e99ba93 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -50,7 +50,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.8.0' spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0' spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.25.0' - spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.32.0' + spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.33.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' diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index 2ff3b0533..bffd8095d 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.33.0 / 2024-11-19 + +* ADDED: Use Semconv Naming For ActionPack + ### v0.32.0 / 2024-10-22 * BREAKING CHANGE: Rename Active Record find_by_sql spans to query diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index f5ddd41cb..aa88ce3c9 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.32.0' + VERSION = '0.33.0' end end end diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 8182d9f69..c028fa093 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-action_mailer', '~> 0.2.0' - spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.9.0' + spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.10.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.8.0' From 16bef8547c533e8691ef446244ba6603650e4018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Peder=20Brandtz=C3=A6g?= Date: Thu, 21 Nov 2024 13:03:58 +0100 Subject: [PATCH 04/32] fix: pass block argument in ActiveRecord `find_by_sql` patch (#1259) --- .../active_record/patches/querying.rb | 4 +- .../active_record/patches/querying_test.rb | 79 +++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) diff --git a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/patches/querying.rb b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/patches/querying.rb index 094575ae4..0b9f37904 100644 --- a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/patches/querying.rb +++ b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/patches/querying.rb @@ -20,9 +20,9 @@ class << base module ClassMethods method_name = ::ActiveRecord.version >= Gem::Version.new('7.0.0') ? :_query_by_sql : :find_by_sql - define_method(method_name) do |*args, **kwargs| + define_method(method_name) do |*args, **kwargs, &block| tracer.in_span("#{self} query") do - super(*args, **kwargs) + super(*args, **kwargs, &block) end end diff --git a/instrumentation/active_record/test/instrumentation/active_record/patches/querying_test.rb b/instrumentation/active_record/test/instrumentation/active_record/patches/querying_test.rb index 879af50e6..5a398a3c2 100644 --- a/instrumentation/active_record/test/instrumentation/active_record/patches/querying_test.rb +++ b/instrumentation/active_record/test/instrumentation/active_record/patches/querying_test.rb @@ -14,6 +14,11 @@ let(:spans) { exporter.finished_spans } before { exporter.reset } + after do + ActiveRecord::Base.subclasses.each do |model| + model.connection.truncate(model.table_name) + end + end describe 'query' do it 'traces' do @@ -28,5 +33,79 @@ _(user_find_spans.length).must_equal(2) _(account_find_span).wont_be_nil end + + describe 'find_by_sql' do + it 'creates a span' do + Account.create! + + Account.find_by_sql('SELECT * FROM accounts') + + account_find_span = spans.find { |s| s.name == 'Account query' } + _(account_find_span).wont_be_nil + _(account_find_span.attributes).must_be_empty + end + + describe 'given a block' do + it 'creates a span' do + account = Account.create! + + record_ids = [] + + Account.find_by_sql('SELECT * FROM accounts') do |record| + record_ids << record.id + end + + account_find_span = spans.find { |s| s.name == 'Account query' } + _(account_find_span).wont_be_nil + _(account_find_span.attributes).must_be_empty + + _(record_ids).must_equal([account.id]) + end + end + end + + describe 'find_by' do + it 'creates a span' do + account = Account.create! + User.create!(account: account) + + Account.find_by(id: account.id) + + account_find_span = spans.find { |s| s.name == 'Account query' } + _(account_find_span).wont_be_nil + _(account_find_span.attributes).must_be_empty + end + end + + describe 'find' do + it 'creates a span' do + account = Account.create! + User.create!(account: account) + + Account.find(account.id) + + account_find_span = spans.find { |s| s.name == 'Account query' } + _(account_find_span).wont_be_nil + _(account_find_span.attributes).must_be_empty + end + + describe 'given a block' do + it 'creates a span' do + account = Account.create! + User.create!(account: account) + + record_ids = [] + + Account.find(account.id) do |record| + record_ids << record.id + end + + account_find_span = spans.find { |s| s.name == 'Account query' } + _(account_find_span).wont_be_nil + _(account_find_span.attributes).must_be_empty + _(record_ids).must_equal([account.id]) + end + end + end end end From 7ad08f9c80e18fd2ae9e5ff56ae23421c1b6aed9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 07:17:18 -0600 Subject: [PATCH 05/32] release: Release opentelemetry-instrumentation-active_record 0.8.1 (was 0.8.0) (#1262) * release: Release opentelemetry-instrumentation-active_record 0.8.1 (was 0.8.0) * squash: Update CHANGELOG.md --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/active_record/CHANGELOG.md | 4 ++++ .../opentelemetry/instrumentation/active_record/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/instrumentation/active_record/CHANGELOG.md b/instrumentation/active_record/CHANGELOG.md index 1d9746ce9..4f5f80d27 100644 --- a/instrumentation/active_record/CHANGELOG.md +++ b/instrumentation/active_record/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_record +### v0.8.1 / 2024-11-21 + +* FIXED: Pass block argument in ActiveRecord `find_by_sql` patch. + ### v0.8.0 / 2024-10-22 * BREAKING CHANGE: Rename Active Record find_by_sql spans to query diff --git a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/version.rb b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/version.rb index 1f42c3003..bf2bf31c3 100644 --- a/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/version.rb +++ b/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveRecord - VERSION = '0.8.0' + VERSION = '0.8.1' end end end From 192b26280794ffa572e9c891053adeac5c729277 Mon Sep 17 00:00:00 2001 From: Hielke Jager Date: Sun, 24 Nov 2024 18:38:18 +0100 Subject: [PATCH 06/32] fix: get correct table name if table name is quoted (#1234) * fix: get correct table name if table name is quoted * Remove double test * Add new line to sql_table_name.json * Stop accepting table name in single quotes --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Co-authored-by: Ariel Valentin --- .../opentelemetry/instrumentation/pg/patches/connection.rb | 2 +- instrumentation/pg/test/fixtures/sql_table_name.json | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb index 98814950b..a40da7cd7 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb @@ -15,7 +15,7 @@ module Patches # Module to prepend to PG::Connection for instrumentation module Connection # rubocop:disable Metrics/ModuleLength # Capture the first word (including letters, digits, underscores, & '.', ) that follows common table commands - TABLE_NAME = /\b(?:FROM|INTO|UPDATE|CREATE\s+TABLE(?:\s+IF\s+NOT\s+EXISTS)?|DROP\s+TABLE(?:\s+IF\s+EXISTS)?|ALTER\s+TABLE(?:\s+IF\s+EXISTS)?)\s+([\w\.]+)/i + TABLE_NAME = /\b(?:FROM|INTO|UPDATE|CREATE\s+TABLE(?:\s+IF\s+NOT\s+EXISTS)?|DROP\s+TABLE(?:\s+IF\s+EXISTS)?|ALTER\s+TABLE(?:\s+IF\s+EXISTS)?)\s+["]?([\w\.]+)["]?/i PG::Constants::EXEC_ISH_METHODS.each do |method| define_method method do |*args, &block| diff --git a/instrumentation/pg/test/fixtures/sql_table_name.json b/instrumentation/pg/test/fixtures/sql_table_name.json index eacd9571f..7cf96681f 100644 --- a/instrumentation/pg/test/fixtures/sql_table_name.json +++ b/instrumentation/pg/test/fixtures/sql_table_name.json @@ -50,5 +50,9 @@ { "name": "from_with_join", "sql": "SELECT columns FROM test_table JOIN table2 ON test_table.column = table2.column" + }, + { + "name": "table_name_with_double_quotes", + "sql": "SELECT columns FROM \"test_table\"" } - ] \ No newline at end of file +] From 5970bd39792f3b7a4dd24bc5f1d4c3badee0af13 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Date: Sun, 24 Nov 2024 09:46:17 -0800 Subject: [PATCH 07/32] chore: Update rubocop-performance to ~> 1.23.0 (#1257) Co-authored-by: Ariel Valentin --- Gemfile | 2 +- helpers/mysql/opentelemetry-helpers-mysql.gemspec | 2 +- .../opentelemetry-helpers-sql-obfuscation.gemspec | 2 +- .../opentelemetry-instrumentation-action_mailer.gemspec | 2 +- .../opentelemetry-instrumentation-action_pack.gemspec | 2 +- .../opentelemetry-instrumentation-action_view.gemspec | 2 +- .../active_job/opentelemetry-instrumentation-active_job.gemspec | 2 +- ...entelemetry-instrumentation-active_model_serializers.gemspec | 2 +- .../opentelemetry-instrumentation-active_record.gemspec | 2 +- .../opentelemetry-instrumentation-active_support.gemspec | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- .../aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec | 2 +- .../aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec | 2 +- instrumentation/base/opentelemetry-instrumentation-base.gemspec | 2 +- .../bunny/opentelemetry-instrumentation-bunny.gemspec | 2 +- .../opentelemetry-instrumentation-concurrent_ruby.gemspec | 2 +- .../dalli/opentelemetry-instrumentation-dalli.gemspec | 2 +- .../opentelemetry-instrumentation-delayed_job.gemspec | 2 +- .../ethon/opentelemetry-instrumentation-ethon.gemspec | 2 +- .../excon/opentelemetry-instrumentation-excon.gemspec | 2 +- .../faraday/opentelemetry-instrumentation-faraday.gemspec | 2 +- .../grape/opentelemetry-instrumentation-grape.gemspec | 2 +- .../graphql/opentelemetry-instrumentation-graphql.gemspec | 2 +- instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec | 2 +- instrumentation/http/opentelemetry-instrumentation-http.gemspec | 2 +- .../opentelemetry-instrumentation-http_client.gemspec | 2 +- .../httpx/opentelemetry-instrumentation-httpx.gemspec | 2 +- .../koala/opentelemetry-instrumentation-koala.gemspec | 2 +- instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec | 2 +- .../mongo/opentelemetry-instrumentation-mongo.gemspec | 2 +- .../mysql2/opentelemetry-instrumentation-mysql2.gemspec | 2 +- .../net_http/opentelemetry-instrumentation-net_http.gemspec | 2 +- instrumentation/pg/opentelemetry-instrumentation-pg.gemspec | 2 +- instrumentation/que/opentelemetry-instrumentation-que.gemspec | 2 +- .../racecar/opentelemetry-instrumentation-racecar.gemspec | 2 +- instrumentation/rack/opentelemetry-instrumentation-rack.gemspec | 2 +- .../rails/opentelemetry-instrumentation-rails.gemspec | 2 +- instrumentation/rake/opentelemetry-instrumentation-rake.gemspec | 2 +- .../rdkafka/opentelemetry-instrumentation-rdkafka.gemspec | 2 +- .../redis/opentelemetry-instrumentation-redis.gemspec | 2 +- .../resque/opentelemetry-instrumentation-resque.gemspec | 2 +- .../restclient/opentelemetry-instrumentation-restclient.gemspec | 2 +- .../rspec/opentelemetry-instrumentation-rspec.gemspec | 2 +- .../ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec | 2 +- .../sidekiq/opentelemetry-instrumentation-sidekiq.gemspec | 2 +- .../sinatra/opentelemetry-instrumentation-sinatra.gemspec | 2 +- .../trilogy/opentelemetry-instrumentation-trilogy.gemspec | 2 +- processor/baggage/opentelemetry-processor-baggage.gemspec | 2 +- propagator/ottrace/opentelemetry-propagator-ottrace.gemspec | 2 +- propagator/vitess/opentelemetry-propagator-vitess.gemspec | 2 +- propagator/xray/opentelemetry-propagator-xray.gemspec | 2 +- resources/azure/opentelemetry-resource-detector-azure.gemspec | 2 +- .../container/opentelemetry-resource-detector-container.gemspec | 2 +- ...pentelemetry-resource-detector-google_cloud_platform.gemspec | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/Gemfile b/Gemfile index 30ecc9373..b68ccbbeb 100644 --- a/Gemfile +++ b/Gemfile @@ -8,4 +8,4 @@ source 'https://rubygems.org' gem 'rake', '~> 13.0' gem 'rubocop', '~> 1.68.0' -gem 'rubocop-performance', '~> 1.21.0' +gem 'rubocop-performance', '~> 1.23.0' diff --git a/helpers/mysql/opentelemetry-helpers-mysql.gemspec b/helpers/mysql/opentelemetry-helpers-mysql.gemspec index 36a9e5df0..ff93af073 100644 --- a/helpers/mysql/opentelemetry-helpers-mysql.gemspec +++ b/helpers/mysql/opentelemetry-helpers-mysql.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec index 5eacadb13..89ea0b8b1 100644 --- a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec +++ b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec index 529e98f42..5d4ee2bcc 100644 --- a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec +++ b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index c7ccb8689..f0028d35b 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index 721f509c6..a3dafc907 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 2a4e6c9f8..18da7cde0 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 3383c1f28..0982b584c 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 ad6ca55eb..1e6809b81 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 a5d3fe882..8c5ad3aa0 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -40,7 +40,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 77e99ba93..c9603b518 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -67,7 +67,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec index c2d9b96e4..049911d7c 100644 --- a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec +++ b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 797c0ab37..3648bec85 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index 502e21e24..4debdb6fb 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index 0a4b39b6f..e7dab3aff 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index 0e356e43b..1f71f3fde 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index 5ef0f6bc7..6803d287c 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index 48dea0abd..c92d19f0b 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index 4a9b1050f..5dfa222ae 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 3c07dd9b7..3373aa8a2 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index a115967d5..c74bfc26b 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 71d355fe3..3ee053af9 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 43ad220bf..cbce4c52a 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 4a955c9a3..a7b95ea1e 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers' spec.add_development_dependency 'rake', '~> 12.3.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index 88a000aba..cee534cc9 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 a5b722937..99c056b80 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec index 0f56283b8..d285bad81 100644 --- a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec +++ b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index 61a611cec..7e95f6392 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 12056bc40..535a9994e 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index c70528fc7..b1831edd6 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 2f09b9e9b..31d521db1 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index c9603deaa..e557f72a4 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0.1' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index 0d040639d..dd985d2e0 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' 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 bd6a2e5df..d9599515d 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index cf093ecba..842597e02 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index d3029b8d6..5f04dbca3 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index c028fa093..0328a44ae 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -42,7 +42,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rack-test', '~> 2.1.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 9cc83ecde..3c6825d72 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index a2e7bd62f..72bf2056c 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index e5beb6d00..7e00c7a55 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index 6aa0fec81..89cc03eaf 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 1788cbe54..dadfa6d14 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 3aa906b8a..f7129e984 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 d6376ae92..2e8bbfba5 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index a2fa3b643..0e63e3800 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index e5347d480..0f77e5b23 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rack-test', '~> 2.1' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index 081536c7a..dca960cb2 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -42,7 +42,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/processor/baggage/opentelemetry-processor-baggage.gemspec b/processor/baggage/opentelemetry-processor-baggage.gemspec index 700b16646..8d429b12e 100644 --- a/processor/baggage/opentelemetry-processor-baggage.gemspec +++ b/processor/baggage/opentelemetry-processor-baggage.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index 7d3b3894d..9e4aa0bcc 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/vitess/opentelemetry-propagator-vitess.gemspec b/propagator/vitess/opentelemetry-propagator-vitess.gemspec index aaaf55a97..474f06f7c 100644 --- a/propagator/vitess/opentelemetry-propagator-vitess.gemspec +++ b/propagator/vitess/opentelemetry-propagator-vitess.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index b1bffaa23..8efcfc243 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec index be2a85147..aaa321054 100644 --- a/resources/azure/opentelemetry-resource-detector-azure.gemspec +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 6160f36d7..1589db320 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec index 11ad9a060..564b9d620 100644 --- a/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec +++ b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.68.0' - spec.add_development_dependency 'rubocop-performance', '~> 1.22.0' + spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.24.0' spec.add_development_dependency 'yard', '~> 0.9' From c387a8d9d935597a6c52914b97c56575f3d7f911 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Nov 2024 17:53:45 +0000 Subject: [PATCH 08/32] chore: bump DavidAnson/markdownlint-cli2-action from 17 to 18 (#1243) Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 17 to 18. - [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases) - [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v17...v18) --- updated-dependencies: - dependency-name: DavidAnson/markdownlint-cli2-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ariel Valentin --- .github/workflows/ci-markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-markdownlint.yml b/.github/workflows/ci-markdownlint.yml index 646484a9b..037b2fa9e 100644 --- a/.github/workflows/ci-markdownlint.yml +++ b/.github/workflows/ci-markdownlint.yml @@ -11,7 +11,7 @@ jobs: # equivalent cli: markdownlint-cli2 "**/*.md" "#**/CHANGELOG.md" --config .markdownlint.json - name: "Markdown Lint Check" - uses: DavidAnson/markdownlint-cli2-action@v17 + uses: DavidAnson/markdownlint-cli2-action@v18 with: fix: false globs: | From ad8988bc4a11bafa0925c3137f2ae32bc57f40a0 Mon Sep 17 00:00:00 2001 From: Victorsesan <156327324+Victorsesan@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:16:06 +0100 Subject: [PATCH 09/32] refactor: Freeze all range objects #1172 (#1222) * Main Created a readable constant in 8 files to freeze ranges 100..399 . Relate to #1172 * refactor: Create a readable constant in 8 files to freeze ranges 100..399 . Reviewed-by: kaylareopelle Refs: #1172 * refactor: Fix rubocop ruby linter failures Reviewed-by: kaylareopelle Refs: #1172 * refactor: Fix rubocop ruby linter failures Reviewed-by: kaylareopelle Refs: #1172 --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Co-authored-by: Ariel Valentin --- docker-compose.yml | 2 -- .../instrumentation/ethon/patches/easy.rb | 5 ++++- .../excon/middlewares/tracer_middleware.rb | 13 ++++--------- .../faraday/middlewares/tracer_middleware.rb | 7 +++++-- .../instrumentation/http/patches/client.rb | 5 ++++- .../instrumentation/http_client/patches/client.rb | 5 ++++- .../opentelemetry/instrumentation/httpx/plugin.rb | 5 ++++- .../net/http/patches/instrumentation.rb | 5 ++++- .../instrumentation/restclient/patches/request.rb | 8 +++++--- 9 files changed, 34 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b77ad0e9d..a2fb5633f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.5" - x-shared-config: base: &base command: /bin/bash diff --git a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb index 74791818e..7850ac565 100644 --- a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb +++ b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/patches/easy.rb @@ -16,6 +16,9 @@ module Easy end HTTP_METHODS_TO_SPAN_NAMES = Hash.new { |h, k| h[k] = "HTTP #{k}" } + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def http_request(url, action_name, options = {}) @otel_method = ACTION_NAMES_TO_HTTP_METHODS[action_name] super @@ -42,7 +45,7 @@ def complete @otel_span.status = OpenTelemetry::Trace::Status.error("Request has failed: #{message}") else @otel_span.set_attribute('http.status_code', response_code) - @otel_span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response_code.to_i) + @otel_span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response_code.to_i) end ensure @otel_span&.finish diff --git a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb index 592fdb793..b17bfc662 100644 --- a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb +++ b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb @@ -21,11 +21,13 @@ class TracerMiddleware < ::Excon::Middleware::Base hash[uppercase_method] ||= "HTTP #{uppercase_method}" end.freeze + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def request_call(datum) return @stack.request_call(datum) if untraced?(datum) http_method = HTTP_METHODS_TO_UPPERCASE[datum[:method]] - attributes = { OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host], OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => http_method, @@ -35,19 +37,14 @@ def request_call(datum) OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => datum[:hostname], OpenTelemetry::SemanticConventions::Trace::NET_PEER_PORT => datum[:port] } - peer_service = Excon::Instrumentation.instance.config[:peer_service] attributes[OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = peer_service if peer_service attributes.merge!(OpenTelemetry::Common::HTTP::ClientContext.attributes) - span = tracer.start_span(HTTP_METHODS_TO_SPAN_NAMES[http_method], attributes: attributes, kind: :client) ctx = OpenTelemetry::Trace.context_with_span(span) - datum[:otel_span] = span datum[:otel_token] = OpenTelemetry::Context.attach(ctx) - OpenTelemetry.propagation.inject(datum[:headers]) - @stack.request_call(datum) end @@ -68,7 +65,6 @@ def self.around_default_stack # If the default stack contains a version of the trace middleware already... existing_trace_middleware = default_stack.find { |m| m <= TracerMiddleware } default_stack.delete(existing_trace_middleware) if existing_trace_middleware - # Inject after the ResponseParser middleware response_middleware_index = default_stack.index(::Excon::Middleware::ResponseParser).to_i default_stack.insert(response_middleware_index + 1, self) @@ -84,7 +80,7 @@ def handle_response(datum) if datum.key?(:response) response = datum[:response] span.set_attribute(OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE, response[:status]) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response[:status].to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response[:status].to_i) end if datum.key?(:error) @@ -93,7 +89,6 @@ def handle_response(datum) end span.finish - OpenTelemetry::Context.detach(datum.delete(:otel_token)) if datum.include?(:otel_token) end rescue StandardError => e diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb index 1b4452ac3..981e44e26 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb @@ -9,7 +9,7 @@ module Instrumentation module Faraday module Middlewares # TracerMiddleware propagates context and instruments Faraday requests - # by way of its middlware system + # by way of its middleware system class TracerMiddleware < ::Faraday::Middleware HTTP_METHODS_SYMBOL_TO_STRING = { connect: 'CONNECT', @@ -23,6 +23,9 @@ class TracerMiddleware < ::Faraday::Middleware trace: 'TRACE' }.freeze + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def call(env) http_method = HTTP_METHODS_SYMBOL_TO_STRING[env.method] config = Faraday::Instrumentation.instance.config @@ -68,7 +71,7 @@ def tracer def trace_response(span, status) span.set_attribute('http.status_code', status) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status.to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(status.to_i) end end end diff --git a/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb b/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb index f814e1a65..1d98cb5c1 100644 --- a/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb +++ b/instrumentation/http/lib/opentelemetry/instrumentation/http/patches/client.rb @@ -10,6 +10,9 @@ module HTTP module Patches # Module to prepend to HTTP::Client for instrumentation module Client + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def perform(req, options) uri = req.uri request_method = req.verb.to_s.upcase @@ -43,7 +46,7 @@ def annotate_span_with_response!(span, response) status_code = response.status.to_i span.set_attribute('http.status_code', status_code) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status_code.to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(status_code) end def create_request_span_name(request_method, request_path) diff --git a/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/patches/client.rb b/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/patches/client.rb index a71c8ad7b..46ad72142 100644 --- a/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/patches/client.rb +++ b/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/patches/client.rb @@ -10,6 +10,9 @@ module HttpClient module Patches # Module to prepend to HTTPClient for instrumentation module Client + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + private def do_get_block(req, proxy, conn, &block) @@ -42,7 +45,7 @@ def annotate_span_with_response!(span, response) status_code = response.status_code.to_i span.set_attribute('http.status_code', status_code) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status_code.to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(status_code) end def tracer diff --git a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb index 137fca976..2635a39e6 100644 --- a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb +++ b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/plugin.rb @@ -11,6 +11,9 @@ module Plugin # Instruments around HTTPX's request/response lifecycle in order to generate # an OTEL trace. class RequestTracer + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def initialize(request) @request = request end @@ -54,7 +57,7 @@ def finish(response) @span.status = Trace::Status.error("Unhandled exception of type: #{response.error.class}") else @span.set_attribute(OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE, response.status) - @span.status = Trace::Status.error unless (100..399).cover?(response.status) + @span.status = Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response.status) end OpenTelemetry::Context.detach(@trace_token) if @trace_token diff --git a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb index 725d4c546..6cdbfdb2b 100644 --- a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb +++ b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/patches/instrumentation.rb @@ -14,6 +14,9 @@ module Instrumentation HTTP_METHODS_TO_SPAN_NAMES = Hash.new { |h, k| h[k] = "HTTP #{k}" } USE_SSL_TO_SCHEME = { false => 'http', true => 'https' }.freeze + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def request(req, body = nil, &block) # Do not trace recursive call for starting the connection return super unless started? @@ -78,7 +81,7 @@ def annotate_span_with_response!(span, response) status_code = response.code.to_i span.set_attribute(OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE, status_code) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status_code.to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(status_code) end def tracer diff --git a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb index afb2fdf11..1507948f7 100644 --- a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb +++ b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/patches/request.rb @@ -10,6 +10,9 @@ module RestClient module Patches # Module to prepend to RestClient::Request for instrumentation module Request + # Constant for the HTTP status range + HTTP_STATUS_SUCCESS_RANGE = (100..399) + def execute(&block) trace_request do |_span| super @@ -49,13 +52,12 @@ def trace_request # If so, add additional attributes. if response.is_a?(::RestClient::Response) span.set_attribute('http.status_code', response.code) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response.code.to_i) + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response.code.to_i) end end rescue ::RestClient::ExceptionWithResponse => e span.set_attribute('http.status_code', e.http_code) - span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(e.http_code.to_i) - + span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(e.http_code.to_i) raise e ensure span.finish From 81cbe08cfab65ad0263fb73e5fa734d832814d98 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sun, 24 Nov 2024 12:23:13 -0600 Subject: [PATCH 10/32] chore: Update release-please-config.json --- release-please-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-please-config.json b/release-please-config.json index 056677671..35d6c7b5b 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,5 @@ { - "bootstrap-sha": "c7686e532a7348b504ad43024735b12d795756cd", + "bootstrap-sha": "ad8988bc4a11bafa0925c3137f2ae32bc57f40a0", "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, "draft": true, From 0e5dd05f6c33c942747c59848c18f5eefd3e031a Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sun, 24 Nov 2024 12:44:48 -0600 Subject: [PATCH 11/32] chore: sync release-please-versions --- .release-please-manifest.json | 87 ++++++++++++++++++----------------- bin/sync-release-please | 36 +++++++++++++++ 2 files changed, 80 insertions(+), 43 deletions(-) create mode 100755 bin/sync-release-please diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b72270bee..f514eef2c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,53 +1,54 @@ { "helpers/mysql": "0.1.1", - "helpers/sql_obfuscation": "0.1.1", - "instrumentation/base": "0.22.4", - "instrumentation/graphql": "0.28.2", + "helpers/sql-obfuscation": "0.2.0", + "instrumentation/action_mailer": "0.2.0", + "instrumentation/action_pack": "0.10.0", + "instrumentation/action_view": "0.7.3", + "instrumentation/active_job": "0.7.8", + "instrumentation/active_model_serializers": "0.20.2", + "instrumentation/active_record": "0.8.1", + "instrumentation/active_support": "0.6.0", + "instrumentation/all": "0.69.0", + "instrumentation/aws_lambda": "0.1.1", + "instrumentation/aws_sdk": "0.7.0", + "instrumentation/base": "0.22.6", + "instrumentation/bunny": "0.21.4", + "instrumentation/concurrent_ruby": "0.21.4", + "instrumentation/dalli": "0.25.4", + "instrumentation/delayed_job": "0.22.4", + "instrumentation/ethon": "0.21.8", + "instrumentation/excon": "0.22.4", + "instrumentation/faraday": "0.24.6", + "instrumentation/grape": "0.2.0", + "instrumentation/graphql": "0.28.4", "instrumentation/gruf": "0.2.1", - "instrumentation/racecar": "0.3.2", - "instrumentation/rake": "0.2.2", - "instrumentation/rdkafka": "0.4.6", - "instrumentation/trilogy": "0.59.3", - "instrumentation/active_support": "0.5.1", - "instrumentation/action_mailer": "0.1.0", - "instrumentation/action_view": "0.7.0", - "instrumentation/action_pack": "0.9.0", - "instrumentation/active_job": "0.7.1", - "instrumentation/resque": "0.5.2", - "instrumentation/bunny": "0.21.3", - "instrumentation/active_record": "0.7.2", - "instrumentation/aws_sdk": "0.5.2", - "instrumentation/aws_lambda": "0.1.0", - "instrumentation/lmdb": "0.22.2", - "instrumentation/http": "0.23.3", - "instrumentation/http_client": "0.22.6", + "instrumentation/http": "0.23.4", + "instrumentation/http_client": "0.22.7", "instrumentation/httpx": "0.1.2", "instrumentation/koala": "0.20.5", - "instrumentation/active_model_serializers": "0.20.1", - "instrumentation/concurrent_ruby": "0.21.3", - "instrumentation/dalli": "0.25.3", - "instrumentation/delayed_job": "0.22.2", - "instrumentation/ethon": "0.21.7", - "instrumentation/excon": "0.22.3", - "instrumentation/faraday": "0.24.4", - "instrumentation/mongo": "0.22.3", - "instrumentation/mysql2": "0.27.1", - "instrumentation/net_http": "0.22.6", - "instrumentation/pg": "0.27.3", - "instrumentation/que": "0.8.1", - "instrumentation/rack": "0.24.5", - "instrumentation/rails": "0.30.2", - "instrumentation/grape": "0.1.8", - "instrumentation/redis": "0.25.6", - "instrumentation/restclient": "0.22.6", + "instrumentation/lmdb": "0.22.3", + "instrumentation/mongo": "0.22.4", + "instrumentation/mysql2": "0.28.0", + "instrumentation/net_http": "0.22.7", + "instrumentation/pg": "0.29.0", + "instrumentation/que": "0.8.4", + "instrumentation/racecar": "0.3.4", + "instrumentation/rack": "0.25.0", + "instrumentation/rails": "0.33.0", + "instrumentation/rake": "0.2.2", + "instrumentation/rdkafka": "0.4.8", + "instrumentation/redis": "0.25.7", + "instrumentation/resque": "0.5.2", + "instrumentation/restclient": "0.22.7", "instrumentation/rspec": "0.3.3", - "instrumentation/ruby_kafka": "0.21.1", - "instrumentation/sidekiq": "0.25.5", - "instrumentation/sinatra": "0.23.5", - "instrumentation/all": "0.56.0", + "instrumentation/ruby_kafka": "0.21.3", + "instrumentation/sidekiq": "0.25.7", + "instrumentation/sinatra": "0.24.1", + "instrumentation/trilogy": "0.60.0", "processor/baggage": "0.2.0", - "propagator/ottrace": "0.21.2", - "propagator/xray": "0.22.1", + "propagator/ottrace": "0.21.3", + "propagator/vitess": "0.1.0", + "propagator/xray": "0.22.2", "resources/azure": "0.1.0", "resources/container": "0.1.1", "resources/google_cloud_platform": "0.1.0" diff --git a/bin/sync-release-please b/bin/sync-release-please new file mode 100755 index 000000000..8e669df50 --- /dev/null +++ b/bin/sync-release-please @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby + +require 'json' + +# Function to extract VERSION constant from a file +def extract_version(file_path) + version = nil + File.open(file_path, 'r') do |file| + file.each_line do |line| + if line =~ /VERSION\s*=\s*['"]([^'"]+)['"]/ + version = $1 + break + end + end + end + version +end + +# Hash to store the directory names and their versions +versions = {} + +# Find all version.rb files +Dir.glob('**/version.rb').each do |file_path| + # Extract the top 2 level directories + top_dirs = file_path.split('/')[0..1].join('/') + # Extract the version + version = extract_version(file_path) + # Store in the hash + versions[top_dirs] = version if version +end + +# Write the hash to a JSON file +File.open('.release-please-manifest.json', 'w') do |file| + file.write(JSON.pretty_generate(versions)) + file.write("\n") +end From aae89d7ec7c60e7cd222243a8d3885c774f12650 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 25 Nov 2024 20:27:00 -0600 Subject: [PATCH 12/32] chore: Add EoL Post Install Messages (#1264) --- POST_INSTALL_MESSAGE | 3 +++ helpers/mysql/opentelemetry-helpers-mysql.gemspec | 2 ++ .../opentelemetry-helpers-sql-obfuscation.gemspec | 2 ++ instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 ++ .../rails/opentelemetry-instrumentation-rails.gemspec | 2 ++ processor/baggage/opentelemetry-processor-baggage.gemspec | 2 ++ propagator/ottrace/opentelemetry-propagator-ottrace.gemspec | 2 ++ propagator/vitess/opentelemetry-propagator-vitess.gemspec | 2 ++ propagator/xray/opentelemetry-propagator-xray.gemspec | 2 ++ resources/azure/opentelemetry-resource-detector-azure.gemspec | 2 ++ .../opentelemetry-resource-detector-container.gemspec | 2 ++ ...entelemetry-resource-detector-google_cloud_platform.gemspec | 2 ++ 12 files changed, 25 insertions(+) create mode 100644 POST_INSTALL_MESSAGE diff --git a/POST_INSTALL_MESSAGE b/POST_INSTALL_MESSAGE new file mode 100644 index 000000000..96c3ecaa5 --- /dev/null +++ b/POST_INSTALL_MESSAGE @@ -0,0 +1,3 @@ +Ruby 3.0 has reached EoL 2024-04-23. OTel Ruby Contrib gems will no longer accept new features or bug fixes for Ruby 3.0 after 2025-01-15. Please upgrade to Ruby 3.1 or higher to continue receiving updates. + +Rails 6.1 has reached EoL 2024-10-01. OTel Ruby Contrib gems will no longer accept new features or bug fixes for Rails 6.1 after 2025-01-15. Please upgrade to Rails 7.0 or higher to continue receiving updates. diff --git a/helpers/mysql/opentelemetry-helpers-mysql.gemspec b/helpers/mysql/opentelemetry-helpers-mysql.gemspec index ff93af073..f18fff675 100644 --- a/helpers/mysql/opentelemetry-helpers-mysql.gemspec +++ b/helpers/mysql/opentelemetry-helpers-mysql.gemspec @@ -44,4 +44,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec index 89ea0b8b1..eefb5dae9 100644 --- a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec +++ b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec @@ -42,4 +42,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index c9603b518..6b592127f 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -77,4 +77,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 0328a44ae..c9243add0 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -48,4 +48,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'yard', '~> 0.9' spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rails' if spec.respond_to?(:metadata) + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/processor/baggage/opentelemetry-processor-baggage.gemspec b/processor/baggage/opentelemetry-processor-baggage.gemspec index 8d429b12e..f625e91b1 100644 --- a/processor/baggage/opentelemetry-processor-baggage.gemspec +++ b/processor/baggage/opentelemetry-processor-baggage.gemspec @@ -41,4 +41,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index 9e4aa0bcc..9417ed10b 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -39,4 +39,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/propagator/vitess/opentelemetry-propagator-vitess.gemspec b/propagator/vitess/opentelemetry-propagator-vitess.gemspec index 474f06f7c..c2300ebbf 100644 --- a/propagator/vitess/opentelemetry-propagator-vitess.gemspec +++ b/propagator/vitess/opentelemetry-propagator-vitess.gemspec @@ -40,4 +40,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index 8efcfc243..8305dac7a 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -42,4 +42,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec index aaa321054..005742c27 100644 --- a/resources/azure/opentelemetry-resource-detector-azure.gemspec +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -42,4 +42,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index 1589db320..83b5438bf 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -41,4 +41,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end 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 564b9d620..acedf0e06 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 @@ -43,4 +43,6 @@ Gem::Specification.new do |spec| spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}" end + + spec.post_install_message = File.read(File.expand_path('../../POST_INSTALL_MESSAGE', __dir__)) end From 2886fae7ab09eb54658caee8bc5f63a350f8c9e2 Mon Sep 17 00:00:00 2001 From: Hazel Bachrach Date: Tue, 26 Nov 2024 14:58:46 -0800 Subject: [PATCH 13/32] feat: add grpc instrumentation (#1164) * feat: add grpc instrumentation See for previous git history * Apply suggestions from code review * chore: Markdown lint, class updates for CI * Update instrumentation/grpc/README.md --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Co-authored-by: Kayla Reopelle --- instrumentation/grpc/.rspec | 3 + instrumentation/grpc/.standard.yml | 3 + instrumentation/grpc/CHANGELOG.md | 18 ++ instrumentation/grpc/CODE_OF_CONDUCT.md | 84 ++++++++ instrumentation/grpc/Gemfile | 17 ++ instrumentation/grpc/LICENSE | 201 ++++++++++++++++++ instrumentation/grpc/README.md | 72 +++++++ instrumentation/grpc/Rakefile | 14 ++ .../lib/opentelemetry-instrumentation-grpc.rb | 7 + .../grpc/lib/opentelemetry/instrumentation.rb | 12 ++ .../lib/opentelemetry/instrumentation/grpc.rb | 28 +++ .../instrumentation/grpc/instrumentation.rb | 36 ++++ .../grpc/interceptors/client.rb | 84 ++++++++ .../instrumentation/grpc/version.rb | 13 ++ ...opentelemetry-instrumentation-grpc.gemspec | 49 +++++ .../opentelemetry/instrumentation/grpc.rbs | 14 ++ instrumentation/grpc/spec/example/Gemfile | 14 ++ instrumentation/grpc/spec/example/base.rb | 13 ++ .../controllers/example_api_controller.rb | 15 ++ .../grpc/spec/example/proto/example_api.proto | 16 ++ .../grpc/spec/example/proto/example_api_pb.rb | 25 +++ .../example/proto/example_api_services_pb.rb | 25 +++ .../grpc/spec/example/trace_demonstration.rb | 46 ++++ .../grpc/interceptors/client_spec.rb | 82 +++++++ .../instrumentation/grpc_spec.rb | 15 ++ instrumentation/grpc/spec/spec_helper.rb | 31 +++ 26 files changed, 937 insertions(+) create mode 100644 instrumentation/grpc/.rspec create mode 100644 instrumentation/grpc/.standard.yml create mode 100644 instrumentation/grpc/CHANGELOG.md create mode 100644 instrumentation/grpc/CODE_OF_CONDUCT.md create mode 100644 instrumentation/grpc/Gemfile create mode 100644 instrumentation/grpc/LICENSE create mode 100644 instrumentation/grpc/README.md create mode 100644 instrumentation/grpc/Rakefile create mode 100644 instrumentation/grpc/lib/opentelemetry-instrumentation-grpc.rb create mode 100644 instrumentation/grpc/lib/opentelemetry/instrumentation.rb create mode 100644 instrumentation/grpc/lib/opentelemetry/instrumentation/grpc.rb create mode 100644 instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/instrumentation.rb create mode 100644 instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/interceptors/client.rb create mode 100644 instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb create mode 100644 instrumentation/grpc/opentelemetry-instrumentation-grpc.gemspec create mode 100644 instrumentation/grpc/sig/opentelemetry/instrumentation/grpc.rbs create mode 100644 instrumentation/grpc/spec/example/Gemfile create mode 100644 instrumentation/grpc/spec/example/base.rb create mode 100644 instrumentation/grpc/spec/example/controllers/example_api_controller.rb create mode 100644 instrumentation/grpc/spec/example/proto/example_api.proto create mode 100644 instrumentation/grpc/spec/example/proto/example_api_pb.rb create mode 100644 instrumentation/grpc/spec/example/proto/example_api_services_pb.rb create mode 100644 instrumentation/grpc/spec/example/trace_demonstration.rb create mode 100644 instrumentation/grpc/spec/opentelemetry/instrumentation/grpc/interceptors/client_spec.rb create mode 100644 instrumentation/grpc/spec/opentelemetry/instrumentation/grpc_spec.rb create mode 100644 instrumentation/grpc/spec/spec_helper.rb diff --git a/instrumentation/grpc/.rspec b/instrumentation/grpc/.rspec new file mode 100644 index 000000000..34c5164d9 --- /dev/null +++ b/instrumentation/grpc/.rspec @@ -0,0 +1,3 @@ +--format documentation +--color +--require spec_helper diff --git a/instrumentation/grpc/.standard.yml b/instrumentation/grpc/.standard.yml new file mode 100644 index 000000000..6d67c99eb --- /dev/null +++ b/instrumentation/grpc/.standard.yml @@ -0,0 +1,3 @@ +# For available configuration options, see: +# https://github.com/standardrb/standard +ruby_version: 3.0 diff --git a/instrumentation/grpc/CHANGELOG.md b/instrumentation/grpc/CHANGELOG.md new file mode 100644 index 000000000..4b7b650f9 --- /dev/null +++ b/instrumentation/grpc/CHANGELOG.md @@ -0,0 +1,18 @@ +## [Unreleased] + +## [0.1.3] - 2024-09-11 + +- Fix error in handling of non-gRPC errors +- Fix error in method signature for OpenTelemetry::Instrumentation::Grpc.client_interceptor [#1](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/pull/1) + +## [0.1.2] - 2024-06-26 + +- Align span naming with spec + +## [0.1.1] - 2024-06-26 + +- Fix `uninitialized constant Interceptors` error + +## [0.1.0] - 2024-06-18 + +- Initial release diff --git a/instrumentation/grpc/CODE_OF_CONDUCT.md b/instrumentation/grpc/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..e478f902c --- /dev/null +++ b/instrumentation/grpc/CODE_OF_CONDUCT.md @@ -0,0 +1,84 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at hbachrach@dropbox.com. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, +available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/instrumentation/grpc/Gemfile b/instrumentation/grpc/Gemfile new file mode 100644 index 000000000..091fd2d84 --- /dev/null +++ b/instrumentation/grpc/Gemfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +source "https://rubygems.org" + +# Specify your gem's dependencies in opentelemetry-instrumentation-grpc.gemspec +gemspec + +gem "rake", "~> 13.0" +gem "rspec", "~> 3.0" +gem "standard", "~> 1.3" +gem "opentelemetry-sdk", "~> 1.0" +gem "opentelemetry-test-helpers" +gem "grpc" diff --git a/instrumentation/grpc/LICENSE b/instrumentation/grpc/LICENSE new file mode 100644 index 000000000..1ef7dad2c --- /dev/null +++ b/instrumentation/grpc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright The OpenTelemetry Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/instrumentation/grpc/README.md b/instrumentation/grpc/README.md new file mode 100644 index 000000000..8377b9d57 --- /dev/null +++ b/instrumentation/grpc/README.md @@ -0,0 +1,72 @@ +# OpenTelemetry::Instrumentation::Grpc +> [!CAUTION] +> This gem is not ready for release by the open-telemetry org yet, but other versions are available on RubyGems + +[![Gem Version](https://badge.fury.io/rb/opentelemetry-instrumentation-grpc.svg)](https://badge.fury.io/rb/opentelemetry-instrumentation-grpc) +[![GitHub Actions CI Status](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/actions/workflows/main.yml/badge.svg)](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/actions?query=branch%3Amain) + +OpenTelemetry instrumentation for users of the `grpc` gem + +> [!WARNING] +> Right now, the gem only instruments outbound requests to gRPC services + +## Installation + +Install the gem and add to the application's Gemfile by executing: + +```sh + $ bundle add opentelemetry-instrumentation-grpc +``` + +If bundler is not being used to manage dependencies, install the gem by executing: + +```sh + $ gem install opentelemetry-instrumentation-grpc +``` + +## Usage + +To use the instrumentation, call `use` with the name of the instrumentation: + +```ruby + OpenTelemetry::SDK.configure do |c| + c.use 'OpenTelemetry::Instrumentation::Grpc', { + peer_service: "Example", + allowed_metadata_headers: [], + } + end +``` + +Alternatively, you can also call `use_all` to install all the available +instrumentation. + +```ruby + OpenTelemetry::SDK.configure do |c| + c.use_all + end +``` + +You *also* need to make sure your stubs are using the interceptor, e.g. + +```ruby + otel = OpenTelemetry::Instrumentation::Grpc.client_interceptor + SomeService::Stub.new(host, credentials, *args, **kwargs, interceptors: [otel]) +``` + +## Development + +After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. + +To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org). + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/open-telemetry/opentelemetry-ruby-contrib. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/CODE_OF_CONDUCT.md). + +## License + +The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). + +## Code of Conduct + +Everyone interacting in the OpenTelemetry::Instrumentation::Grpc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/CODE_OF_CONDUCT.md). diff --git a/instrumentation/grpc/Rakefile b/instrumentation/grpc/Rakefile new file mode 100644 index 000000000..011031f8f --- /dev/null +++ b/instrumentation/grpc/Rakefile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require "bundler/gem_tasks" +require "rspec/core/rake_task" + +RSpec::Core::RakeTask.new(:spec) + +require "standard/rake" + +task default: %i[spec standard] diff --git a/instrumentation/grpc/lib/opentelemetry-instrumentation-grpc.rb b/instrumentation/grpc/lib/opentelemetry-instrumentation-grpc.rb new file mode 100644 index 000000000..c6f1e5014 --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry-instrumentation-grpc.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative "opentelemetry/instrumentation" diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation.rb new file mode 100644 index 000000000..e036eea9d --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + end +end + +require_relative "instrumentation/grpc" diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc.rb new file mode 100644 index 000000000..582b53fe3 --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require "opentelemetry" +require "opentelemetry-instrumentation-base" +require "active_support/inflector" + +module OpenTelemetry + module Instrumentation + # Contains the OpenTelemetry instrumentation for the gRPC gem + module Grpc + class Error < StandardError; end + + module_function + + def client_interceptor + Interceptors::Client.new + end + end + end +end + +require_relative "grpc/instrumentation" +require_relative "grpc/interceptors/client" +require_relative "grpc/version" diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/instrumentation.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/instrumentation.rb new file mode 100644 index 000000000..5287f44b8 --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/instrumentation.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module Grpc + # The Instrumentation class contains logic to detect and install the Grpc instrumentation + class Instrumentation < OpenTelemetry::Instrumentation::Base + install do |_config| + require_dependencies + patch + end + + option :allowed_metadata_headers, default: [], validate: :array + option :peer_service, default: nil, validate: :string + + present do + defined?(::GRPC) + end + + private + + def patch + ::GRPC::ClientInterceptor.prepend(Interceptors::Client) + end + + def require_dependencies + require_relative "interceptors/client" + end + end + end + end +end diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/interceptors/client.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/interceptors/client.rb new file mode 100644 index 000000000..2cc03459d --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/interceptors/client.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module Grpc + module Interceptors + class Client + def request_response(request: nil, call: nil, method: nil, metadata: nil, &blk) + call(type: "request_response", requests: [request], call: call, method: method, metadata: metadata, &blk) + end + + def client_streamer(requests: nil, call: nil, method: nil, metadata: nil, &blk) + call(type: "client_streamer", requests: requests, call: call, method: method, metadata: metadata, &blk) + end + + def server_streamer(request: nil, call: nil, method: nil, metadata: nil, &blk) + call(type: "server_streamer", requests: [request], call: call, method: method, metadata: metadata, &blk) + end + + def bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil, &blk) + call(type: "client_streamer", requests: requests, call: call, method: method, metadata: metadata, &blk) + end + + private + + def call(type:, requests: nil, call: nil, method: nil, metadata: nil) + return yield if instrumentation_config.empty? + + method_parts = method.to_s.split("/") + service = method_parts[1] + method_name = method_parts.last + + attributes = { + OpenTelemetry::SemanticConventions::Trace::RPC_SYSTEM => "grpc", + OpenTelemetry::SemanticConventions::Trace::RPC_SERVICE => service, + OpenTelemetry::SemanticConventions::Trace::RPC_METHOD => method_name, + OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE => instrumentation_config[:peer_service], + "rpc.type" => type, + "net.sock.peer.addr" => call.instance_variable_get(:@wrapped)&.peer + }.compact + + attributes.merge!(allowed_metadata_headers(metadata.transform_keys(&:to_s))) + + instrumentation_tracer.in_span( + # The specification requires there be no leading slash + # https://github.com/open-telemetry/semantic-conventions/blob/5a2836bbea0b6e105b98370f331a7661bcf19540/docs/rpc/rpc-spans.md?plain=1#L63-L69 + method.to_s.delete_prefix("/"), + attributes: attributes, + kind: OpenTelemetry::Trace::SpanKind::CLIENT + ) do |span| + OpenTelemetry.propagation.inject(metadata) + yield.tap do + span&.set_attribute(OpenTelemetry::SemanticConventions::Trace::RPC_GRPC_STATUS_CODE, 0) + end + rescue ::GRPC::BadStatus => e + span&.set_attribute(OpenTelemetry::SemanticConventions::Trace::RPC_GRPC_STATUS_CODE, e.code) + raise e + end + end + + def allowed_metadata_headers(metadata) + instrumentation_config[:allowed_metadata_headers].each_with_object({}) do |k, h| + if (v = metadata[k.to_s]) + h["rpc.request.metadata.#{k}"] = v + end + end + end + + def instrumentation_config + Grpc::Instrumentation.instance.config + end + + def instrumentation_tracer + Grpc::Instrumentation.instance.tracer + end + end + end + end + end +end diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb new file mode 100644 index 000000000..1549ed154 --- /dev/null +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module Grpc + VERSION = "0.1.3" + end + end +end diff --git a/instrumentation/grpc/opentelemetry-instrumentation-grpc.gemspec b/instrumentation/grpc/opentelemetry-instrumentation-grpc.gemspec new file mode 100644 index 000000000..e2c18e6a3 --- /dev/null +++ b/instrumentation/grpc/opentelemetry-instrumentation-grpc.gemspec @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative "lib/opentelemetry/instrumentation/grpc/version" + +Gem::Specification.new do |spec| + spec.name = "opentelemetry-instrumentation-grpc" + spec.version = OpenTelemetry::Instrumentation::Grpc::VERSION + spec.authors = ['OpenTelemetry Authors'] + spec.email = ['cncf-opentelemetry-contributors@lists.cncf.io'] + + spec.summary = 'gRPC instrumentation for the OpenTelemetry framework' + spec.description = 'gRPC instrumentation for the OpenTelemetry framework' + spec.homepage = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib' + spec.license = 'Apache-2.0' + + spec.required_ruby_version = ">= 3.0.0" + + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + gemspec = File.basename(__FILE__) + spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| + ls.readlines("\x0", chomp: true).reject do |f| + (f == gemspec) || + f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) + end + end + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] + + # Uncomment to register a new dependency of your gem + spec.add_dependency "opentelemetry-instrumentation-base", "~> 0.22.4" + spec.add_dependency "opentelemetry-api", "~> 1.2" + spec.add_runtime_dependency "activesupport", ">= 4" + + # For more information and examples about making a new gem, check out our + # guide at: https://bundler.io/guides/creating_gem.html + + if spec.respond_to?(:metadata) + spec.metadata['changelog_uri'] = "https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-grpc/v#{OpenTelemetry::Instrumentation::Grpc::VERSION}/file.CHANGELOG.html" + spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/grpc' + spec.metadata['bug_tracker_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues' + spec.metadata['documentation_uri'] = "https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-grpc/v#{OpenTelemetry::Instrumentation::Grpc::VERSION}" + end +end diff --git a/instrumentation/grpc/sig/opentelemetry/instrumentation/grpc.rbs b/instrumentation/grpc/sig/opentelemetry/instrumentation/grpc.rbs new file mode 100644 index 000000000..03f8245de --- /dev/null +++ b/instrumentation/grpc/sig/opentelemetry/instrumentation/grpc.rbs @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module Grpc + VERSION: String + # See the writing guide of rbs: https://github.com/ruby/rbs#guides + end + end +end diff --git a/instrumentation/grpc/spec/example/Gemfile b/instrumentation/grpc/spec/example/Gemfile new file mode 100644 index 000000000..fafb31a31 --- /dev/null +++ b/instrumentation/grpc/spec/example/Gemfile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +source "https://rubygems.org" + +gem "opentelemetry-api" +gem "opentelemetry-common" +gem "opentelemetry-instrumentation-gruf", path: "../../gruf" +gem "opentelemetry-sdk" +gem "gruf" +gem "google-protobuf" diff --git a/instrumentation/grpc/spec/example/base.rb b/instrumentation/grpc/spec/example/base.rb new file mode 100644 index 000000000..e66891270 --- /dev/null +++ b/instrumentation/grpc/spec/example/base.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require "rubygems" +require "bundler/setup" +require "json" +require_relative "proto/example_api_pb" +require_relative "proto/example_api_services_pb" + +Bundler.require diff --git a/instrumentation/grpc/spec/example/controllers/example_api_controller.rb b/instrumentation/grpc/spec/example/controllers/example_api_controller.rb new file mode 100644 index 000000000..7bf6f14be --- /dev/null +++ b/instrumentation/grpc/spec/example/controllers/example_api_controller.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative "../base" + +class ExampleApiController < Gruf::Controllers::Base + bind Proto::Example::ExampleAPI::Service + + def example + Proto::Example::ExampleResponse.new(response_name: "Done") + end +end diff --git a/instrumentation/grpc/spec/example/proto/example_api.proto b/instrumentation/grpc/spec/example/proto/example_api.proto new file mode 100644 index 000000000..d28ba90f3 --- /dev/null +++ b/instrumentation/grpc/spec/example/proto/example_api.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package proto.example; + +service ExampleAPI { + rpc Example(ExampleRequest) returns (ExampleResponse); +} + +message ExampleRequest { + uint64 id = 1; + string name = 2; +} + +message ExampleResponse { + string response_name = 1; +} \ No newline at end of file diff --git a/instrumentation/grpc/spec/example/proto/example_api_pb.rb b/instrumentation/grpc/spec/example/proto/example_api_pb.rb new file mode 100644 index 000000000..4e4649924 --- /dev/null +++ b/instrumentation/grpc/spec/example/proto/example_api_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: example/example_api.proto + +require "google/protobuf" + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_file("example/example_api.proto", syntax: :proto3) do + add_message "proto.example.ExampleRequest" do + optional :id, :uint64, 1 + optional :name, :string, 2 + end + add_message "proto.example.ExampleResponse" do + optional :response_name, :string, 1 + end + end +end + +module Proto + module Example + ExampleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("proto.example.ExampleRequest").msgclass + ExampleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("proto.example.ExampleResponse").msgclass + end +end diff --git a/instrumentation/grpc/spec/example/proto/example_api_services_pb.rb b/instrumentation/grpc/spec/example/proto/example_api_services_pb.rb new file mode 100644 index 000000000..8fb75965b --- /dev/null +++ b/instrumentation/grpc/spec/example/proto/example_api_services_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: example/example_api.proto for package 'proto.example' + +require "grpc" +require_relative "example_api_pb" + +module Proto + module Example + module ExampleAPI + class Service + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = "proto.example.ExampleAPI" + + rpc :Example, ::Proto::Example::ExampleRequest, ::Proto::Example::ExampleResponse + end + + Stub = Service.rpc_stub_class + end + end +end diff --git a/instrumentation/grpc/spec/example/trace_demonstration.rb b/instrumentation/grpc/spec/example/trace_demonstration.rb new file mode 100644 index 000000000..9e4c38a28 --- /dev/null +++ b/instrumentation/grpc/spec/example/trace_demonstration.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative "base" + +# Export traces to console by default +ENV["OTEL_TRACES_EXPORTER"] = "console" +# Configure OpenTelemetry::Instrumentation::Gruf +OpenTelemetry::SDK.configure do |c| + c.use "OpenTelemetry::Instrumentation::Gruf", { + peer_service: "Example", + grpc_ignore_methods_on_client: [], # ["proto.example.example_api.example"] + grpc_ignore_methods_on_server: [], # ["proto.example.example_api.example"] + allowed_metadata_headers: [] + } +end + +# Configure Gruf::Server +Gruf.configure do |config| + config.controllers_path = ("./controllers") + config.interceptors.clear + config.interceptors.use(OpenTelemetry::Instrumentation::Gruf::Interceptors::Server) +end +Gruf.autoloaders.load!(controllers_path: Gruf.controllers_path) + +Thread.new do + # Configure Gruf::Client: send request after 5 seconds + sleep 5 + client_options = {interceptors: [OpenTelemetry::Instrumentation::Gruf::Interceptors::Client.new]} + client = Gruf::Client.new( + service: Proto::Example::ExampleAPI, options: {}, client_options: client_options + ) + metadata = {project_name: "Example project", authorization: "authorization_token"} + client.call(:Example, {id: 1, name: "Example"}, metadata) + + # Kill process after 3 seconds + sleep 3 + exit +end + +server = Gruf::Server.new +# Demonstrate tracing for client and server (span output to console): +server.start! diff --git a/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc/interceptors/client_spec.rb b/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc/interceptors/client_spec.rb new file mode 100644 index 000000000..c536120e5 --- /dev/null +++ b/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc/interceptors/client_spec.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require "spec_helper" + +require "opentelemetry/instrumentation/grpc/interceptors/client" + +RSpec.describe OpenTelemetry::Instrumentation::Grpc::Interceptors::Client do + before do + instrumentation.install(config) + exporter.reset + end + + after do + instrumentation.instance_variable_set(:@installed, false) + end + + let(:config) { {} } + let(:exporter) { EXPORTER } + let(:instrumentation) { OpenTelemetry::Instrumentation::Grpc::Instrumentation.instance } + let(:span) { exporter.finished_spans.first } + let(:response) { Proto::Example::ExampleResponse.new(response_name: "Done") } + let(:block) { proc { response } } + let(:client_call) do + OpenTelemetry::Instrumentation::Grpc::Interceptors::Client + .new.request_response(request: Proto::Example::ExampleRequest.new, call: proc { true }, method: "/proto.example.ExampleAPI/Example", metadata: {foo: "bar"}, &block) + end + + describe "success request" do + it "gets response and finish span" do + expect(client_call).to eq(response) + expect(exporter.finished_spans.size).to eq(1) + expect(span.kind).to eq(:client) + expect(span.attributes["rpc.system"]).to eq("grpc") + expect(span.attributes["rpc.type"]).to eq("request_response") + expect(span.name).to eq("proto.example.ExampleAPI/Example") + end + + describe "with allowed_metadata_headers" do + let(:config) { {allowed_metadata_headers: [:foo]} } + + it do + client_call + + expect(exporter.finished_spans.size).to eq(1) + expect(span.attributes["rpc.request.metadata.foo"]).to eq("bar") + end + end + end + + describe "raise non-gRPC related error" do + let(:error_class) { Class.new(StandardError) } + let(:block) { proc { raise error_class } } + + it "gets response and finish span" do + expect { client_call }.to raise_error(error_class) + expect(exporter.finished_spans.size).to eq(1) + expect(span.kind).to eq(:client) + expect(span.attributes["rpc.system"]).to eq("grpc") + expect(span.attributes["rpc.type"]).to eq("request_response") + expect(span.events.size).to eq(1) + expect(span.events.first.name).to eq("exception") + end + end + + describe "raise gRPC related error" do + let(:block) { proc { raise ::GRPC::NotFound } } + + it "gets response and finish span, setting code correctly" do + expect { client_call }.to raise_error(::GRPC::NotFound) + expect(exporter.finished_spans.size).to eq(1) + expect(span.kind).to eq(:client) + expect(span.attributes["rpc.system"]).to eq("grpc") + expect(span.attributes["rpc.type"]).to eq("request_response") + expect(span.attributes["rpc.grpc.status_code"]).to eq(::GRPC::NotFound.new.code) + expect(span.events.size).to eq(1) + end + end +end diff --git a/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc_spec.rb b/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc_spec.rb new file mode 100644 index 000000000..0a805138c --- /dev/null +++ b/instrumentation/grpc/spec/opentelemetry/instrumentation/grpc_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +RSpec.describe OpenTelemetry::Instrumentation::Grpc do + it "has a version number" do + expect(OpenTelemetry::Instrumentation::Grpc::VERSION).not_to be nil + end + + describe ".client_interceptor" do + it { expect(described_class.client_interceptor).to be_a(OpenTelemetry::Instrumentation::Grpc::Interceptors::Client) } + end +end diff --git a/instrumentation/grpc/spec/spec_helper.rb b/instrumentation/grpc/spec/spec_helper.rb new file mode 100644 index 000000000..7a082ee74 --- /dev/null +++ b/instrumentation/grpc/spec/spec_helper.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require "opentelemetry/sdk" +require "grpc" + +require "opentelemetry/instrumentation/grpc" +require "example/proto/example_api_pb" +require "example/proto/example_api_services_pb" + +RSpec.configure do |config| + # Enable flags like --only-failures and --next-failure + config.example_status_persistence_file_path = ".rspec_status" + + # Disable RSpec exposing methods globally on `Module` and `main` + config.disable_monkey_patching! + + config.expect_with :rspec do |c| + c.syntax = :expect + end +end + +EXPORTER = OpenTelemetry::SDK::Trace::Export::InMemorySpanExporter.new +span_processor = OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(EXPORTER) + +OpenTelemetry::SDK.configure do |c| + c.add_span_processor span_processor +end From f4b89c32c5aead44de93e14896e963a4c0a2da8b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:04:19 -0600 Subject: [PATCH 14/32] release: Release 20 gems (#1270) * release: Release 20 gems * opentelemetry-processor-baggage 0.2.1 (was 0.2.0) * opentelemetry-resource-detector-azure 0.1.1 (was 0.1.0) * opentelemetry-resource-detector-container 0.1.2 (was 0.1.1) * opentelemetry-resource-detector-google_cloud_platform 0.1.1 (was 0.1.0) * opentelemetry-propagator-ottrace 0.21.4 (was 0.21.3) * opentelemetry-propagator-vitess 0.1.1 (was 0.1.0) * opentelemetry-propagator-xray 0.22.3 (was 0.22.2) * opentelemetry-helpers-mysql 0.1.2 (was 0.1.1) * opentelemetry-helpers-sql-obfuscation 0.2.1 (was 0.2.0) * opentelemetry-instrumentation-all 0.69.1 (was 0.69.0) * opentelemetry-instrumentation-rails 0.33.1 (was 0.33.0) * opentelemetry-instrumentation-ethon 0.21.9 (was 0.21.8) * opentelemetry-instrumentation-excon 0.22.5 (was 0.22.4) * opentelemetry-instrumentation-faraday 0.24.7 (was 0.24.6) * opentelemetry-instrumentation-http 0.23.5 (was 0.23.4) * opentelemetry-instrumentation-http_client 0.22.8 (was 0.22.7) * opentelemetry-instrumentation-httpx 0.1.3 (was 0.1.2) * opentelemetry-instrumentation-net_http 0.22.8 (was 0.22.7) * opentelemetry-instrumentation-restclient 0.22.8 (was 0.22.7) * opentelemetry-instrumentation-pg 0.29.1 (was 0.29.0) * squash: Apply suggestions from code review --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- helpers/mysql/CHANGELOG.md | 4 ++++ helpers/mysql/lib/opentelemetry/helpers/mysql/version.rb | 2 +- helpers/sql-obfuscation/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/helpers/sql_obfuscation/version.rb | 2 +- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- instrumentation/ethon/CHANGELOG.md | 4 ++++ .../ethon/lib/opentelemetry/instrumentation/ethon/version.rb | 2 +- instrumentation/excon/CHANGELOG.md | 4 ++++ .../excon/lib/opentelemetry/instrumentation/excon/version.rb | 2 +- instrumentation/faraday/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/faraday/version.rb | 2 +- instrumentation/http/CHANGELOG.md | 4 ++++ .../http/lib/opentelemetry/instrumentation/http/version.rb | 2 +- instrumentation/http_client/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/http_client/version.rb | 2 +- instrumentation/httpx/CHANGELOG.md | 4 ++++ .../httpx/lib/opentelemetry/instrumentation/httpx/version.rb | 2 +- instrumentation/net_http/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/net/http/version.rb | 2 +- instrumentation/pg/CHANGELOG.md | 4 ++++ .../pg/lib/opentelemetry/instrumentation/pg/version.rb | 2 +- instrumentation/rails/CHANGELOG.md | 4 ++++ .../rails/lib/opentelemetry/instrumentation/rails/version.rb | 2 +- instrumentation/restclient/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/restclient/version.rb | 2 +- processor/baggage/CHANGELOG.md | 4 ++++ .../baggage/lib/opentelemetry/processor/baggage/version.rb | 2 +- propagator/ottrace/CHANGELOG.md | 4 ++++ .../ottrace/lib/opentelemetry/propagator/ottrace/version.rb | 2 +- propagator/vitess/CHANGELOG.md | 4 ++++ .../vitess/lib/opentelemetry/propagator/vitess/version.rb | 2 +- propagator/xray/CHANGELOG.md | 4 ++++ propagator/xray/lib/opentelemetry/propagator/xray/version.rb | 2 +- resources/azure/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/resource/detector/azure/version.rb | 2 +- resources/container/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/resource/detector/container/version.rb | 2 +- resources/google_cloud_platform/CHANGELOG.md | 4 ++++ .../resource/detector/google_cloud_platform/version.rb | 2 +- 40 files changed, 100 insertions(+), 20 deletions(-) diff --git a/helpers/mysql/CHANGELOG.md b/helpers/mysql/CHANGELOG.md index 1dc3c9f46..015ec9efe 100644 --- a/helpers/mysql/CHANGELOG.md +++ b/helpers/mysql/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-helpers-mysql +### v0.1.2 / 2024-11-26 + +* (No significant changes) + ### v0.1.1 / 2024-06-18 * FIXED: Relax otel common gem constraints diff --git a/helpers/mysql/lib/opentelemetry/helpers/mysql/version.rb b/helpers/mysql/lib/opentelemetry/helpers/mysql/version.rb index 2d047426c..25674f5b4 100644 --- a/helpers/mysql/lib/opentelemetry/helpers/mysql/version.rb +++ b/helpers/mysql/lib/opentelemetry/helpers/mysql/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Helpers module MySQL - VERSION = '0.1.1' + VERSION = '0.1.2' end end end diff --git a/helpers/sql-obfuscation/CHANGELOG.md b/helpers/sql-obfuscation/CHANGELOG.md index 610ebb127..d6807925b 100644 --- a/helpers/sql-obfuscation/CHANGELOG.md +++ b/helpers/sql-obfuscation/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-helpers-sql-obfuscation +### v0.2.1 / 2024-11-26 + +* (No significant changes) + ### v0.2.0 / 2024-09-12 - BREAKING CHANGE: Return message when sql is over the obfuscation limit. Fixes a bug where sql statements with prepended comments that hit the obfuscation limit would be sent raw. diff --git a/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation/version.rb b/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation/version.rb index 98cd6adc7..8e2229e41 100644 --- a/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation/version.rb +++ b/helpers/sql-obfuscation/lib/opentelemetry/helpers/sql_obfuscation/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Helpers module SqlObfuscation - VERSION = '0.2.0' + VERSION = '0.2.1' end end end diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 5fd7e693d..c993328b5 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.69.1 / 2024-11-26 + +* (No significant changes) + ### v0.69.0 / 2024-11-19 * ADDED: Use Semconv Naming For ActionPack diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 4ea9fa7d5..a54092fa1 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.69.0' + VERSION = '0.69.1' end end end diff --git a/instrumentation/ethon/CHANGELOG.md b/instrumentation/ethon/CHANGELOG.md index 09450c220..0d7bcf614 100644 --- a/instrumentation/ethon/CHANGELOG.md +++ b/instrumentation/ethon/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-ethon +### v0.21.9 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.21.8 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb index e55bab802..a86ac29c4 100644 --- a/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb +++ b/instrumentation/ethon/lib/opentelemetry/instrumentation/ethon/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Ethon - VERSION = '0.21.8' + VERSION = '0.21.9' end end end diff --git a/instrumentation/excon/CHANGELOG.md b/instrumentation/excon/CHANGELOG.md index a05f7b074..8117105f0 100644 --- a/instrumentation/excon/CHANGELOG.md +++ b/instrumentation/excon/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-excon +### v0.22.5 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.22.4 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/version.rb b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/version.rb index d34f4307a..23b670595 100644 --- a/instrumentation/excon/lib/opentelemetry/instrumentation/excon/version.rb +++ b/instrumentation/excon/lib/opentelemetry/instrumentation/excon/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Excon - VERSION = '0.22.4' + VERSION = '0.22.5' end end end diff --git a/instrumentation/faraday/CHANGELOG.md b/instrumentation/faraday/CHANGELOG.md index 03ad7653d..abf8abe04 100644 --- a/instrumentation/faraday/CHANGELOG.md +++ b/instrumentation/faraday/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-faraday +### v0.24.7 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.24.6 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb index c26f83106..00ade79dd 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Faraday - VERSION = '0.24.6' + VERSION = '0.24.7' end end end diff --git a/instrumentation/http/CHANGELOG.md b/instrumentation/http/CHANGELOG.md index 045e2760c..287c7540d 100644 --- a/instrumentation/http/CHANGELOG.md +++ b/instrumentation/http/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-http +### v0.23.5 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.23.4 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/http/lib/opentelemetry/instrumentation/http/version.rb b/instrumentation/http/lib/opentelemetry/instrumentation/http/version.rb index 78903f342..bd669d1a8 100644 --- a/instrumentation/http/lib/opentelemetry/instrumentation/http/version.rb +++ b/instrumentation/http/lib/opentelemetry/instrumentation/http/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module HTTP - VERSION = '0.23.4' + VERSION = '0.23.5' end end end diff --git a/instrumentation/http_client/CHANGELOG.md b/instrumentation/http_client/CHANGELOG.md index b6cb9a312..516db9ff6 100644 --- a/instrumentation/http_client/CHANGELOG.md +++ b/instrumentation/http_client/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-http_client +### v0.22.8 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.22.7 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/version.rb b/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/version.rb index ad0c41ed9..16a5a8048 100644 --- a/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/version.rb +++ b/instrumentation/http_client/lib/opentelemetry/instrumentation/http_client/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module HttpClient - VERSION = '0.22.7' + VERSION = '0.22.8' end end end diff --git a/instrumentation/httpx/CHANGELOG.md b/instrumentation/httpx/CHANGELOG.md index 74a508b72..f6f8df4bc 100644 --- a/instrumentation/httpx/CHANGELOG.md +++ b/instrumentation/httpx/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-httpx +### v0.1.3 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.1.2 / 2024-04-30 * FIXED: Bundler conflict warnings diff --git a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/version.rb b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/version.rb index d5df1b2da..74fba8315 100644 --- a/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/version.rb +++ b/instrumentation/httpx/lib/opentelemetry/instrumentation/httpx/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module HTTPX - VERSION = '0.1.2' + VERSION = '0.1.3' end end end diff --git a/instrumentation/net_http/CHANGELOG.md b/instrumentation/net_http/CHANGELOG.md index 19d87fbf7..66083ebfc 100644 --- a/instrumentation/net_http/CHANGELOG.md +++ b/instrumentation/net_http/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-net_http +### v0.22.8 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.22.7 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/version.rb b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/version.rb index 95d014f8e..03c75b775 100644 --- a/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/version.rb +++ b/instrumentation/net_http/lib/opentelemetry/instrumentation/net/http/version.rb @@ -8,7 +8,7 @@ module OpenTelemetry module Instrumentation module Net module HTTP - VERSION = '0.22.7' + VERSION = '0.22.8' end end end diff --git a/instrumentation/pg/CHANGELOG.md b/instrumentation/pg/CHANGELOG.md index 0d291618b..ff1b50bae 100644 --- a/instrumentation/pg/CHANGELOG.md +++ b/instrumentation/pg/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-pg +### v0.29.1 / 2024-11-26 + +* FIXED: Get correct table name if table name is quoted + ### v0.29.0 / 2024-09-12 - BREAKING CHANGE: Return message when sql is over the obfuscation limit. Fixes a bug where sql statements with prepended comments that hit the obfuscation limit would be sent raw. diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb index 23b0157b9..75556090c 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module PG - VERSION = '0.29.0' + VERSION = '0.29.1' end end end diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index bffd8095d..4a6df07a6 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.33.1 / 2024-11-26 + +* (No significant changes) + ### v0.33.0 / 2024-11-19 * ADDED: Use Semconv Naming For ActionPack diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index aa88ce3c9..068c57626 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.33.0' + VERSION = '0.33.1' end end end diff --git a/instrumentation/restclient/CHANGELOG.md b/instrumentation/restclient/CHANGELOG.md index b7200df1c..51de40309 100644 --- a/instrumentation/restclient/CHANGELOG.md +++ b/instrumentation/restclient/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-restclient +### v0.22.8 / 2024-11-26 + +* CHANGED: Performance Freeze all range objects #1222 + ### v0.22.7 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/version.rb b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/version.rb index 93baf3aa9..e7b30ba7d 100644 --- a/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/version.rb +++ b/instrumentation/restclient/lib/opentelemetry/instrumentation/restclient/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module RestClient - VERSION = '0.22.7' + VERSION = '0.22.8' end end end diff --git a/processor/baggage/CHANGELOG.md b/processor/baggage/CHANGELOG.md index 9b948ba54..31e57ff49 100644 --- a/processor/baggage/CHANGELOG.md +++ b/processor/baggage/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-processor-baggage +### v0.2.1 / 2024-11-26 + +* (No significant changes) + ### v0.2.0 / 2024-06-18 * BREAKING CHANGE: Add baggage key predicate func to baggage span processor diff --git a/processor/baggage/lib/opentelemetry/processor/baggage/version.rb b/processor/baggage/lib/opentelemetry/processor/baggage/version.rb index f3711695e..76af496d0 100644 --- a/processor/baggage/lib/opentelemetry/processor/baggage/version.rb +++ b/processor/baggage/lib/opentelemetry/processor/baggage/version.rb @@ -15,7 +15,7 @@ module OpenTelemetry module Processor # Namespace for OpenTelemetry Baggage processor module Baggage - VERSION = '0.2.0' + VERSION = '0.2.1' end end end diff --git a/propagator/ottrace/CHANGELOG.md b/propagator/ottrace/CHANGELOG.md index 14a9b28bf..19e2b373d 100644 --- a/propagator/ottrace/CHANGELOG.md +++ b/propagator/ottrace/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-propagator-ottrace +### v0.21.4 / 2024-11-26 + +* (No significant changes) + ### v0.21.3 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/propagator/ottrace/lib/opentelemetry/propagator/ottrace/version.rb b/propagator/ottrace/lib/opentelemetry/propagator/ottrace/version.rb index dc334fb3a..8454db7b2 100644 --- a/propagator/ottrace/lib/opentelemetry/propagator/ottrace/version.rb +++ b/propagator/ottrace/lib/opentelemetry/propagator/ottrace/version.rb @@ -15,7 +15,7 @@ module OpenTelemetry module Propagator # Namespace for OpenTelemetry OTTrace propagation module OTTrace - VERSION = '0.21.3' + VERSION = '0.21.4' end end end diff --git a/propagator/vitess/CHANGELOG.md b/propagator/vitess/CHANGELOG.md index 234f991cc..c9a3cf3ee 100644 --- a/propagator/vitess/CHANGELOG.md +++ b/propagator/vitess/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-propagator-vitess +### v0.1.1 / 2024-11-26 + +* (No significant changes) + ### v0.1.0 / 2024-02-08 Initial release. diff --git a/propagator/vitess/lib/opentelemetry/propagator/vitess/version.rb b/propagator/vitess/lib/opentelemetry/propagator/vitess/version.rb index 6e5616b3f..1109c710c 100644 --- a/propagator/vitess/lib/opentelemetry/propagator/vitess/version.rb +++ b/propagator/vitess/lib/opentelemetry/propagator/vitess/version.rb @@ -15,7 +15,7 @@ module OpenTelemetry module Propagator # Namespace for OpenTelemetry Vitess propagation module Vitess - VERSION = '0.1.0' + VERSION = '0.1.1' end end end diff --git a/propagator/xray/CHANGELOG.md b/propagator/xray/CHANGELOG.md index a326b17b8..778e20c2f 100644 --- a/propagator/xray/CHANGELOG.md +++ b/propagator/xray/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-propagator-xray +### v0.22.3 / 2024-11-26 + +* (No significant changes) + ### v0.22.2 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/propagator/xray/lib/opentelemetry/propagator/xray/version.rb b/propagator/xray/lib/opentelemetry/propagator/xray/version.rb index 32440b086..c13eabc7a 100644 --- a/propagator/xray/lib/opentelemetry/propagator/xray/version.rb +++ b/propagator/xray/lib/opentelemetry/propagator/xray/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Propagator module XRay - VERSION = '0.22.2' + VERSION = '0.22.3' end end end diff --git a/resources/azure/CHANGELOG.md b/resources/azure/CHANGELOG.md index b141c98a1..834d4c008 100644 --- a/resources/azure/CHANGELOG.md +++ b/resources/azure/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-resource-detector-azure +### v0.1.1 / 2024-11-26 + +* (No significant changes) + ### v0.1.0 / 2023-09-07 * Initial release. diff --git a/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb b/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb index 3a629249c..8d8c7a40f 100644 --- a/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb +++ b/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb @@ -8,7 +8,7 @@ module OpenTelemetry module Resource module Detector module Azure - VERSION = '0.1.0' + VERSION = '0.1.1' end end end diff --git a/resources/container/CHANGELOG.md b/resources/container/CHANGELOG.md index 107c1f7ab..dd254c38e 100644 --- a/resources/container/CHANGELOG.md +++ b/resources/container/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-resource-detector-container +### v0.1.2 / 2024-11-26 + +* (No significant changes) + ### v0.1.1 / 2023-08-03 * FIXED: Remove inline linter rules diff --git a/resources/container/lib/opentelemetry/resource/detector/container/version.rb b/resources/container/lib/opentelemetry/resource/detector/container/version.rb index 8a2af4488..996edab70 100644 --- a/resources/container/lib/opentelemetry/resource/detector/container/version.rb +++ b/resources/container/lib/opentelemetry/resource/detector/container/version.rb @@ -8,7 +8,7 @@ module OpenTelemetry module Resource module Detector module Container - VERSION = '0.1.1' + VERSION = '0.1.2' end end end diff --git a/resources/google_cloud_platform/CHANGELOG.md b/resources/google_cloud_platform/CHANGELOG.md index 8df9867ea..3119d739c 100644 --- a/resources/google_cloud_platform/CHANGELOG.md +++ b/resources/google_cloud_platform/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-resource-detector-google_cloud_platform +### v0.1.1 / 2024-11-26 + +* (No significant changes) + ### v0.1.0 / 2023-09-07 * Initial release. diff --git a/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb b/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb index a1ca07145..1570135e8 100644 --- a/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb +++ b/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb @@ -8,7 +8,7 @@ module OpenTelemetry module Resource module Detector module GoogleCloudPlatform - VERSION = '0.1.0' + VERSION = '0.1.1' end end end From f963bc95ddf55927e0a5dd0bb6e5ebfb09a85dc2 Mon Sep 17 00:00:00 2001 From: Sander Jans Date: Fri, 29 Nov 2024 16:34:29 +0100 Subject: [PATCH 15/32] ci: fix installation tests. (#1272) --- .../grpc/lib/opentelemetry/instrumentation/grpc/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb index 1549ed154..059aee827 100644 --- a/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb +++ b/instrumentation/grpc/lib/opentelemetry/instrumentation/grpc/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Grpc - VERSION = "0.1.3" + VERSION = '0.1.3' end end end From 2d072983e726ce184857a944511d9ccdff4f7ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ka=C5=BAmierczak?= Date: Mon, 2 Dec 2024 22:38:58 +0100 Subject: [PATCH 16/32] fix: include the gRPC gem in the installation tests (#1275) --- releases/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/Gemfile b/releases/Gemfile index c9cd38765..b47300078 100644 --- a/releases/Gemfile +++ b/releases/Gemfile @@ -12,6 +12,7 @@ gem 'excon' gem 'faraday' gem 'grape' gem 'graphql' +gem 'grpc' gem 'http' gem 'httpclient' gem 'koala' From 92d59eb33cf7fd58242cde22a7346960078ff29f Mon Sep 17 00:00:00 2001 From: Robb Kidd Date: Mon, 2 Dec 2024 16:53:13 -0500 Subject: [PATCH 17/32] fix: use AS::N subscriber for serialize events (#1075) * fix: use AS::N subscriber for serialize events The details for Context management (i.e. setting current span) are already handled by the OTel ActiveSupport instrumentation. Reuse the notifications subscriber here for ActiveModel serialization events. Reworked the example app into two: one Rails which works with the usual SDK configuration and one standalone (no Rails) to demonstrate that the subscription needs to be made after the SDK configuration is complete. If the subscription is created during instrumentation install, the subscription's tracer will be a NO-OP API tracer and won't produce spans. * update comments to reference Rails components consistently Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> * default to console exporter ... but leave OTLP exporter gem in dependencies so that a curious person can override without code changes to send to some OTLP receiver by setting the appropriate environment variables. * differentiate example app output from trace console output * fixup! default to console exporter * fixup! differentiate example app output from trace console output --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Co-authored-by: Ariel Valentin --- .../active_model_serializers/example/Gemfile | 9 --- .../example/active_model_serializers.rb | 26 ------- .../example/rails_app.rb | 74 +++++++++++++++++++ .../example/standalone.rb | 57 ++++++++++++++ .../active_model_serializers/event_handler.rb | 48 ------------ .../instrumentation.rb | 41 +++++++--- .../active_model_serializers/railtie.rb | 24 ++++++ ...mentation-active_model_serializers.gemspec | 1 + ...andler_test.rb => instrumentation_test.rb} | 9 ++- .../active_model_serializers_test.rb | 8 +- 10 files changed, 199 insertions(+), 98 deletions(-) delete mode 100644 instrumentation/active_model_serializers/example/Gemfile delete mode 100644 instrumentation/active_model_serializers/example/active_model_serializers.rb create mode 100644 instrumentation/active_model_serializers/example/rails_app.rb create mode 100644 instrumentation/active_model_serializers/example/standalone.rb delete mode 100644 instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/event_handler.rb create mode 100644 instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/railtie.rb rename instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/{event_handler_test.rb => instrumentation_test.rb} (91%) diff --git a/instrumentation/active_model_serializers/example/Gemfile b/instrumentation/active_model_serializers/example/Gemfile deleted file mode 100644 index f2e069165..000000000 --- a/instrumentation/active_model_serializers/example/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -gem 'active_model_serializers' -gem 'opentelemetry-api' -gem 'opentelemetry-common' -gem 'opentelemetry-instrumentation-active_model_serializers' -gem 'opentelemetry-sdk' diff --git a/instrumentation/active_model_serializers/example/active_model_serializers.rb b/instrumentation/active_model_serializers/example/active_model_serializers.rb deleted file mode 100644 index d145f240d..000000000 --- a/instrumentation/active_model_serializers/example/active_model_serializers.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright The OpenTelemetry Authors -# -# SPDX-License-Identifier: Apache-2.0 - -require 'rubygems' -require 'bundler/setup' - -Bundler.require - -OpenTelemetry::SDK.configure do |c| - c.use 'OpenTelemetry::Instrumentation::ActiveModelSerializers' -end - -class TestModel < ActiveModelSerializers::Model #:nodoc: - attr_accessor :name -end - -class TestModelSerializer < ActiveModel::Serializer #:nodoc: - attributes :name -end - -model = TestModel.new(name: 'test object') - -ActiveModelSerializers::SerializableResource.new(model).serializable_hash diff --git a/instrumentation/active_model_serializers/example/rails_app.rb b/instrumentation/active_model_serializers/example/rails_app.rb new file mode 100644 index 000000000..0ce69e762 --- /dev/null +++ b/instrumentation/active_model_serializers/example/rails_app.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/inline' + +gemfile(true) do + source 'https://rubygems.org' + + gem 'rails' + gem 'active_model_serializers' + gem 'opentelemetry-api' + gem 'opentelemetry-common' + gem 'opentelemetry-instrumentation-active_model_serializers', path: '../' + gem 'opentelemetry-sdk' + gem 'opentelemetry-exporter-otlp' +end + +ENV['OTEL_TRACES_EXPORTER'] ||= 'console' +OpenTelemetry::SDK.configure do |c| + c.service_name = 'active_model_serializers_example' + c.use 'OpenTelemetry::Instrumentation::ActiveModelSerializers' +end + +# no manual subscription trigger + +at_exit do + OpenTelemetry.tracer_provider.shutdown +end + +# TraceRequestApp is a minimal Rails application inspired by the Rails +# bug report template for Action Controller. +# The configuration is compatible with Rails 6.0 +class TraceRequestApp < Rails::Application + config.root = __dir__ + config.hosts << 'example.org' + credentials.secret_key_base = 'secret_key_base' + + config.eager_load = false + + config.logger = Logger.new($stdout) + Rails.logger = config.logger +end + +# Rails app initialization will pick up the instrumentation Railtie +# and subscribe to Active Support notifications +TraceRequestApp.initialize! + +ExampleAppTracer = OpenTelemetry.tracer_provider.tracer('example_app') + +class TestModel + include ActiveModel::API + include ActiveModel::Serialization + + attr_accessor :name + + def attributes + { 'name' => nil, + 'screaming_name' => nil } + end + + def screaming_name + ExampleAppTracer.in_span('screaming_name transform') do |span| + name.upcase + end + end +end + +model = TestModel.new(name: 'test object') +serialized_model = ActiveModelSerializers::SerializableResource.new(model).serializable_hash + +puts "\n*** The serialized object: #{serialized_model}" diff --git a/instrumentation/active_model_serializers/example/standalone.rb b/instrumentation/active_model_serializers/example/standalone.rb new file mode 100644 index 000000000..c39df1d72 --- /dev/null +++ b/instrumentation/active_model_serializers/example/standalone.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/inline' + +gemfile(true) do + source 'https://rubygems.org' + + gem 'active_model_serializers' + gem 'opentelemetry-api' + gem 'opentelemetry-common' + gem 'opentelemetry-instrumentation-active_model_serializers', path: '../' + gem 'opentelemetry-sdk' + gem 'opentelemetry-exporter-otlp' +end + +ENV['OTEL_TRACES_EXPORTER'] ||= 'console' +OpenTelemetry::SDK.configure do |c| + c.service_name = 'active_model_serializers_example' + c.use_all +end + +# without Rails and the Railtie automation, must manually trigger +# instrumentation subscription after SDK is configured +OpenTelemetry::Instrumentation::ActiveModelSerializers.subscribe + +at_exit do + OpenTelemetry.tracer_provider.shutdown +end + +ExampleAppTracer = OpenTelemetry.tracer_provider.tracer('example_app') + +class TestModel + include ActiveModel::API + include ActiveModel::Serialization + + attr_accessor :name + + def attributes + { 'name' => nil, + 'screaming_name' => nil } + end + + def screaming_name + ExampleAppTracer.in_span('screaming_name transform') do |span| + name.upcase + end + end +end + +model = TestModel.new(name: 'test object') +serialized_model = ActiveModelSerializers::SerializableResource.new(model).serializable_hash + +puts "\n*** The serialized object: #{serialized_model}" diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/event_handler.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/event_handler.rb deleted file mode 100644 index 81bcfd9bb..000000000 --- a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/event_handler.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright The OpenTelemetry Authors -# -# SPDX-License-Identifier: Apache-2.0 - -module OpenTelemetry - module Instrumentation - module ActiveModelSerializers - # Event handler singleton for ActiveModelSerializers - module EventHandler - extend self - - def handle(start_timestamp, end_timestamp, payload) - tracer.start_span(span_name(payload), - start_timestamp: start_timestamp, - attributes: build_attributes(payload), - kind: :internal) - .finish(end_timestamp: end_timestamp) - end - - protected - - def span_name(payload) - "#{demodulize(payload[:serializer].name)} render" - end - - def build_attributes(payload) - { - 'serializer.name' => payload[:serializer].name, - 'serializer.renderer' => 'active_model_serializers', - 'serializer.format' => payload[:adapter]&.class&.name || 'default' - } - end - - def tracer - ActiveModelSerializers::Instrumentation.instance.tracer - end - - def demodulize(string) - string = string.to_s - i = string.rindex('::') - i ? string[(i + 2)..-1] : string - end - end - end - end -end diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb index 453f9e092..8aa538860 100644 --- a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb +++ b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb @@ -4,16 +4,24 @@ # # SPDX-License-Identifier: Apache-2.0 +require 'opentelemetry-instrumentation-active_support' + module OpenTelemetry module Instrumentation module ActiveModelSerializers # Instrumentation class that detects and installs the ActiveModelSerializers instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base + # Minimum supported version of the `active_model_serializers` gem MINIMUM_VERSION = Gem::Version.new('0.10.0') + # ActiveSupport::Notification topics to which the instrumentation subscribes + SUBSCRIPTIONS = %w[ + render.active_model_serializers + ].freeze + install do |_config| + install_active_support_instrumenation require_dependencies - register_event_handler end present do @@ -24,24 +32,39 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base !defined?(::ActiveSupport::Notifications).nil? && gem_version >= MINIMUM_VERSION end + def subscribe + SUBSCRIPTIONS.each do |subscription_name| + OpenTelemetry.logger.debug("Subscribing to #{subscription_name} notifications with #{_tracer}") + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(_tracer, subscription_name, default_attribute_transformer) + end + end + private + def _tracer + self.class.instance.tracer + end + def gem_version Gem::Version.new(::ActiveModel::Serializer::VERSION) end - def require_dependencies - require_relative 'event_handler' + def install_active_support_instrumenation + OpenTelemetry::Instrumentation::ActiveSupport::Instrumentation.instance.install({}) end - def register_event_handler - ::ActiveSupport::Notifications.subscribe(event_name) do |_name, start, finish, _id, payload| - EventHandler.handle(start, finish, payload) - end + def require_dependencies + require_relative 'railtie' end - def event_name - 'render.active_model_serializers' + def default_attribute_transformer + lambda { |payload| + { + 'serializer.name' => payload[:serializer].name, + 'serializer.renderer' => 'active_model_serializers', + 'serializer.format' => payload[:adapter]&.class&.name || 'default' + } + } end end end diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/railtie.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/railtie.rb new file mode 100644 index 000000000..9c1482743 --- /dev/null +++ b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/railtie.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Instrumentation + module ActiveModelSerializers # :nodoc: + def self.subscribe + Instrumentation.instance.subscribe + end + + if defined?(::Rails::Railtie) + # This Railtie sets up subscriptions to relevant ActiveModelSerializers notifications + class Railtie < ::Rails::Railtie + config.after_initialize do + ::OpenTelemetry::Instrumentation::ActiveModelSerializers.subscribe + end + end + end + end + end +end 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 0982b584c..70cc4c0e5 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -26,6 +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-active_support', '>= 0.6.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'active_model_serializers', '>= 0.10.0' diff --git a/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/event_handler_test.rb b/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/instrumentation_test.rb similarity index 91% rename from instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/event_handler_test.rb rename to instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/instrumentation_test.rb index d029af5d5..a33ab9158 100644 --- a/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/event_handler_test.rb +++ b/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers/instrumentation_test.rb @@ -7,9 +7,9 @@ require_relative '../../../test_helper' # require instrumentation so we do not have to depend on the install hook being called -require_relative '../../../../lib/opentelemetry/instrumentation/active_model_serializers/event_handler' +require_relative '../../../../lib/opentelemetry/instrumentation/active_model_serializers/instrumentation' -describe OpenTelemetry::Instrumentation::ActiveModelSerializers::EventHandler do +describe OpenTelemetry::Instrumentation::ActiveModelSerializers::Instrumentation do let(:instrumentation) { OpenTelemetry::Instrumentation::ActiveModelSerializers::Instrumentation.instance } let(:exporter) { EXPORTER } let(:span) { exporter.finished_spans.first } @@ -17,6 +17,7 @@ before do instrumentation.install + instrumentation.subscribe exporter.reset # this is currently a noop but this will future proof the test @@ -38,7 +39,7 @@ _(exporter.finished_spans.size).must_equal 1 _(span).must_be_kind_of OpenTelemetry::SDK::Trace::SpanData - _(span.name).must_equal 'ModelSerializer render' + _(span.name).must_equal 'render.active_model_serializers' _(span.attributes['serializer.name']).must_equal 'TestHelper::ModelSerializer' _(span.attributes['serializer.renderer']).must_equal 'active_model_serializers' _(span.attributes['serializer.format']).must_equal 'ActiveModelSerializers::Adapter::Attributes' @@ -54,7 +55,7 @@ _(exporter.finished_spans.size).must_equal 1 _(span).must_be_kind_of OpenTelemetry::SDK::Trace::SpanData - _(span.name).must_equal 'ModelSerializer render' + _(span.name).must_equal 'render.active_model_serializers' _(span.attributes['serializer.name']).must_equal 'TestHelper::ModelSerializer' _(span.attributes['serializer.renderer']).must_equal 'active_model_serializers' _(span.attributes['serializer.format']).must_equal 'TestHelper::Model' diff --git a/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers_test.rb b/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers_test.rb index 36f97dfa6..80e5ef812 100644 --- a/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers_test.rb +++ b/instrumentation/active_model_serializers/test/opentelemetry/instrumentation/active_model_serializers_test.rb @@ -37,11 +37,15 @@ end end - describe 'install' do + describe 'subscribe' do + before do + instrumentation.subscribe + end + it 'subscribes to ActiveSupport::Notifications' do subscriptions = ActiveSupport::Notifications.notifier.instance_variable_get(:@string_subscribers) subscriptions = subscriptions['render.active_model_serializers'] - assert(subscriptions.detect { |s| s.is_a?(ActiveSupport::Notifications::Fanout::Subscribers::Timed) }) + assert(subscriptions.detect { |s| s.is_a?(ActiveSupport::Notifications::Fanout::Subscribers::Evented) }) end end end From 45d0a543e9558b2253b7888a81c55abddb7833ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:22:39 -0600 Subject: [PATCH 18/32] release: Release opentelemetry-instrumentation-active_model_serializers 0.20.3 (was 0.20.2) (#1287) * release: Release opentelemetry-instrumentation-active_model_serializers 0.20.3 (was 0.20.2) * docs: Update instrumentation/active_model_serializers/CHANGELOG.md * ci: Workaround for JRuby Fixes https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/1289 * squash: Make the release tooling happy --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin Co-authored-by: Ariel Valentin --- instrumentation/action_mailer/Gemfile | 3 +++ instrumentation/active_model_serializers/CHANGELOG.md | 4 ++++ .../instrumentation/active_model_serializers/version.rb | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/instrumentation/action_mailer/Gemfile b/instrumentation/action_mailer/Gemfile index 2ededff74..c0f09e6f4 100644 --- a/instrumentation/action_mailer/Gemfile +++ b/instrumentation/action_mailer/Gemfile @@ -11,4 +11,7 @@ gemspec group :test do gem 'opentelemetry-instrumentation-base', path: '../base' gem 'opentelemetry-instrumentation-active_support', path: '../active_support' + # Add jar-dependencies gem only if the Ruby runtime is JRuby + # https://github.com/jruby/jruby/issues/7262 + gem 'jar-dependencies', '0.4.1', platforms: :jruby end diff --git a/instrumentation/active_model_serializers/CHANGELOG.md b/instrumentation/active_model_serializers/CHANGELOG.md index d6843c0f4..a6fc0f7ca 100644 --- a/instrumentation/active_model_serializers/CHANGELOG.md +++ b/instrumentation/active_model_serializers/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_model_serializers +### v0.20.3 / 2024-12-04 + +* FIXED: Use ActiveSupport::Notifications subscriber to serialize events. + ### v0.20.2 / 2024-07-23 * DOCS: Add cspell to CI diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb index 85f4d84de..d0b95c470 100644 --- a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb +++ b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveModelSerializers - VERSION = '0.20.2' + VERSION = '0.20.3' end end end From 7bda424d9c1ab4c26be9cb9697558e7fcd1a3d3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:03:15 -0800 Subject: [PATCH 19/32] chore: bump ruby/setup-ruby from 1.202.0 to 1.203.0 (#1291) * chore: bump ruby/setup-ruby from 1.202.0 to 1.203.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.202.0 to 1.203.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/v1.202.0...v1.203.0) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: bump ruby/setup-ruby in test_gem --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kayla Reopelle --- .github/actions/test_gem/action.yml | 4 ++-- .github/workflows/installation-tests.yml | 2 +- .github/workflows/release-hook-on-closed.yml | 2 +- .github/workflows/release-hook-on-push.yml | 2 +- .github/workflows/release-perform.yml | 2 +- .github/workflows/release-please.yaml | 2 +- .github/workflows/release-request-weekly.yml | 2 +- .github/workflows/release-request.yml | 2 +- .github/workflows/release-retry.yml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/test_gem/action.yml b/.github/actions/test_gem/action.yml index d68836326..cf4350590 100644 --- a/.github/actions/test_gem/action.yml +++ b/.github/actions/test_gem/action.yml @@ -66,7 +66,7 @@ runs: # ...but not for appraisals, sadly. - name: Install Ruby ${{ inputs.ruby }} with dependencies if: "${{ steps.setup.outputs.appraisals == 'false' }}" - uses: ruby/setup-ruby@v1.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: "${{ inputs.ruby }}" working-directory: "${{ steps.setup.outputs.gem_dir }}" @@ -77,7 +77,7 @@ runs: # If we're using appraisals, do it all manually. - name: Install Ruby ${{ inputs.ruby }} without dependencies if: "${{ steps.setup.outputs.appraisals == 'true' }}" - uses: ruby/setup-ruby@v1.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: "${{ inputs.ruby }}" bundler: "latest" diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index 3135ab25e..dca91e495 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 # ATTENTION: Dependabot does not know how to update shared actions file. # If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml - - uses: ruby/setup-ruby@v1.202.0 + - uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ matrix.ruby-version }} - name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}" diff --git a/.github/workflows/release-hook-on-closed.yml b/.github/workflows/release-hook-on-closed.yml index e75031e80..317b713a8 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.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-hook-on-push.yml b/.github/workflows/release-hook-on-push.yml index 956938e3e..33781582a 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.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index dd1a72511..fec719443 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.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index b42ab8153..3b0197b8d 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -50,7 +50,7 @@ jobs: chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - - uses: ruby/setup-ruby@v1.202.0 + - uses: ruby/setup-ruby@v1.203.0 with: ruby-version: "3.0" bundler: latest diff --git a/.github/workflows/release-request-weekly.yml b/.github/workflows/release-request-weekly.yml index d230a0279..f76a5118e 100644 --- a/.github/workflows/release-request-weekly.yml +++ b/.github/workflows/release-request-weekly.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index e5520216a..9d05b3d6f 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.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index fd1e81b46..0066ea7e2 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.202.0 + uses: ruby/setup-ruby@v1.203.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo From 38e26a91b00ff820c8fdc490339265dbcef7d474 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> Date: Thu, 12 Dec 2024 07:42:45 -0800 Subject: [PATCH 20/32] chore: bump rubocop to 1.69.1 (#1302) --- .instrumentation_generator/templates/gemspec.tt | 2 +- Gemfile | 2 +- helpers/mysql/opentelemetry-helpers-mysql.gemspec | 2 +- .../opentelemetry-helpers-sql-obfuscation.gemspec | 2 +- .../opentelemetry-instrumentation-action_mailer.gemspec | 2 +- .../opentelemetry-instrumentation-action_pack.gemspec | 2 +- .../opentelemetry-instrumentation-action_view.gemspec | 2 +- .../active_job/opentelemetry-instrumentation-active_job.gemspec | 2 +- ...entelemetry-instrumentation-active_model_serializers.gemspec | 2 +- .../opentelemetry-instrumentation-active_record.gemspec | 2 +- .../opentelemetry-instrumentation-active_support.gemspec | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- .../aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec | 2 +- .../aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec | 2 +- instrumentation/base/opentelemetry-instrumentation-base.gemspec | 2 +- .../bunny/opentelemetry-instrumentation-bunny.gemspec | 2 +- .../opentelemetry-instrumentation-concurrent_ruby.gemspec | 2 +- .../dalli/opentelemetry-instrumentation-dalli.gemspec | 2 +- .../opentelemetry-instrumentation-delayed_job.gemspec | 2 +- .../ethon/opentelemetry-instrumentation-ethon.gemspec | 2 +- .../excon/opentelemetry-instrumentation-excon.gemspec | 2 +- .../faraday/opentelemetry-instrumentation-faraday.gemspec | 2 +- .../grape/opentelemetry-instrumentation-grape.gemspec | 2 +- .../graphql/opentelemetry-instrumentation-graphql.gemspec | 2 +- instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec | 2 +- instrumentation/http/opentelemetry-instrumentation-http.gemspec | 2 +- .../opentelemetry-instrumentation-http_client.gemspec | 2 +- .../httpx/opentelemetry-instrumentation-httpx.gemspec | 2 +- .../koala/opentelemetry-instrumentation-koala.gemspec | 2 +- instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec | 2 +- .../mongo/opentelemetry-instrumentation-mongo.gemspec | 2 +- .../mysql2/opentelemetry-instrumentation-mysql2.gemspec | 2 +- .../net_http/opentelemetry-instrumentation-net_http.gemspec | 2 +- instrumentation/pg/opentelemetry-instrumentation-pg.gemspec | 2 +- instrumentation/que/opentelemetry-instrumentation-que.gemspec | 2 +- .../racecar/opentelemetry-instrumentation-racecar.gemspec | 2 +- instrumentation/rack/opentelemetry-instrumentation-rack.gemspec | 2 +- .../rails/opentelemetry-instrumentation-rails.gemspec | 2 +- instrumentation/rake/opentelemetry-instrumentation-rake.gemspec | 2 +- .../rdkafka/opentelemetry-instrumentation-rdkafka.gemspec | 2 +- .../redis/opentelemetry-instrumentation-redis.gemspec | 2 +- .../resque/opentelemetry-instrumentation-resque.gemspec | 2 +- .../restclient/opentelemetry-instrumentation-restclient.gemspec | 2 +- .../rspec/opentelemetry-instrumentation-rspec.gemspec | 2 +- .../ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec | 2 +- .../sidekiq/opentelemetry-instrumentation-sidekiq.gemspec | 2 +- .../sinatra/opentelemetry-instrumentation-sinatra.gemspec | 2 +- .../trilogy/opentelemetry-instrumentation-trilogy.gemspec | 2 +- processor/baggage/opentelemetry-processor-baggage.gemspec | 2 +- propagator/ottrace/opentelemetry-propagator-ottrace.gemspec | 2 +- propagator/vitess/opentelemetry-propagator-vitess.gemspec | 2 +- propagator/xray/opentelemetry-propagator-xray.gemspec | 2 +- resources/azure/opentelemetry-resource-detector-azure.gemspec | 2 +- .../container/opentelemetry-resource-detector-container.gemspec | 2 +- ...pentelemetry-resource-detector-google_cloud_platform.gemspec | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.instrumentation_generator/templates/gemspec.tt b/.instrumentation_generator/templates/gemspec.tt index fdc83c9e2..fd3ad027e 100644 --- a/.instrumentation_generator/templates/gemspec.tt +++ b/.instrumentation_generator/templates/gemspec.tt @@ -34,7 +34,7 @@ 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', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.66.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.19.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/Gemfile b/Gemfile index b68ccbbeb..1a837b952 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,5 @@ source 'https://rubygems.org' gem 'rake', '~> 13.0' -gem 'rubocop', '~> 1.68.0' +gem 'rubocop', '~> 1.69.1' gem 'rubocop-performance', '~> 1.23.0' diff --git a/helpers/mysql/opentelemetry-helpers-mysql.gemspec b/helpers/mysql/opentelemetry-helpers-mysql.gemspec index f18fff675..563f99e64 100644 --- a/helpers/mysql/opentelemetry-helpers-mysql.gemspec +++ b/helpers/mysql/opentelemetry-helpers-mysql.gemspec @@ -32,7 +32,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec index eefb5dae9..761176e71 100644 --- a/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec +++ b/helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec @@ -31,7 +31,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec index 5d4ee2bcc..636687c4c 100644 --- a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec +++ b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index f0028d35b..1211feb2a 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index a3dafc907..98e7873d8 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -36,7 +36,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 18da7cde0..693b8e833 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' 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 70cc4c0e5..6d5ad555e 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index 1e6809b81..6433e0f18 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index 8c5ad3aa0..ceae57e07 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rails', '>= 6.1' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 6b592127f..a90fd983e 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -66,7 +66,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec index 049911d7c..deab2081b 100644 --- a/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec +++ b/instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index 3648bec85..0cedf557a 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index 4debdb6fb..9bcca6200 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index e7dab3aff..2f390c08e 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index 1f71f3fde..3a09f1785 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index 6803d287c..4ae8b6763 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index c92d19f0b..6dbc347b0 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index 5dfa222ae..83f4bfa5a 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 3373aa8a2..903bae2ea 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index c74bfc26b..936486225 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 3ee053af9..89aa0b8c1 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -38,7 +38,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index cbce4c52a..5fb0ea650 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index a7b95ea1e..79725c3b8 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -35,7 +35,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index cee534cc9..e2fcb50b1 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index 99c056b80..2b5ec7a98 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec index d285bad81..cce193a61 100644 --- a/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec +++ b/instrumentation/httpx/opentelemetry-instrumentation-httpx.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index 7e95f6392..e54d8f343 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 535a9994e..44d440210 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index b1831edd6..71e98758c 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 31d521db1..83aeef476 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -37,7 +37,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index e557f72a4..159653a0c 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0.1' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index dd985d2e0..630dcfd10 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -37,7 +37,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' 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 d9599515d..0ec9df0f5 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index 842597e02..1c0fd74d0 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 5f04dbca3..efeb30a85 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index c9243add0..25bfa0583 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rack-test', '~> 2.1.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 3c6825d72..5ab973781 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index 72bf2056c..26e3e3c5e 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index 7e00c7a55..ef8ebd775 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index 89cc03eaf..a23525b05 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index dadfa6d14..f23f6c6f8 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -33,7 +33,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index f7129e984..0651886e5 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec index 2e8bbfba5..0c67950a0 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index 0e63e3800..26aae6e4d 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index 0f77e5b23..8f14e9ee9 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rack-test', '~> 2.1' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index dca960cb2..25e4ee873 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -41,7 +41,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/processor/baggage/opentelemetry-processor-baggage.gemspec b/processor/baggage/opentelemetry-processor-baggage.gemspec index f625e91b1..234b1c277 100644 --- a/processor/baggage/opentelemetry-processor-baggage.gemspec +++ b/processor/baggage/opentelemetry-processor-baggage.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index 9417ed10b..9b7646c69 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -28,7 +28,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/vitess/opentelemetry-propagator-vitess.gemspec b/propagator/vitess/opentelemetry-propagator-vitess.gemspec index c2300ebbf..8e028b930 100644 --- a/propagator/vitess/opentelemetry-propagator-vitess.gemspec +++ b/propagator/vitess/opentelemetry-propagator-vitess.gemspec @@ -29,7 +29,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index 8305dac7a..0dd55e75c 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -31,7 +31,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec index 005742c27..69117f6eb 100644 --- a/resources/azure/opentelemetry-resource-detector-azure.gemspec +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -30,7 +30,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.24.0' diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index 83b5438bf..6d254432d 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -30,7 +30,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec index acedf0e06..35ca91e45 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,7 +31,7 @@ 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.68.0' + spec.add_development_dependency 'rubocop', '~> 1.69.1' spec.add_development_dependency 'rubocop-performance', '~> 1.23.0' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.24.0' From 8def74bdce00565fc9805eb601f74763cebc224e Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Thu, 12 Dec 2024 09:49:42 -0600 Subject: [PATCH 21/32] fix: Share Faraday Attrs with Adapter Spans (#1266) The Faraday gem has additional http attributes that are sometimes missing or difficult to derive in Adapter instrumentations. --- instrumentation/faraday/Appraisals | 14 +++++----- .../faraday/middlewares/tracer_middleware.rb | 27 ++++++++++--------- .../middlewares/tracer_middleware_test.rb | 19 ++++++++++--- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/instrumentation/faraday/Appraisals b/instrumentation/faraday/Appraisals index 6d5e0f26e..0c19136a4 100644 --- a/instrumentation/faraday/Appraisals +++ b/instrumentation/faraday/Appraisals @@ -4,14 +4,12 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'faraday-0.17' do - gem 'faraday', '~> 0.17.6' +%w[0.17.6 1.0 2.0].each do |version| + appraise "faraday-#{version}" do + gem 'faraday', "~> #{version}" + end end -appraise 'faraday-1.x' do - gem 'faraday', '~> 1.0' -end - -appraise 'faraday-2.x' do - gem 'faraday', '~> 2.0' +appraise 'faraday-latest' do + gem 'faraday' end diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb index 981e44e26..26904ee8d 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware.rb @@ -33,31 +33,34 @@ def call(env) attributes = span_creation_attributes( http_method: http_method, url: env.url, config: config ) - tracer.in_span( - "HTTP #{http_method}", attributes: attributes, kind: config.fetch(:span_kind) - ) do |span| - OpenTelemetry.propagation.inject(env.request_headers) - app.call(env).on_complete { |resp| trace_response(span, resp.status) } - rescue ::Faraday::Error => e - trace_response(span, e.response[:status]) if e.response + OpenTelemetry::Common::HTTP::ClientContext.with_attributes(attributes) do |attrs, _| + tracer.in_span( + "HTTP #{http_method}", attributes: attrs, kind: config.fetch(:span_kind) + ) do |span| + OpenTelemetry.propagation.inject(env.request_headers) - raise + app.call(env).on_complete { |resp| trace_response(span, resp.status) } + rescue ::Faraday::Error => e + trace_response(span, e.response[:status]) if e.response + + raise + end end end private def span_creation_attributes(http_method:, url:, config:) - instrumentation_attrs = { + attrs = { 'http.method' => http_method, 'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url.to_s), 'faraday.adapter.name' => app.class.name } - instrumentation_attrs['net.peer.name'] = url.host if url.host - instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service] + attrs['net.peer.name'] = url.host if url.host + attrs['peer.service'] = config[:peer_service] if config[:peer_service] - instrumentation_attrs.merge!( + attrs.merge!( OpenTelemetry::Common::HTTP::ClientContext.attributes ) end diff --git a/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb b/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb index 8a0def73c..67aab661f 100644 --- a/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb +++ b/instrumentation/faraday/test/opentelemetry/instrumentation/faraday/middlewares/tracer_middleware_test.rb @@ -20,6 +20,7 @@ stub.get('/success') { |_| [200, {}, 'OK'] } stub.get('/failure') { |_| [500, {}, 'OK'] } stub.get('/not_found') { |_| [404, {}, 'OK'] } + stub.get('/show-shared-attributes') { |_| [200, {}, OpenTelemetry::Common::HTTP::ClientContext.attributes.to_json] } end end end @@ -31,6 +32,8 @@ @orig_propagation = OpenTelemetry.propagation propagator = OpenTelemetry::Trace::Propagation::TraceContext.text_map_propagator OpenTelemetry.propagation = propagator + instrumentation.instance_variable_set(:@installed, false) + instrumentation.install end after do @@ -38,10 +41,6 @@ end describe 'first span' do - before do - instrumentation.install - end - describe 'given a client with a base url' do it 'has http 200 attributes' do response = client.get('/success') @@ -101,6 +100,18 @@ ) end + it 'ammends attributes to client context' do + response = client.get('/show-shared-attributes') + shared_attributes = JSON.parse(response.body) + expected_attributes = { + 'http.method' => 'GET', 'http.url' => 'http://example.com/show-shared-attributes', + 'faraday.adapter.name' => 'Faraday::Adapter::Test', + 'net.peer.name' => 'example.com' + } + + _(shared_attributes).must_equal expected_attributes + end + it 'accepts peer service name from config' do instrumentation.instance_variable_set(:@installed, false) instrumentation.install(peer_service: 'example:faraday') From 743796d425de3aa6c13fd89dffb3ad869106d261 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:31:48 -0600 Subject: [PATCH 22/32] release: Release opentelemetry-instrumentation-faraday 0.24.8 (was 0.24.7) (#1306) * release: Release opentelemetry-instrumentation-faraday 0.24.8 (was 0.24.7) * ci: Force --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/faraday/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/faraday/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/instrumentation/faraday/CHANGELOG.md b/instrumentation/faraday/CHANGELOG.md index abf8abe04..c2517a806 100644 --- a/instrumentation/faraday/CHANGELOG.md +++ b/instrumentation/faraday/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-faraday +### v0.24.8 / 2024-12-17 + +* FIXED: Share Faraday Attrs with Adapter Spans + ### v0.24.7 / 2024-11-26 * CHANGED: Performance Freeze all range objects #1222 diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb index 00ade79dd..5daca1076 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Faraday - VERSION = '0.24.7' + VERSION = '0.24.8' end end end From e3975ae11779779757fa78b6c701b3435bb24b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ka=C5=BAmierczak?= Date: Thu, 19 Dec 2024 00:19:42 +0100 Subject: [PATCH 23/32] fix: loosen the koala pin to ~> 3.0 (#1309) fix: loosen koala pin to ~> 3.0 --- instrumentation/koala/Appraisals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/koala/Appraisals b/instrumentation/koala/Appraisals index edbf0003b..b22f9b684 100644 --- a/instrumentation/koala/Appraisals +++ b/instrumentation/koala/Appraisals @@ -4,6 +4,6 @@ # # SPDX-License-Identifier: Apache-2.0 appraise 'koala-3' do - gem 'koala', '~> 3.0.0' + gem 'koala', '~> 3.0' gem 'faraday', '< 2.0' end From e745deb683add11358ae3418c609236fe9d5f3b6 Mon Sep 17 00:00:00 2001 From: Erich Soares Machado Date: Thu, 19 Dec 2024 07:11:52 -0500 Subject: [PATCH 24/32] feat: Enable support for `Regexp` patterns when subscribing to Active Support's instrumentation Events (#1296) --- .../active_support/span_subscriber.rb | 13 +- .../active_support/span_subscriber_test.rb | 290 ++++++++++++------ 2 files changed, 207 insertions(+), 96 deletions(-) diff --git a/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/span_subscriber.rb b/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/span_subscriber.rb index 66f1f96a2..2f7df00db 100644 --- a/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/span_subscriber.rb +++ b/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/span_subscriber.rb @@ -27,7 +27,7 @@ def self.subscribe( span_name_formatter: nil ) subscriber = OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new( - name: pattern, + pattern: pattern, tracer: tracer, notification_payload_transform: notification_payload_transform, disallowed_notification_payload_keys: disallowed_notification_payload_keys, @@ -64,17 +64,18 @@ class SpanSubscriber ALWAYS_VALID_PAYLOAD_TYPES = [TrueClass, FalseClass, String, Numeric, Symbol].freeze # rubocop:disable Metrics/ParameterLists - def initialize(name:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil) - @span_name = safe_span_name_for(span_name_formatter, name).dup.freeze + def initialize(pattern:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil) + @pattern = pattern @tracer = tracer @notification_payload_transform = notification_payload_transform @disallowed_notification_payload_keys = Array(disallowed_notification_payload_keys) @kind = kind || :internal + @span_name_formatter = span_name_formatter end # rubocop:enable Metrics/ParameterLists def start(name, id, payload) - span = @tracer.start_span(@span_name, kind: @kind) + span = @tracer.start_span(safe_span_name_for(name), kind: @kind) token = OpenTelemetry::Context.attach( OpenTelemetry::Trace.context_with_span(span) ) @@ -140,8 +141,8 @@ def sanitized_value(value) # Helper method to try an shield the span name formatter from errors # # It wraps the user supplied formatter in a rescue block and returns the original name if a StandardError is raised by the formatter - def safe_span_name_for(span_name_formatter, name) - span_name_formatter&.call(name) || name + def safe_span_name_for(name) + @span_name_formatter&.call(name) || name rescue StandardError => e OpenTelemetry.handle_error(exception: e, message: 'Error calling span_name_formatter. Using default span name.') name diff --git a/instrumentation/active_support/test/opentelemetry/instrumentation/active_support/span_subscriber_test.rb b/instrumentation/active_support/test/opentelemetry/instrumentation/active_support/span_subscriber_test.rb index f42141afb..87f562362 100644 --- a/instrumentation/active_support/test/opentelemetry/instrumentation/active_support/span_subscriber_test.rb +++ b/instrumentation/active_support/test/opentelemetry/instrumentation/active_support/span_subscriber_test.rb @@ -15,7 +15,7 @@ let(:notification_name) { 'bar.foo' } let(:subscriber) do OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new( - name: notification_name, + pattern: notification_name, tracer: tracer, kind: span_kind ) @@ -35,14 +35,9 @@ def finish(name, id, payload) instrumentation.install({}) end - it 'memoizes the span name' do - span, = subscriber.start('oh.hai', 'abc', {}) - _(span.name).must_equal(notification_name) - end - it 'uses the provided tracer' do subscriber = OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new( - name: 'oh.hai', + pattern: 'oh.hai', tracer: OpenTelemetry.tracer_provider.tracer('foo') ) span, = subscriber.start('oh.hai', 'abc', {}) @@ -116,7 +111,7 @@ def finish(name, id, payload) describe 'instrumentation option - disallowed_notification_payload_keys' do let(:subscriber) do OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new( - name: notification_name, + pattern: notification_name, tracer: tracer, notification_payload_transform: nil, disallowed_notification_payload_keys: [:foo] @@ -154,7 +149,7 @@ def finish(name, id, payload) let(:transformer_proc) { ->(v) { v.transform_values { 'optimus prime' } } } let(:subscriber) do OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new( - name: notification_name, + pattern: notification_name, tracer: tracer, notification_payload_transform: transformer_proc, disallowed_notification_payload_keys: [:foo] @@ -205,123 +200,238 @@ def finish(name, id, payload) end describe 'instrument' do - before do - ActiveSupport::Notifications.unsubscribe(notification_name) + after do + ActiveSupport::Notifications.notifier.listeners_for(notification_name).each do |listener| + ActiveSupport::Notifications.unsubscribe(listener) + end end - it 'does not trace an event by default' do - ActiveSupport::Notifications.subscribe(notification_name) do - # pass + describe 'when subscribing to events directly' do + it 'does not trace an event by default' do + ActiveSupport::Notifications.subscribe(notification_name) do + # pass + end + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + _(last_span).must_be_nil end - ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - _(last_span).must_be_nil - end - it 'traces an event when a span subscriber is used' do - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) - ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + it 'traces an event when a span subscriber is used' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - _(last_span).wont_be_nil - _(last_span.name).must_equal(notification_name) - _(last_span.attributes['extra']).must_equal('context') - _(last_span.kind).must_equal(:internal) - end + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + _(last_span.kind).must_equal(:internal) + end - describe 'when using a custom span name formatter' do - describe 'when using the LEGACY_NAME_FORMATTER' do - let(:span_name_formatter) { OpenTelemetry::Instrumentation::ActiveSupport::LEGACY_NAME_FORMATTER } - it 'uses the user supplied formatter' do - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: span_name_formatter) - ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + describe 'when using a custom span name formatter' do + describe 'when using the LEGACY_NAME_FORMATTER' do + let(:span_name_formatter) { OpenTelemetry::Instrumentation::ActiveSupport::LEGACY_NAME_FORMATTER } + it 'uses the user supplied formatter' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: span_name_formatter) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal('foo bar') + _(last_span.attributes['extra']).must_equal('context') + end + end + + describe 'when using a custom formatter' do + let(:span_name_formatter) { ->(name) { "custom.#{name}" } } - _(last_span).wont_be_nil - _(last_span.name).must_equal('foo bar') - _(last_span.attributes['extra']).must_equal('context') + it 'uses the user supplied formatter' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: span_name_formatter) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal('custom.bar.foo') + _(last_span.attributes['extra']).must_equal('context') + end end - end - describe 'when using a custom formatter' do - let(:span_name_formatter) { ->(name) { "custom.#{name}" } } + describe 'when using a invalid formatter' do + it 'defaults to the notification name' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: ->(_) {}) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - it 'uses the user supplied formatter' do - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: span_name_formatter) - ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end + end - _(last_span).wont_be_nil - _(last_span.name).must_equal('custom.bar.foo') - _(last_span.attributes['extra']).must_equal('context') + describe 'when using a unstable formatter' do + it 'defaults to the notification name' do + allow(OpenTelemetry).to receive(:handle_error).with(exception: RuntimeError, message: String) + + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: ->(_) { raise 'boom' }) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end end end - describe 'when using a invalid formatter' do - it 'defaults to the notification name' do - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: ->(_) {}) + it 'finishes spans even when block subscribers blow up' do + ActiveSupport::Notifications.subscribe(notification_name) { raise 'boom' } + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) + + expect do ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + end.must_raise RuntimeError - _(last_span).wont_be_nil - _(last_span.name).must_equal(notification_name) - _(last_span.attributes['extra']).must_equal('context') - end + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') end - describe 'when using a unstable formatter' do - it 'defaults to the notification name' do - allow(OpenTelemetry).to receive(:handle_error).with(exception: RuntimeError, message: String) + it 'finishes spans even when complex subscribers blow up' do + ActiveSupport::Notifications.subscribe(notification_name, CrashingEndSubscriber.new) + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name, nil, nil, span_name_formatter: ->(_) { raise 'boom' }) + expect do ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + end.must_raise RuntimeError - _(last_span).wont_be_nil - _(last_span.name).must_equal(notification_name) - _(last_span.attributes['extra']).must_equal('context') - end + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') end - end - it 'finishes spans even when block subscribers blow up' do - ActiveSupport::Notifications.subscribe(notification_name) { raise 'boom' } - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) + it 'supports unsubscribe' do + obj = OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) + ActiveSupport::Notifications.unsubscribe(obj) - expect do ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - end.must_raise RuntimeError - _(last_span).wont_be_nil - _(last_span.name).must_equal(notification_name) - _(last_span.attributes['extra']).must_equal('context') + _(obj.class).must_equal(ActiveSupport::Notifications::Fanout::Subscribers::Evented) + _(last_span).must_be_nil + end + + it 'supports setting the span kind' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, 'bar.foo', nil, [], kind: :client) + ActiveSupport::Notifications.instrument('bar.foo', extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal('bar.foo') + _(last_span.attributes['extra']).must_equal('context') + _(last_span.kind).must_equal(:client) + end end - it 'finishes spans even when complex subscribers blow up' do - ActiveSupport::Notifications.subscribe(notification_name, CrashingEndSubscriber.new) - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) + describe 'when subscribing to events matching a regular expression' do + let(:notification_pattern) { /.*\.foo/ } - expect do + it 'does not trace an event by default' do + ActiveSupport::Notifications.subscribe(notification_pattern) do + # pass + end ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - end.must_raise RuntimeError + _(last_span).must_be_nil + end - _(last_span).wont_be_nil - _(last_span.name).must_equal(notification_name) - _(last_span.attributes['extra']).must_equal('context') - end + it 'traces an event when a span subscriber is used' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - it 'supports unsubscribe' do - obj = OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_name) - ActiveSupport::Notifications.unsubscribe(obj) + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + _(last_span.kind).must_equal(:internal) + end - ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + describe 'when using a custom span name formatter' do + describe 'when using the LEGACY_NAME_FORMATTER' do + let(:span_name_formatter) { OpenTelemetry::Instrumentation::ActiveSupport::LEGACY_NAME_FORMATTER } + it 'uses the user supplied formatter' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern, nil, nil, span_name_formatter: span_name_formatter) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal('foo bar') + _(last_span.attributes['extra']).must_equal('context') + end + end - _(obj.class).must_equal(ActiveSupport::Notifications::Fanout::Subscribers::Evented) - _(last_span).must_be_nil - end + describe 'when using a custom formatter' do + let(:span_name_formatter) { ->(name) { "custom.#{name}" } } - it 'supports setting the span kind' do - OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, 'bar.foo', nil, [], kind: :client) - ActiveSupport::Notifications.instrument('bar.foo', extra: 'context') + it 'uses the user supplied formatter' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern, nil, nil, span_name_formatter: span_name_formatter) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') - _(last_span).wont_be_nil - _(last_span.name).must_equal('bar.foo') - _(last_span.attributes['extra']).must_equal('context') - _(last_span.kind).must_equal(:client) + _(last_span).wont_be_nil + _(last_span.name).must_equal('custom.bar.foo') + _(last_span.attributes['extra']).must_equal('context') + end + end + + describe 'when using a invalid formatter' do + it 'defaults to the notification name' do + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern, nil, nil, span_name_formatter: ->(_) {}) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end + end + + describe 'when using a unstable formatter' do + it 'defaults to the notification name' do + allow(OpenTelemetry).to receive(:handle_error).with(exception: RuntimeError, message: String) + + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern, nil, nil, span_name_formatter: ->(_) { raise 'boom' }) + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end + end + end + + it 'finishes spans even when block subscribers blow up' do + # This scenario cannot be exercised reliably on Active Support < 7.0 since the #finish method + # will never be called by the notifier if another subscriber raises an error. + # + # See this PR for additional details: https://github.com/rails/rails/pull/43282 + skip 'Notifications will be broken in this scenario on Active Support < 7.0' if ActiveSupport.version < Gem::Version.new('7.0') + + ActiveSupport::Notifications.subscribe(notification_pattern) { raise 'boom' } + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern) + + expect do + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + end.must_raise RuntimeError + + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end + + it 'finishes spans even when complex subscribers blow up' do + # This scenario cannot be exercised reliably on Active Support < 7.0 since the #finish method + # will never be called by the notifier if another subscriber raises an error. + # + # See this PR for additional details: https://github.com/rails/rails/pull/43282 + skip 'Notifications will be broken in this scenario on Active Support < 7.0' if ActiveSupport.version < Gem::Version.new('7.0') + + ActiveSupport::Notifications.subscribe(notification_pattern, CrashingEndSubscriber.new) + OpenTelemetry::Instrumentation::ActiveSupport.subscribe(tracer, notification_pattern) + + expect do + ActiveSupport::Notifications.instrument(notification_name, extra: 'context') + end.must_raise RuntimeError + + _(last_span).wont_be_nil + _(last_span.name).must_equal(notification_name) + _(last_span.attributes['extra']).must_equal('context') + end end end end From b1ea8049422975c76470a623b789ef53f72dc350 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:39:34 -0600 Subject: [PATCH 25/32] release: Release 6 gems (#1311) * release: Release 6 gems * opentelemetry-instrumentation-rails 0.33.2 (was 0.33.1) * opentelemetry-instrumentation-active_support 0.7.0 (was 0.6.0) * opentelemetry-instrumentation-active_model_serializers 0.20.4 (was 0.20.3) * opentelemetry-instrumentation-action_mailer 0.2.1 (was 0.2.0) * opentelemetry-instrumentation-action_view 0.7.4 (was 0.7.3) * opentelemetry-instrumentation-all 0.69.2 (was 0.69.1) --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/action_mailer/CHANGELOG.md | 4 +++ .../instrumentation/action_mailer/version.rb | 2 +- ...etry-instrumentation-action_mailer.gemspec | 2 +- instrumentation/action_view/CHANGELOG.md | 32 +++++++++++-------- .../instrumentation/action_view/version.rb | 2 +- ...emetry-instrumentation-action_view.gemspec | 2 +- .../active_model_serializers/CHANGELOG.md | 18 +++++++---- .../active_model_serializers/Gemfile | 1 + .../active_model_serializers/version.rb | 2 +- ...mentation-active_model_serializers.gemspec | 2 +- instrumentation/active_support/CHANGELOG.md | 4 +++ .../instrumentation/active_support/version.rb | 2 +- instrumentation/all/CHANGELOG.md | 4 +++ .../instrumentation/all/version.rb | 2 +- .../opentelemetry-instrumentation-all.gemspec | 4 +-- instrumentation/rails/CHANGELOG.md | 4 +++ .../instrumentation/rails/version.rb | 2 +- ...pentelemetry-instrumentation-rails.gemspec | 6 ++-- 18 files changed, 60 insertions(+), 35 deletions(-) diff --git a/instrumentation/action_mailer/CHANGELOG.md b/instrumentation/action_mailer/CHANGELOG.md index 00f95806c..2aeccb016 100644 --- a/instrumentation/action_mailer/CHANGELOG.md +++ b/instrumentation/action_mailer/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-action_mailer +### v0.3.0 / 2024-12-19 + +* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 + ### v0.2.0 / 2024-10-22 * ADDED: Subscribe to process.action_mailer notifications diff --git a/instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/version.rb b/instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/version.rb index ff958a4cc..d2b4fbfb7 100644 --- a/instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/version.rb +++ b/instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActionMailer - VERSION = '0.2.0' + VERSION = '0.3.0' end end end diff --git a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec index 636687c4c..d5d0755a7 100644 --- a/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec +++ b/instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.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-active_support', '~> 0.1' + spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'appraisal', '~> 2.5' diff --git a/instrumentation/action_view/CHANGELOG.md b/instrumentation/action_view/CHANGELOG.md index 0f625330a..b7a76307d 100644 --- a/instrumentation/action_view/CHANGELOG.md +++ b/instrumentation/action_view/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-action_view +### v0.8.0 / 2024-12-19 + +* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 + ### v0.7.3 / 2024-08-23 * FIXED: ActionView Support Legacy Formats @@ -24,43 +28,43 @@ ### v0.6.0 / 2023-06-05 -* ADDED: Render layout for action view -* FIXED: Base config options +* ADDED: Render layout for action view +* FIXED: Base config options ### v0.5.0 / 2023-04-17 -* BREAKING CHANGE: Drop support for EoL Ruby 2.7 +* BREAKING CHANGE: Drop support for EoL Ruby 2.7 -* ADDED: Drop support for EoL Ruby 2.7 +* ADDED: Drop support for EoL Ruby 2.7 ### v0.4.0 / 2023-02-01 -* BREAKING CHANGE: Drop Rails 5 Support +* BREAKING CHANGE: Drop Rails 5 Support -* ADDED: Drop Rails 5 Support +* ADDED: Drop Rails 5 Support ### v0.3.1 / 2023-01-14 -* DOCS: Fix gem homepage -* DOCS: More gem documentation fixes +* DOCS: Fix gem homepage +* DOCS: More gem documentation fixes ### v0.3.0 / 2022-06-09 * Upgrading Base dependency version -* FIXED: Broken test file requirements +* FIXED: Broken test file requirements ### v0.2.1 / 2022-05-02 -* FIXED: RubyGems Fallback +* FIXED: RubyGems Fallback ### v0.2.0 / 2021-12-01 -* ADDED: Move activesupport notification subscriber out of action_view gem -* FIXED: Instrumentation of Rails 7 +* ADDED: Move activesupport notification subscriber out of action_view gem +* FIXED: Instrumentation of Rails 7 ### v0.1.3 / 2021-10-06 -* FIXED: Do not replace fanout +* FIXED: Do not replace fanout ### v0.1.2 / 2021-09-29 @@ -68,7 +72,7 @@ ### v0.1.1 / 2021-09-09 -* FIXED: Keep Active Support subscriptions intact when patching +* FIXED: Keep Active Support subscriptions intact when patching ### v0.1.0 / 2021-08-12 diff --git a/instrumentation/action_view/lib/opentelemetry/instrumentation/action_view/version.rb b/instrumentation/action_view/lib/opentelemetry/instrumentation/action_view/version.rb index 9326fe3a1..f20b8f6fd 100644 --- a/instrumentation/action_view/lib/opentelemetry/instrumentation/action_view/version.rb +++ b/instrumentation/action_view/lib/opentelemetry/instrumentation/action_view/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActionView - VERSION = '0.7.3' + VERSION = '0.8.0' end end end diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index 98e7873d8..cdec9f536 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.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-active_support', '~> 0.6' + spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'appraisal', '~> 2.5' diff --git a/instrumentation/active_model_serializers/CHANGELOG.md b/instrumentation/active_model_serializers/CHANGELOG.md index a6fc0f7ca..1a6563392 100644 --- a/instrumentation/active_model_serializers/CHANGELOG.md +++ b/instrumentation/active_model_serializers/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_model_serializers +### v0.21.0 / 2024-12-19 + +* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 + ### v0.20.3 / 2024-12-04 * FIXED: Use ActiveSupport::Notifications subscriber to serialize events. @@ -10,28 +14,28 @@ ### v0.20.1 / 2023-06-05 -* FIXED: Base config options +* FIXED: Base config options ### v0.20.0 / 2023-04-17 * BREAKING CHANGE: Drop support for EoL Ruby 2.7 -* ADDED: Drop support for EoL Ruby 2.7 +* ADDED: Drop support for EoL Ruby 2.7 ### v0.19.1 / 2023-01-14 -* DOCS: Fix gem homepage -* DOCS: More gem documentation fixes +* DOCS: Fix gem homepage +* DOCS: More gem documentation fixes ### v0.19.0 / 2022-06-09 * Upgrading Base dependency version -* FIXED: Broken test file requirements +* FIXED: Broken test file requirements ### v0.18.5 / 2022-05-02 -* FIXED: `ActiveSupport` constant conflict in Active Model Serializers instrumentation -* FIXED: RubyGems Fallback +* FIXED: `ActiveSupport` constant conflict in Active Model Serializers instrumentation +* FIXED: RubyGems Fallback ### v0.18.4 / 2021-12-02 diff --git a/instrumentation/active_model_serializers/Gemfile b/instrumentation/active_model_serializers/Gemfile index 2baf57ac4..2ededff74 100644 --- a/instrumentation/active_model_serializers/Gemfile +++ b/instrumentation/active_model_serializers/Gemfile @@ -10,4 +10,5 @@ gemspec group :test do gem 'opentelemetry-instrumentation-base', path: '../base' + gem 'opentelemetry-instrumentation-active_support', path: '../active_support' end diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb index d0b95c470..5dc35846a 100644 --- a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb +++ b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveModelSerializers - VERSION = '0.20.3' + VERSION = '0.21.0' end end end 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 6d5ad555e..3b7c2894f 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.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-active_support', '>= 0.6.0' + spec.add_dependency 'opentelemetry-instrumentation-active_support', '>= 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'active_model_serializers', '>= 0.10.0' diff --git a/instrumentation/active_support/CHANGELOG.md b/instrumentation/active_support/CHANGELOG.md index 7c20d34c6..0cd9c7cd1 100644 --- a/instrumentation/active_support/CHANGELOG.md +++ b/instrumentation/active_support/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_support +### v0.7.0 / 2024-12-19 + +* ADDED: Enable support for `Regexp` patterns when subscribing to Active Support's instrumentation Events + ### v0.6.0 / 2024-07-02 * BREAKING CHANGE: Custom ActiveSupport Span Names diff --git a/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/version.rb b/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/version.rb index 4026a632f..184a7a3c8 100644 --- a/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/version.rb +++ b/instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveSupport - VERSION = '0.6.0' + VERSION = '0.7.0' end end end diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index c993328b5..c57721afb 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.70.0 / 2024-12-19 + +* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 + ### v0.69.1 / 2024-11-26 * (No significant changes) diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index a54092fa1..c4e24fabf 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.69.1' + VERSION = '0.70.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index a90fd983e..da74ce94c 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.required_ruby_version = '>= 3.0' - spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.20.1' + spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-aws_lambda', '~> 0.1.0' spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.21.0' @@ -50,7 +50,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.8.0' spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0' spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.25.0' - spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.33.0' + spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.34.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' diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index 4a6df07a6..6a508638d 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.34.0 / 2024-12-19 + +* ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 + ### v0.33.1 / 2024-11-26 * (No significant changes) diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index 068c57626..7176ff959 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.33.1' + VERSION = '0.34.0' end end end diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 25bfa0583..874f474e9 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -26,12 +26,12 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0' spec.add_dependency 'opentelemetry-api', '~> 1.0' - spec.add_dependency 'opentelemetry-instrumentation-action_mailer', '~> 0.2.0' + spec.add_dependency 'opentelemetry-instrumentation-action_mailer', '~> 0.3.0' spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.10.0' - spec.add_dependency 'opentelemetry-instrumentation-action_view', '~> 0.7.0' + spec.add_dependency 'opentelemetry-instrumentation-action_view', '~> 0.8.0' spec.add_dependency 'opentelemetry-instrumentation-active_job', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-active_record', '~> 0.8.0' - spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.6.0' + spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'appraisal', '~> 2.5' From 4f926f103ff7232b30bb4f3d4a45db0ad7fe01c5 Mon Sep 17 00:00:00 2001 From: Eric Mustin Date: Mon, 6 Jan 2025 10:51:05 -0500 Subject: [PATCH 26/32] fix: Update instrumentation pg to support merge statements (#1317) * fix: support merge statement in pg versions 15+ * chore: fix json formatting for pg fixtures * chore: use aliases in pg fixtures table for merge statement --- .../pg/lib/opentelemetry/instrumentation/pg/constants.rb | 3 +-- instrumentation/pg/test/fixtures/sql_table_name.json | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/constants.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/constants.rb index 73d9c8710..d248cbdb0 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/constants.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/constants.rb @@ -40,10 +40,10 @@ module Constants LISTEN LOAD LOCK + MERGE MOVE NOTIFY PREPARE - PREPARE REASSIGN REFRESH REINDEX @@ -54,7 +54,6 @@ module Constants SAVEPOINT SECURITY SELECT - SELECT SET SHOW START diff --git a/instrumentation/pg/test/fixtures/sql_table_name.json b/instrumentation/pg/test/fixtures/sql_table_name.json index 7cf96681f..852d1dcea 100644 --- a/instrumentation/pg/test/fixtures/sql_table_name.json +++ b/instrumentation/pg/test/fixtures/sql_table_name.json @@ -54,5 +54,9 @@ { "name": "table_name_with_double_quotes", "sql": "SELECT columns FROM \"test_table\"" + }, + { + "name": "merge", + "sql": "MERGE INTO test_table AS t USING other_table AS o ON (o.id = t.id) WHEN MATCHED THEN UPDATE SET x = t.x + 1 WHEN NOT MATCHED THEN INSERT (id, x, status) VALUES (o.id, o.x, o.status)" } ] From 97955b0df84fc26b847449a70999df223eccd0cc Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 6 Jan 2025 10:39:24 -0600 Subject: [PATCH 27/32] feat: Faraday Minimum v1.0 (#1267) * fix: Share Faraday Attrs with Adapter Spans The Faraday gem has additional http attributes that are sometimes missing or difficult to derive in Adapter instrumentations. * feat: Faraday Minimum v1.0 Faraday pre-1.0 is no longer receiving updates. --------- Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- instrumentation/faraday/Appraisals | 2 +- .../faraday/instrumentation.rb | 17 ++++++++----- .../faraday/patches/connection.rb | 2 +- .../faraday/patches/rack_builder.rb | 25 ------------------- 4 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb diff --git a/instrumentation/faraday/Appraisals b/instrumentation/faraday/Appraisals index 0c19136a4..4ed32e342 100644 --- a/instrumentation/faraday/Appraisals +++ b/instrumentation/faraday/Appraisals @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: Apache-2.0 -%w[0.17.6 1.0 2.0].each do |version| +%w[1.0 2.0].each do |version| appraise "faraday-#{version}" do gem 'faraday', "~> #{version}" end diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb index 17d4826e8..a194d709e 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/instrumentation.rb @@ -10,12 +10,18 @@ module Faraday # The Instrumentation class contains logic to detect and install the Faraday # instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base + MINIMUM_VERSION = Gem::Version.new('1.0') + install do |_config| require_dependencies register_tracer_middleware use_middleware_by_default end + compatible do + gem_version >= MINIMUM_VERSION + end + present do defined?(::Faraday) end @@ -25,10 +31,13 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base private + def gem_version + Gem::Version.new(::Faraday::VERSION) + end + def require_dependencies require_relative 'middlewares/tracer_middleware' require_relative 'patches/connection' - require_relative 'patches/rack_builder' end def register_tracer_middleware @@ -38,11 +47,7 @@ def register_tracer_middleware end def use_middleware_by_default - if Gem::Version.new(::Faraday::VERSION) >= Gem::Version.new('1') - ::Faraday::Connection.prepend(Patches::Connection) - else - ::Faraday::RackBuilder.prepend(Patches::RackBuilder) - end + ::Faraday::Connection.prepend(Patches::Connection) end end end diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/connection.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/connection.rb index 51d8ad0b5..1819488ad 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/connection.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/connection.rb @@ -13,7 +13,7 @@ module Patches module Connection # Wraps Faraday::Connection#initialize: # https://github.com/lostisland/faraday/blob/ff9dc1d1219a1bbdba95a9a4cf5d135b97247ee2/lib/faraday/connection.rb#L62-L92 - def initialize(*args) + def initialize(...) super.tap do use(:open_telemetry) unless builder.handlers.any? do |handler| handler.klass == Middlewares::TracerMiddleware diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb deleted file mode 100644 index 1b32a00da..000000000 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright The OpenTelemetry Authors -# -# SPDX-License-Identifier: Apache-2.0 - -module OpenTelemetry - module Instrumentation - module Faraday - module Patches - # Module to be prepended to force Faraday to use the middleware by - # default so the user doesn't have to call `use` for every connection. - module RackBuilder - def adapter(*args) - use(:open_telemetry) unless @handlers.any? do |handler| - handler.klass == Faraday::Middlewares::TracerMiddleware - end - - super - end - end - end - end - end -end From 67c9a02329a1ebdef2899e5147c419ad5ca9dd9f Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:54:13 -0500 Subject: [PATCH 28/32] docs: update action for link check and fix one broken link (#1322) fix: update action for link check and fix one broken link --- .github/workflows/ci-markdown-link.yml | 13 ++++++++----- .markdown-link-check.json | 10 ---------- instrumentation/active_model_serializers/README.md | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 .markdown-link-check.json diff --git a/.github/workflows/ci-markdown-link.yml b/.github/workflows/ci-markdown-link.yml index 7b42be0c1..626a8fce4 100644 --- a/.github/workflows/ci-markdown-link.yml +++ b/.github/workflows/ci-markdown-link.yml @@ -2,6 +2,8 @@ name: Markdown Link Check on: pull_request: + paths: + - '**/*.md' jobs: markdown-link-check: @@ -9,9 +11,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: "Markdown Link Check" - uses: gaurav-nelson/github-action-markdown-link-check@v1 + # equivalent cli: linkspector check + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 with: - config-file: '.markdown-link-check.json' - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + fail_on_error: true diff --git a/.markdown-link-check.json b/.markdown-link-check.json deleted file mode 100644 index 12284d673..000000000 --- a/.markdown-link-check.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "^http://localhost" - } - ], - "timeout": "5s", - "retryOn429": true, - "aliveStatusCodes": [200, 206, 429] -} diff --git a/instrumentation/active_model_serializers/README.md b/instrumentation/active_model_serializers/README.md index 728cdf74b..7e8fe0bd5 100644 --- a/instrumentation/active_model_serializers/README.md +++ b/instrumentation/active_model_serializers/README.md @@ -32,7 +32,7 @@ end ## Examples -Example usage of active_model_serializers can be seen in the `./example/active_model_serializers.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/active_model_serializers/example/active_model_serializers.rb) +Example usage of active_model_serializers can be seen in the `./example/` folder [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/active_model_serializers/example) ## How can I get involved? From 543a5fa320ef7d5a6cfff6b65298a70f659ae4d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:59:53 -0600 Subject: [PATCH 29/32] chore: bump DavidAnson/markdownlint-cli2-action from 18 to 19 (#1319) Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 18 to 19. - [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases) - [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v18...v19) --- updated-dependencies: - dependency-name: DavidAnson/markdownlint-cli2-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-markdownlint.yml b/.github/workflows/ci-markdownlint.yml index 037b2fa9e..93350d7c4 100644 --- a/.github/workflows/ci-markdownlint.yml +++ b/.github/workflows/ci-markdownlint.yml @@ -11,7 +11,7 @@ jobs: # equivalent cli: markdownlint-cli2 "**/*.md" "#**/CHANGELOG.md" --config .markdownlint.json - name: "Markdown Lint Check" - uses: DavidAnson/markdownlint-cli2-action@v18 + uses: DavidAnson/markdownlint-cli2-action@v19 with: fix: false globs: | From 0cfc9d0830f6bc4255cde4c24423291ea4648132 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:20:32 +0000 Subject: [PATCH 30/32] chore: bump ruby/setup-ruby from 1.203.0 to 1.207.0 (#1320) * chore: bump ruby/setup-ruby from 1.203.0 to 1.207.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.203.0 to 1.207.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/v1.203.0...v1.207.0) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * squash: bump setup ruby --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ariel Valentin --- .github/actions/test_gem/action.yml | 4 ++-- .github/workflows/installation-tests.yml | 2 +- .github/workflows/release-hook-on-closed.yml | 2 +- .github/workflows/release-hook-on-push.yml | 2 +- .github/workflows/release-perform.yml | 2 +- .github/workflows/release-please.yaml | 2 +- .github/workflows/release-request-weekly.yml | 2 +- .github/workflows/release-request.yml | 2 +- .github/workflows/release-retry.yml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/test_gem/action.yml b/.github/actions/test_gem/action.yml index cf4350590..c26f0d703 100644 --- a/.github/actions/test_gem/action.yml +++ b/.github/actions/test_gem/action.yml @@ -66,7 +66,7 @@ runs: # ...but not for appraisals, sadly. - name: Install Ruby ${{ inputs.ruby }} with dependencies if: "${{ steps.setup.outputs.appraisals == 'false' }}" - uses: ruby/setup-ruby@v1.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: "${{ inputs.ruby }}" working-directory: "${{ steps.setup.outputs.gem_dir }}" @@ -77,7 +77,7 @@ runs: # If we're using appraisals, do it all manually. - name: Install Ruby ${{ inputs.ruby }} without dependencies if: "${{ steps.setup.outputs.appraisals == 'true' }}" - uses: ruby/setup-ruby@v1.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: "${{ inputs.ruby }}" bundler: "latest" diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index dca91e495..18b81bef6 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 # ATTENTION: Dependabot does not know how to update shared actions file. # If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml - - uses: ruby/setup-ruby@v1.203.0 + - uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ matrix.ruby-version }} - name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}" diff --git a/.github/workflows/release-hook-on-closed.yml b/.github/workflows/release-hook-on-closed.yml index 317b713a8..3bf8d5e19 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.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-hook-on-push.yml b/.github/workflows/release-hook-on-push.yml index 33781582a..72b3b2ab8 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.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index fec719443..59ae1c289 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.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 3b0197b8d..73568b13b 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -50,7 +50,7 @@ jobs: chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - - uses: ruby/setup-ruby@v1.203.0 + - uses: ruby/setup-ruby@v1.207.0 with: ruby-version: "3.0" bundler: latest diff --git a/.github/workflows/release-request-weekly.yml b/.github/workflows/release-request-weekly.yml index f76a5118e..a9dacf40d 100644 --- a/.github/workflows/release-request-weekly.yml +++ b/.github/workflows/release-request-weekly.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Ruby ${{ env.ruby_version }} - uses: ruby/setup-ruby@v1.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index 9d05b3d6f..cfea8d665 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.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index 0066ea7e2..f716f3947 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.203.0 + uses: ruby/setup-ruby@v1.207.0 with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo From 48b3206ffb2591a63996355c9451c0f783a6b21e Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 7 Jan 2025 15:46:05 -0600 Subject: [PATCH 31/32] fix: strict rdkafka support to v0.14 (#1326) * fix: strict rdkafka support to v0.14 * squash: fix argument error * squash: OMG * squash: skip incompatible versions * squash: use compatible? predicate --- instrumentation/rdkafka/Appraisals | 10 ++++------ .../instrumentation/rdkafka/instrumentation.rb | 5 ++--- .../instrumentation/rdkafka/instrumentation_test.rb | 1 + .../instrumentation/rdkafka/patches/consumer_test.rb | 6 ++++++ .../instrumentation/rdkafka/patches/producer_test.rb | 1 + 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/instrumentation/rdkafka/Appraisals b/instrumentation/rdkafka/Appraisals index ec35aac46..6aa63adaf 100644 --- a/instrumentation/rdkafka/Appraisals +++ b/instrumentation/rdkafka/Appraisals @@ -4,12 +4,10 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'rdkafka-0.12.x' do - gem 'rdkafka', '~> 0.12.0' -end - -appraise 'rdkafka-0.13.x' do - gem 'rdkafka', '~> 0.13.0' +%w[0.12.0 0.13.0 0.14.0].each do |version| + appraise "rdkafka-#{version}" do + gem 'rdkafka', "~> #{version}" + end end appraise 'rdkafka-latest' do diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb index 4d9919145..e240b991e 100644 --- a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb +++ b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb @@ -9,10 +9,9 @@ module Instrumentation module Rdkafka # The Instrumentation class contains logic to detect and install the Rdkafka instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base - MINIMUM_VERSION = Gem::Version.new('0.10.0') - compatible do - Gem::Version.new(::Rdkafka::VERSION) >= MINIMUM_VERSION + gem_version = Gem::Version.new(::Rdkafka::VERSION) + Gem::Requirement.new('>= 0.10.0', '< 0.15.0').satisfied_by?(gem_version) end install do |_config| diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb index 9344b459d..d46a6ccdb 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/instrumentation_test.rb @@ -22,6 +22,7 @@ describe '#install' do it 'accepts argument' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? _(instrumentation.install({})).must_equal(true) instrumentation.instance_variable_set(:@installed, false) end diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb index bfd2f9da7..d2472bc81 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb @@ -33,6 +33,8 @@ describe '#each' do it 'traces each call' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? + rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-trace-#{rand_hash}" config = { 'bootstrap.servers': "#{host}:#{port}" } @@ -112,6 +114,8 @@ end it 'encodes messages keys depending on input format' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? + rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-trace-#{rand_hash}" config = { 'bootstrap.servers': "#{host}:#{port}" } @@ -164,6 +168,8 @@ describe '#each_batch' do it 'traces each_batch call' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? + rand_hash = SecureRandom.hex(10) topic_name = "consumer-patch-batch-trace-#{rand_hash}" config = { 'bootstrap.servers': "#{host}:#{port}" } diff --git a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb index 06e40de58..1ee85f90f 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb @@ -32,6 +32,7 @@ describe 'tracing' do it 'traces sync produce calls' do + skip "#{Rdkafka::VERSION} is not supported" unless instrumentation.compatible? topic_name = 'producer-patch-trace' config = { 'bootstrap.servers': "#{host}:#{port}" } From a240296424883f4aad50d9d76101eeebab5d6bd7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:18:01 -0600 Subject: [PATCH 32/32] release: Release 6 gems (#1327) * release: Release 6 gems * opentelemetry-instrumentation-all 0.71.0 (was 0.70.0) * opentelemetry-instrumentation-koala 0.20.6 (was 0.20.5) * opentelemetry-instrumentation-active_model_serializers 0.21.1 (was 0.21.0) * opentelemetry-instrumentation-faraday 0.25.0 (was 0.24.8) * opentelemetry-instrumentation-pg 0.29.2 (was 0.29.1) * opentelemetry-instrumentation-rdkafka 0.4.9 (was 0.4.8) * Update instrumentation/all/CHANGELOG.md * Update opentelemetry-instrumentation-all.gemspec --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Ariel Valentin --- instrumentation/active_model_serializers/CHANGELOG.md | 4 ++++ .../instrumentation/active_model_serializers/version.rb | 2 +- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- instrumentation/faraday/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/faraday/version.rb | 2 +- instrumentation/koala/CHANGELOG.md | 4 ++++ .../koala/lib/opentelemetry/instrumentation/koala/version.rb | 2 +- instrumentation/pg/CHANGELOG.md | 4 ++++ .../pg/lib/opentelemetry/instrumentation/pg/version.rb | 2 +- instrumentation/rdkafka/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/rdkafka/version.rb | 2 +- 13 files changed, 31 insertions(+), 7 deletions(-) diff --git a/instrumentation/active_model_serializers/CHANGELOG.md b/instrumentation/active_model_serializers/CHANGELOG.md index 1a6563392..6d47a9de5 100644 --- a/instrumentation/active_model_serializers/CHANGELOG.md +++ b/instrumentation/active_model_serializers/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_model_serializers +### v0.21.1 / 2025-01-07 + +* DOCS: Update action for link check and fix one broken link + ### v0.21.0 / 2024-12-19 * ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 diff --git a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb index 5dc35846a..4ec18e38b 100644 --- a/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb +++ b/instrumentation/active_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveModelSerializers - VERSION = '0.21.0' + VERSION = '0.21.1' end end end diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index c57721afb..37184e8e2 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.71.0 / 2025-01-07 + +* ADDED: Faraday Minimum v1.0 + ### v0.70.0 / 2024-12-19 * ADDED: Upgrade ActiveSupport Instrumentation 0.7.0 diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index c4e24fabf..1e0392957 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.70.0' + VERSION = '0.71.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index da74ce94c..2f60d7f6b 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.22.0' spec.add_dependency 'opentelemetry-instrumentation-ethon', '~> 0.21.1' spec.add_dependency 'opentelemetry-instrumentation-excon', '~> 0.22.0' - spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.24.0' + spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.25.0' spec.add_dependency 'opentelemetry-instrumentation-grape', '~> 0.2.0' spec.add_dependency 'opentelemetry-instrumentation-graphql', '~> 0.28.0' spec.add_dependency 'opentelemetry-instrumentation-gruf', '~> 0.2.0' diff --git a/instrumentation/faraday/CHANGELOG.md b/instrumentation/faraday/CHANGELOG.md index c2517a806..6bbe7a4c1 100644 --- a/instrumentation/faraday/CHANGELOG.md +++ b/instrumentation/faraday/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-faraday +### v0.25.0 / 2025-01-07 + +* ADDED: Faraday Minimum v1.0 + ### v0.24.8 / 2024-12-17 * FIXED: Share Faraday Attrs with Adapter Spans diff --git a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb index 5daca1076..0977f7331 100644 --- a/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb +++ b/instrumentation/faraday/lib/opentelemetry/instrumentation/faraday/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Faraday - VERSION = '0.24.8' + VERSION = '0.25.0' end end end diff --git a/instrumentation/koala/CHANGELOG.md b/instrumentation/koala/CHANGELOG.md index 1cd0e5d62..950e148e9 100644 --- a/instrumentation/koala/CHANGELOG.md +++ b/instrumentation/koala/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-koala +### v0.20.6 / 2025-01-07 + +* FIXED: Loosen the koala pin to ~> 3.0 + ### v0.20.5 / 2024-06-18 * FIXED: Relax otel common gem constraints diff --git a/instrumentation/koala/lib/opentelemetry/instrumentation/koala/version.rb b/instrumentation/koala/lib/opentelemetry/instrumentation/koala/version.rb index 7d2588e92..fab974691 100644 --- a/instrumentation/koala/lib/opentelemetry/instrumentation/koala/version.rb +++ b/instrumentation/koala/lib/opentelemetry/instrumentation/koala/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Koala - VERSION = '0.20.5' + VERSION = '0.20.6' end end end diff --git a/instrumentation/pg/CHANGELOG.md b/instrumentation/pg/CHANGELOG.md index ff1b50bae..bd78b89e6 100644 --- a/instrumentation/pg/CHANGELOG.md +++ b/instrumentation/pg/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-pg +### v0.29.2 / 2025-01-07 + +* FIXED: Update instrumentation pg to support merge statements + ### v0.29.1 / 2024-11-26 * FIXED: Get correct table name if table name is quoted diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb index 75556090c..1b0cb5039 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module PG - VERSION = '0.29.1' + VERSION = '0.29.2' end end end diff --git a/instrumentation/rdkafka/CHANGELOG.md b/instrumentation/rdkafka/CHANGELOG.md index dc412f73f..0b28504c6 100644 --- a/instrumentation/rdkafka/CHANGELOG.md +++ b/instrumentation/rdkafka/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rdkafka +### v0.4.9 / 2025-01-07 + +* FIXED: Strict rdkafka support to v0.14 + ### v0.4.8 / 2024-07-23 * DOCS: Link to rdkafka example diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb index bee9d26a5..96b200b07 100644 --- a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb +++ b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Rdkafka - VERSION = '0.4.8' + VERSION = '0.4.9' end end end