From d91d0cf85c8fac292df7ba1df0acb3f9c9b15736 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 4 Sep 2023 11:42:01 -0500 Subject: [PATCH 01/15] chore(dev-deps): Bump rubocop 1.56.1 (#640) --- CONTRIBUTING.md | 50 +++++++++++++++++++ bin/update-dependencies | 19 +++++++ ...emetry-instrumentation-action_pack.gemspec | 2 +- ...emetry-instrumentation-action_view.gemspec | 2 +- ...lemetry-instrumentation-active_job.gemspec | 2 +- ...mentation-active_model_serializers.gemspec | 2 +- ...etry-instrumentation-active_record.gemspec | 2 +- ...try-instrumentation-active_support.gemspec | 2 +- .../opentelemetry-instrumentation-all.gemspec | 2 +- .../aws_sdk/message_attributes.rb | 2 +- ...ntelemetry-instrumentation-aws_sdk.gemspec | 2 +- ...opentelemetry-instrumentation-base.gemspec | 2 +- ...pentelemetry-instrumentation-bunny.gemspec | 2 +- ...ry-instrumentation-concurrent_ruby.gemspec | 2 +- ...pentelemetry-instrumentation-dalli.gemspec | 2 +- ...emetry-instrumentation-delayed_job.gemspec | 2 +- ...pentelemetry-instrumentation-ethon.gemspec | 2 +- ...pentelemetry-instrumentation-excon.gemspec | 2 +- ...ntelemetry-instrumentation-faraday.gemspec | 2 +- ...pentelemetry-instrumentation-grape.gemspec | 2 +- ...ntelemetry-instrumentation-graphql.gemspec | 2 +- ...opentelemetry-instrumentation-gruf.gemspec | 2 +- ...opentelemetry-instrumentation-http.gemspec | 2 +- ...emetry-instrumentation-http_client.gemspec | 2 +- ...pentelemetry-instrumentation-koala.gemspec | 2 +- ...opentelemetry-instrumentation-lmdb.gemspec | 2 +- ...pentelemetry-instrumentation-mongo.gemspec | 2 +- ...entelemetry-instrumentation-mysql2.gemspec | 2 +- ...telemetry-instrumentation-net_http.gemspec | 2 +- .../instrumentation/pg/patches/connection.rb | 4 +- .../opentelemetry-instrumentation-pg.gemspec | 2 +- .../opentelemetry-instrumentation-que.gemspec | 2 +- ...ntelemetry-instrumentation-racecar.gemspec | 2 +- ...opentelemetry-instrumentation-rack.gemspec | 2 +- ...pentelemetry-instrumentation-rails.gemspec | 2 +- ...opentelemetry-instrumentation-rake.gemspec | 2 +- ...ntelemetry-instrumentation-rdkafka.gemspec | 2 +- ...pentelemetry-instrumentation-redis.gemspec | 2 +- ...entelemetry-instrumentation-resque.gemspec | 2 +- ...lemetry-instrumentation-restclient.gemspec | 2 +- ...pentelemetry-instrumentation-rspec.gemspec | 2 +- ...lemetry-instrumentation-ruby_kafka.gemspec | 2 +- ...ntelemetry-instrumentation-sidekiq.gemspec | 2 +- ...ntelemetry-instrumentation-sinatra.gemspec | 2 +- ...ntelemetry-instrumentation-trilogy.gemspec | 2 +- .../opentelemetry-propagator-ottrace.gemspec | 2 +- .../opentelemetry-propagator-xray.gemspec | 2 +- .../opentelemetry-resource_detectors.gemspec | 2 +- ...emetry-resource-detector-container.gemspec | 2 +- 49 files changed, 117 insertions(+), 48 deletions(-) create mode 100755 bin/update-dependencies diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c9acf194..554628cf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -344,6 +344,56 @@ For releases to succeed, new gems MUST include the following: * A `CHANGELOG.md` file. * A `yard` rake task. +## Dependabot Updates + +This repository uses [Dependabot](https://dependabot.com/) to keep dependencies up to date, however there shared development dependencies are often scattered across multiple gems. Dependabot does not currently support the ability to group dependencies for gems in multiple subdirectories, so we use a custom script to bulk update dependencies across all gems. + +E.g. if you want to update Rubocop to version 1.56.1, you would run: + +```console + +$> bin/update-dependencies rubocop 1.56.1 + +Review your changes and commit +Press any key to continue + +``` + +This will then run a bulk update on all of the gems in the repository, and then prompt you to review the changes and stage them for a commit: + +```console + +diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +index 42c5ecba..74fcc743 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.50.0' ++ spec.add_development_dependency 'rubocop', '~> 1.56.1' + spec.add_development_dependency 'simplecov', '~> 0.22.0' + spec.add_development_dependency 'yard', '~> 0.9' + spec.add_development_dependency 'yard-doctest', '~> 0.1.6' +(1/1) Stage this hunk [y,n,q,a,d,e,?]? y + +diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec +index e29acbfc..85622d25 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.50.0' ++ spec.add_development_dependency 'rubocop', '~> 1.56.1' + spec.add_development_dependency 'simplecov', '~> 0.22.0' + spec.add_development_dependency 'yard', '~> 0.9' + spec.add_development_dependency 'yard-doctest', '~> 0.1.6' +(1/1) Stage this hunk [y,n,q,a,d,e,?]? y +``` + [cncf-cla]: https://identity.linuxfoundation.org/projects/cncf [github-draft]: https://github.blog/2019-02-14-introducing-draft-pull-requests/ [kube-github-workflow-pr]: https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md#7-create-a-pull-request diff --git a/bin/update-dependencies b/bin/update-dependencies new file mode 100755 index 000000000..446fc8d03 --- /dev/null +++ b/bin/update-dependencies @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ -z "$1" ] ; then + echo "gem name is required!" && exit 1; +fi + +if [ -z "$2" ] ; then + echo "gem version is required!" && exit 2; +fi + +for gemspec in $(git ls-files \*.gemspec) +do + sed -i -E "s/'$1', '~> [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'/'$1', '~> $2'/" "$gemspec" +done + +echo "Review your changes and commit" +read -n 1 -s -r -p "Press any key to continue" +echo "" +git add -p diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index 3462f99b9..b57b9bb50 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 'rails', '>= 6' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 a38ee1538..d7cc53ad2 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' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 f4465beb7..668e2cc6b 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 'pry' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 2965e5814..f36b59bfb 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 1f9af91e6..6243a3996 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-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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 5b2de1e86..f40a323a5 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rails', '>= 6' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 823b332f2..5fc1631c2 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -65,7 +65,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb index b5b5777f1..4a4519f02 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb @@ -29,7 +29,7 @@ def self.set(carrier, key, value) # OpenTelemetry.propagation.extract(message, getter: MessageAttributeGetter) class MessageAttributeGetter def self.get(carrier, key) - return carrier[key][:string_value] if carrier[key][:data_type] == 'String' + carrier[key][:string_value] if carrier[key][:data_type] == 'String' end end end diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index bc5960c3a..6f1ceeb63 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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index b20a10249..bb0031e0f 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' 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/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index 9c5f73fa4..b60c3bd3c 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 '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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index 0c7ded253..e3e79ee47 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 '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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index cae6a2f62..83cbfbcee 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -35,7 +35,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index 0b5b6f0b4..9bcd31dd8 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' spec.add_development_dependency 'webmock', '~> 3.7.6' diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index abed3e4ca..c2c166df0 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -35,7 +35,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index e9cbd7adf..7936b384e 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -35,7 +35,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index 90dd4c0cf..267bb672a 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -35,7 +35,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 11bcc7014..1a665bd1f 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 'rack-test' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 5a9e409f1..7bcc0a814 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-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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 2a6e9e69f..ea26dc430 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-sdk', '~> 1.0' spec.add_development_dependency 'opentelemetry-test-helpers' spec.add_development_dependency 'rake', '~> 12.3.3' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index d4f34e772..f86db4d7b 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 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 5771500c5..15239b90b 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.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 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index a9aaed7d3..da3fe79bd 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -37,7 +37,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index f8e7743aa..434e56fc2 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-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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index 16b06c428..1a469b614 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' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 021510257..92b56d7d0 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -36,7 +36,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index b078e0117..629b82c65 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-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rake', '~> 13.0.1' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.11.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb index 2586ad61c..75f000f14 100644 --- a/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb +++ b/instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb @@ -162,7 +162,7 @@ def transport_addr # string when there is only one. Some older versions of libpq allow # multiple without any way to discern which is presently connected. addr = conninfo_hash[:hostaddr] - return addr unless addr&.include?(',') + addr unless addr&.include?(',') end def transport_attrs @@ -190,7 +190,7 @@ def transport_port # As a fallback, we can use the port of the parsed connection # string when there is exactly one. p = conninfo_hash[:port] - return p.to_i unless p.nil? || p.empty? || p.include?(',') + p.to_i unless p.nil? || p.empty? || p.include?(',') end end end diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index 47ddd6ee0..a3eed23c4 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 'pg', '>= 1.1.0' spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/que/opentelemetry-instrumentation-que.gemspec b/instrumentation/que/opentelemetry-instrumentation-que.gemspec index aca9cb197..487240174 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pg', '~> 1.1' spec.add_development_dependency 'que', '~> 1.2.0' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index d376d8dc5..c6312fb51 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'racecar', '~> 2.7' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 8873a9a07..508c561aa 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -39,7 +39,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 10eb7da44..f4038578e 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 'rack-test', '~> 2.1.0' spec.add_development_dependency 'rails', '>= 6' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index e5f5158e9..25b82b559 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 'rake', '>= 0.9.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index 40587b827..b01ddba42 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -37,7 +37,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 'rdkafka', '>= 0.12' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index f1f02ad10..7909462ff 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'redis', '~> 4.1.0' spec.add_development_dependency 'redis-client', '~> 0.7' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-doctest', '~> 0.1.6' diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index a6454ecdd..b2f8aecb3 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 'resque' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 9de727140..493f30cf6 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.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 'rest-client', '~> 2.1.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 04c8c15b3..32ad6c899 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 'rspec', '~> 3.10.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' 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 6a1b40717..4abc7bb0c 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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'ruby-kafka' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index a17fba324..834692551 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-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rspec-mocks' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'sidekiq', '~> 5.2.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 1e9061f53..9029443aa 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-sdk', '~> 1.1' spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rack-test', '~> 1.1.0' - spec.add_development_dependency 'rubocop', '~> 1.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sinatra', '~> 2.0.7' spec.add_development_dependency 'webmock', '~> 3.7.6' diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index 33ab7bb83..34b1f20e8 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -38,7 +38,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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'trilogy', '>= 2.0', '< 3.0' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index fae5253b0..42c5ecba8 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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' 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/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index 708da7258..e29acbfc2 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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' 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/resource_detectors/opentelemetry-resource_detectors.gemspec b/resource_detectors/opentelemetry-resource_detectors.gemspec index 1cd7cbacc..1e5273213 100644 --- a/resource_detectors/opentelemetry-resource_detectors.gemspec +++ b/resource_detectors/opentelemetry-resource_detectors.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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index d4001a1a4..9739c34c6 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.55.1' + spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' From a906f7465c44edc70ab45a354120905cfcceeb50 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 4 Sep 2023 17:00:50 -0500 Subject: [PATCH 02/15] perf: Reduce Object allocation (#642) --- .../instrumentation/active_support/span_subscriber.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 cfc0c20b2..72e8f04a9 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 @@ -76,11 +76,11 @@ def finish(name, id, payload) token = payload.delete(:__opentelemetry_ctx_token) return unless span && token - payload = transform_payload(payload) - attrs = payload.map do |k, v| - [k.to_s, sanitized_value(v)] if valid_payload_key?(k) && valid_payload_value?(v) + attrs = transform_payload(payload).each_with_object({}) do |(k, v), accum| + accum[k.to_s] = sanitized_value(v) if valid_payload_key?(k) && valid_payload_value?(v) end - span.add_attributes(attrs.compact.to_h) + + span.add_attributes(attrs) if (e = payload[:exception_object]) span.record_exception(e) From e37d5afb3a274a3f487700da5f15a99ee1befd3a Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Mon, 4 Sep 2023 21:32:41 -0500 Subject: [PATCH 03/15] chore: Remove yard-doctest (#643) --- .instrumentation_generator/templates/gemspec.tt | 1 - .../opentelemetry-instrumentation-action_pack.gemspec | 1 - .../opentelemetry-instrumentation-action_view.gemspec | 1 - .../active_job/opentelemetry-instrumentation-active_job.gemspec | 1 - ...pentelemetry-instrumentation-active_model_serializers.gemspec | 1 - .../opentelemetry-instrumentation-active_record.gemspec | 1 - .../opentelemetry-instrumentation-active_support.gemspec | 1 - instrumentation/all/opentelemetry-instrumentation-all.gemspec | 1 - .../aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec | 1 - instrumentation/base/opentelemetry-instrumentation-base.gemspec | 1 - .../bunny/opentelemetry-instrumentation-bunny.gemspec | 1 - .../opentelemetry-instrumentation-concurrent_ruby.gemspec | 1 - .../dalli/opentelemetry-instrumentation-dalli.gemspec | 1 - .../opentelemetry-instrumentation-delayed_job.gemspec | 1 - .../ethon/opentelemetry-instrumentation-ethon.gemspec | 1 - .../excon/opentelemetry-instrumentation-excon.gemspec | 1 - .../faraday/opentelemetry-instrumentation-faraday.gemspec | 1 - .../grape/opentelemetry-instrumentation-grape.gemspec | 1 - .../graphql/opentelemetry-instrumentation-graphql.gemspec | 1 - instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec | 1 - instrumentation/http/opentelemetry-instrumentation-http.gemspec | 1 - .../opentelemetry-instrumentation-http_client.gemspec | 1 - .../koala/opentelemetry-instrumentation-koala.gemspec | 1 - instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec | 1 - .../mongo/opentelemetry-instrumentation-mongo.gemspec | 1 - .../mysql2/opentelemetry-instrumentation-mysql2.gemspec | 1 - .../net_http/opentelemetry-instrumentation-net_http.gemspec | 1 - instrumentation/pg/opentelemetry-instrumentation-pg.gemspec | 1 - instrumentation/que/opentelemetry-instrumentation-que.gemspec | 1 - .../racecar/opentelemetry-instrumentation-racecar.gemspec | 1 - instrumentation/rack/opentelemetry-instrumentation-rack.gemspec | 1 - .../rails/opentelemetry-instrumentation-rails.gemspec | 1 - instrumentation/rake/opentelemetry-instrumentation-rake.gemspec | 1 - .../rdkafka/opentelemetry-instrumentation-rdkafka.gemspec | 1 - .../redis/opentelemetry-instrumentation-redis.gemspec | 1 - .../resque/opentelemetry-instrumentation-resque.gemspec | 1 - .../restclient/opentelemetry-instrumentation-restclient.gemspec | 1 - .../rspec/opentelemetry-instrumentation-rspec.gemspec | 1 - .../ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec | 1 - .../sidekiq/opentelemetry-instrumentation-sidekiq.gemspec | 1 - .../sinatra/opentelemetry-instrumentation-sinatra.gemspec | 1 - .../trilogy/opentelemetry-instrumentation-trilogy.gemspec | 1 - propagator/ottrace/opentelemetry-propagator-ottrace.gemspec | 1 - propagator/xray/opentelemetry-propagator-xray.gemspec | 1 - resource_detectors/opentelemetry-resource_detectors.gemspec | 1 - .../container/opentelemetry-resource-detector-container.gemspec | 1 - 46 files changed, 46 deletions(-) diff --git a/.instrumentation_generator/templates/gemspec.tt b/.instrumentation_generator/templates/gemspec.tt index ee02f42b2..ea3171b4e 100644 --- a/.instrumentation_generator/templates/gemspec.tt +++ b/.instrumentation_generator/templates/gemspec.tt @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index b57b9bb50..7dbdd29f5 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index d7cc53ad2..9b6947a66 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 668e2cc6b..e5b7bbb95 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" 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 f36b59bfb..6912965e8 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index 6243a3996..d70793268 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index f40a323a5..7e637e43f 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -42,7 +42,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 5fc1631c2..141810dd3 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -68,7 +68,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index 6f1ceeb63..a5f303000 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/base/opentelemetry-instrumentation-base.gemspec b/instrumentation/base/opentelemetry-instrumentation-base.gemspec index bb0031e0f..f40f75af0 100644 --- a/instrumentation/base/opentelemetry-instrumentation-base.gemspec +++ b/instrumentation/base/opentelemetry-instrumentation-base.gemspec @@ -35,7 +35,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index b60c3bd3c..a784a210d 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -37,7 +37,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index e3e79ee47..6c283bd0f 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -37,7 +37,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index 83cbfbcee..9688093e2 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index 9bcd31dd8..f06239598 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'sqlite3' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index c2c166df0..73d8b089d 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 7936b384e..3fad52435 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index 267bb672a..a7509674d 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 1a665bd1f..11f998dd8 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -43,7 +43,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 7bcc0a814..2d9053593 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index ea26dc430..156ed7665 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-gruf/v#{OpenTelemetry::Instrumentation::Gruf::VERSION}/file.CHANGELOG.html" diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index f86db4d7b..f5c2f955e 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index 15239b90b..d963bbbf2 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index da3fe79bd..7c7e11d4e 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 434e56fc2..4237dfb2d 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index 1a469b614..3c3cb9463 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 92b56d7d0..83557dec6 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index 629b82c65..bffe390b4 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.11.0' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index a3eed23c4..d35ef60e0 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/que/opentelemetry-instrumentation-que.gemspec b/instrumentation/que/opentelemetry-instrumentation-que.gemspec index 487240174..f4bfeab0b 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index c6312fb51..335158fcc 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 508c561aa..7e7d040a5 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -43,7 +43,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index f4038578e..f74ab4b27 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -45,7 +45,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rails' if spec.respond_to?(:metadata) end diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 25b82b559..9d4381fa1 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index b01ddba42..01d69d8fd 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index 7909462ff..c807200ba 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index b2f8aecb3..65c37cca3 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 493f30cf6..9ebd0db0d 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 32ad6c899..7a05cb260 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec index 4abc7bb0c..9efb01e48 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -38,7 +38,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'ruby-kafka' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index 834692551..17e69232b 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'sidekiq', '~> 5.2.0' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index 9029443aa..87fe3293b 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'sinatra', '~> 2.0.7' spec.add_development_dependency 'webmock', '~> 3.7.6' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index 34b1f20e8..23c9ab5ac 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -42,7 +42,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'trilogy', '>= 2.0', '< 3.0' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec index 42c5ecba8..7e4c36003 100644 --- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec +++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec @@ -31,7 +31,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/propagator/xray/opentelemetry-propagator-xray.gemspec b/propagator/xray/opentelemetry-propagator-xray.gemspec index e29acbfc2..b5fb7b330 100644 --- a/propagator/xray/opentelemetry-propagator-xray.gemspec +++ b/propagator/xray/opentelemetry-propagator-xray.gemspec @@ -34,7 +34,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.22.0' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/resource_detectors/opentelemetry-resource_detectors.gemspec b/resource_detectors/opentelemetry-resource_detectors.gemspec index 1e5273213..06d0f7264 100644 --- a/resource_detectors/opentelemetry-resource_detectors.gemspec +++ b/resource_detectors/opentelemetry-resource_detectors.gemspec @@ -35,7 +35,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index 9739c34c6..a20dbd340 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -34,7 +34,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov', '~> 0.17' spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' - spec.add_development_dependency 'yard-doctest', '~> 0.1.6' if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" From d5b59e0a1e95f1b122c7f9b0b5108c9129790639 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Tue, 5 Sep 2023 10:01:20 -0500 Subject: [PATCH 04/15] chore(dev-deps): Upgrade appraisal to min 2.5 (#644) Full Changelog https://github.com/thoughtbot/appraisal/releases --- .instrumentation_generator/templates/gemspec.tt | 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 +- .../aws_sdk/opentelemetry-instrumentation-aws_sdk.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 +- .../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 +- 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 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.instrumentation_generator/templates/gemspec.tt b/.instrumentation_generator/templates/gemspec.tt index ea3171b4e..6305d176e 100644 --- a/.instrumentation_generator/templates/gemspec.tt +++ b/.instrumentation_generator/templates/gemspec.tt @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> <%= opentelemetry_version %>' spec.add_dependency 'opentelemetry-instrumentation-base', '~> <%= instrumentation_base_version %>' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index 7dbdd29f5..14f7f1b85 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.21' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index 9b6947a66..df30e19c4 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.1' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index e5b7bbb95..7435a04d1 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activejob', '>= 6.0.0' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' 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 6912965e8..daadc39a3 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'active_model_serializers', '>= 0.10.0' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index d70793268..e46147904 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'ruby2_keywords' spec.add_development_dependency 'activerecord' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index 7e637e43f..06c3d3d0e 100644 --- a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec +++ b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activesupport' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk' diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index a5f303000..16d842c83 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'aws-sdk', '>= 2.0' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec index a784a210d..40aa3a9f5 100644 --- a/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec +++ b/instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'bunny' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec index 6c283bd0f..d2cfb4b33 100644 --- a/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec +++ b/instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'concurrent-ruby', '~> 1.1.6' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec index 9688093e2..8a12e2360 100644 --- a/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec +++ b/instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'dalli', '>= 2.7' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index f06239598..aebf9d6d5 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'delayed_job', '~> 4.1.0' spec.add_development_dependency 'delayed_job_active_record' diff --git a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec index 73d8b089d..e24672d52 100644 --- a/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec +++ b/instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'ethon', '~> 0.12.0' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 3fad52435..65eb139d9 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'excon', '~> 0.71.0' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index a7509674d..69c972db0 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'faraday', '~> 0.17.0' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 11f998dd8..2c015a9c0 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.21' spec.add_development_dependency 'activesupport' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'grape', '~> 1.2' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 2d9053593..97db8d729 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'graphql', '>= 1.9.0', '< 3.0.0' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 156ed7665..6e3af470d 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '>= 1.0.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '>= 1.17' spec.add_development_dependency 'grpc_mock' spec.add_development_dependency 'gruf', '>= 2.15.1' diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index f5c2f955e..f03ad32aa 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'http' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index d963bbbf2..e5b7616e4 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'httpclient' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index 7c7e11d4e..37ae31a8c 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'koala', '~> 3.0.0' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 4237dfb2d..662b6117f 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'lmdb' spec.add_development_dependency 'minitest', '~> 5.0' diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index 3c3cb9463..2cc2671e5 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'mongo', '~> 2.5' diff --git a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec index 83557dec6..e4cdc1c55 100644 --- a/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec +++ b/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'mysql2', '>= 0.4.0' diff --git a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec index d35ef60e0..2c77b6629 100644 --- a/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec +++ b/instrumentation/pg/opentelemetry-instrumentation-pg.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activerecord' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/que/opentelemetry-instrumentation-que.gemspec b/instrumentation/que/opentelemetry-instrumentation-que.gemspec index f4bfeab0b..af9982566 100644 --- a/instrumentation/que/opentelemetry-instrumentation-que.gemspec +++ b/instrumentation/que/opentelemetry-instrumentation-que.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activerecord', '~> 6.0' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-instrumentation-pg', '~> 0.20' diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index 335158fcc..9d3867c1c 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activesupport' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index 7e7d040a5..fff4f7f90 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index f74ab4b27..b9661b472 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.4.1' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.4.1' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 9d4381fa1..9a414e19d 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0' diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index 01d69d8fd..572977609 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk' diff --git a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec index c807200ba..3b8b39298 100644 --- a/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec +++ b/instrumentation/redis/opentelemetry-instrumentation-redis.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index 65c37cca3..8d8e4d163 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index 9ebd0db0d..ab0e52ba0 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-common', '~> 0.20.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 7a05cb260..66603e777 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk' diff --git a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec index 9efb01e48..740399830 100644 --- a/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec +++ b/instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec index 17e69232b..009da600c 100644 --- a/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec +++ b/instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_development_dependency 'activejob', '>= 6.0' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index 87fe3293b..0be3e8c3a 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.21' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' diff --git a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec index 23c9ab5ac..d3cad653a 100644 --- a/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec +++ b/instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' spec.add_dependency 'opentelemetry-semantic_conventions', '>= 1.8.0' - spec.add_development_dependency 'appraisal', '~> 2.2.0' + spec.add_development_dependency 'appraisal', '~> 2.5' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1' From b14901ebbdfc20306ef441e3e7bee3a7d6ea6d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 07:06:38 -0500 Subject: [PATCH 05/15] chore(deps): update rubocop requirement from ~> 1.55.1 to ~> 1.56.2 (#645) Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.55.1...v1.56.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e76b496d7..d39b109d8 100644 --- a/Gemfile +++ b/Gemfile @@ -7,4 +7,4 @@ source 'https://rubygems.org' gem 'rake', '~> 13.0' -gem 'rubocop', '~> 1.55.1' +gem 'rubocop', '~> 1.56.2' From da351f9edf4329d2287ff0ff4ba2ead6b55a164b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ka=C5=BAmierczak?= Date: Thu, 7 Sep 2023 04:22:52 +0200 Subject: [PATCH 06/15] fix!(instrumentation): Align messaging instrumentation operation names (#648) * fix!(active_job): rename 'send' operation to 'publish' * fix!(aws_sdk): rename 'send' operation to 'publish' * fix!(bunny): rename 'send' operation to 'publish' * fix!(delayed_job): rename 'send' operation to 'publish' * fix!(queue): rename 'send' operation to 'publish' * fix!(racecar): rename 'send' operation to 'publish' * fix!(rdkafka): rename 'send' operation to 'publish' * fix!(ruby_kafka): rename 'send' operation to 'publish' * fix!(sidekiq): rename 'send' operation to 'publish' --------- Co-authored-by: Sam <370182+plantfansam@users.noreply.github.com> --- .../patches/active_job_callbacks.rb | 2 +- .../patches/active_job_callbacks_test.rb | 68 +++++++++---------- .../instrumentation/aws_sdk/handler.rb | 2 +- .../opentelemetry/instrumentation_test.rb | 2 +- .../instrumentation/bunny/patch_helpers.rb | 2 +- .../bunny/patches/channel_test.rb | 26 +++---- .../bunny/patches/consumer_test.rb | 10 +-- .../bunny/patches/queue_test.rb | 6 +- .../delayed_job/plugins/tracer_plugin.rb | 4 +- .../delayed_job/plugins/tracer_plugin_test.rb | 6 +- .../instrumentation/que/patches/que_job.rb | 6 +- .../opentelemetry/instrumentation/que_test.rb | 58 ++++++++-------- .../racecar/patches/consumer.rb | 2 +- .../instrumentation/racecar_test.rb | 60 ++++++++-------- .../rdkafka/patches/producer.rb | 2 +- .../rdkafka/patches/consumer_test.rb | 22 +++--- .../rdkafka/patches/producer_test.rb | 2 +- .../resque/patches/resque_module.rb | 4 +- .../resque/patches/resque_test.rb | 8 +-- .../ruby_kafka/patches/client.rb | 2 +- .../ruby_kafka/patches/producer.rb | 2 +- .../ruby-kafka/patches/client_test.rb | 8 +-- .../ruby-kafka/patches/consumer_test.rb | 22 +++--- .../ruby-kafka/patches/producer_test.rb | 18 ++--- .../middlewares/client/tracer_middleware.rb | 4 +- .../client/tracer_middleware_test.rb | 8 +-- .../server/tracer_middleware_test.rb | 8 +-- 27 files changed, 182 insertions(+), 182 deletions(-) diff --git a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/patches/active_job_callbacks.rb b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/patches/active_job_callbacks.rb index f2a242310..c3f612599 100644 --- a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/patches/active_job_callbacks.rb +++ b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/patches/active_job_callbacks.rb @@ -14,7 +14,7 @@ def self.prepended(base) base.class_eval do around_enqueue do |job, block| span_kind = job.class.queue_adapter_name == 'inline' ? :client : :producer - span_name = "#{otel_config[:span_naming] == :job_class ? job.class : job.queue_name} send" + span_name = "#{otel_config[:span_naming] == :job_class ? job.class : job.queue_name} publish" span_attributes = job_attributes(job) otel_tracer.in_span(span_name, attributes: span_attributes, kind: span_kind) do OpenTelemetry.propagation.inject(job.metadata) diff --git a/instrumentation/active_job/test/instrumentation/active_job/patches/active_job_callbacks_test.rb b/instrumentation/active_job/test/instrumentation/active_job/patches/active_job_callbacks_test.rb index 7a01df947..f2c6f996c 100644 --- a/instrumentation/active_job/test/instrumentation/active_job/patches/active_job_callbacks_test.rb +++ b/instrumentation/active_job/test/instrumentation/active_job/patches/active_job_callbacks_test.rb @@ -16,7 +16,7 @@ let(:config) { { propagation_style: :link, force_flush: false, span_naming: :queue } } let(:exporter) { EXPORTER } let(:spans) { exporter.finished_spans } - let(:send_span) { spans.find { |s| s.name == 'default send' } } + let(:publish_span) { spans.find { |s| s.name == 'default publish' } } let(:process_span) { spans.find { |s| s.name == 'default process' } } before do @@ -41,7 +41,7 @@ it 'traces enqueuing and processing the job' do TestJob.perform_later - _(send_span).wont_be_nil + _(publish_span).wont_be_nil _(process_span).wont_be_nil end end @@ -50,7 +50,7 @@ it 'only traces processing the job' do TestJob.perform_now - _(send_span).must_be_nil + _(publish_span).must_be_nil _(process_span).wont_be_nil _(process_span.attributes['code.namespace']).must_equal('TestJob') _(process_span.attributes['code.function']).must_equal('perform_now') @@ -97,14 +97,14 @@ TestJob.perform_later - _(send_span.kind).must_equal(:client) + _(publish_span.kind).must_equal(:client) _(process_span.kind).must_equal(:server) end it 'sets correct span kinds for all other jobs' do TestJob.perform_later - _(send_span.kind).must_equal(:producer) + _(publish_span.kind).must_equal(:producer) _(process_span.kind).must_equal(:consumer) end end @@ -113,7 +113,7 @@ it 'sets the messaging.operation attribute only when processing the job' do TestJob.perform_later - _(send_span.attributes['messaging.operation']).must_be_nil + _(publish_span.attributes['messaging.operation']).must_be_nil _(process_span.attributes['messaging.operation']).must_equal('process') end @@ -121,7 +121,7 @@ it 'is sets correctly for inline jobs' do TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['net.transport']).must_equal('inproc') end end @@ -129,7 +129,7 @@ it 'is set correctly for async jobs' do TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['net.transport']).must_equal('inproc') end end @@ -139,7 +139,7 @@ it 'is unset for unprioritized jobs' do TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['messaging.active_job.priority']).must_be_nil end end @@ -147,7 +147,7 @@ it 'is set for jobs with a priority' do TestJob.set(priority: 1).perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['messaging.active_job.priority']).must_equal(1) end end @@ -157,7 +157,7 @@ it 'is unset for jobs that do not specify a wait time' do TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['messaging.active_job.scheduled_at']).must_be_nil end end @@ -166,8 +166,8 @@ job = TestJob.set(wait: 0.second).perform_later # Only the sending span is a 'scheduled' thing - _(send_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at) - assert(send_span.attributes['messaging.active_job.scheduled_at']) + _(publish_span.attributes['messaging.active_job.scheduled_at']).must_equal(job.scheduled_at) + assert(publish_span.attributes['messaging.active_job.scheduled_at']) # The processing span isn't a 'scheduled' thing _(process_span.attributes['messaging.active_job.scheduled_at']).must_be_nil @@ -185,7 +185,7 @@ ActiveJob::Base.queue_adapter = :inline TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['messaging.system']).must_equal('inline') end end @@ -193,7 +193,7 @@ it 'is set correctly for the async adapter' do TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['messaging.system']).must_equal('async') end end @@ -232,7 +232,7 @@ it 'generally sets other attributes as expected' do job = TestJob.perform_later - [send_span, process_span].each do |span| + [publish_span, process_span].each do |span| _(span.attributes['code.namespace']).must_equal('TestJob') _(span.attributes['messaging.destination_kind']).must_equal('queue') _(span.attributes['messaging.system']).must_equal('async') @@ -245,8 +245,8 @@ describe 'when queue - default' do it 'names spans according to the job queue' do TestJob.set(queue: :foo).perform_later - send_span = exporter.finished_spans.find { |s| s.name == 'foo send' } - _(send_span).wont_be_nil + publish_span = exporter.finished_spans.find { |s| s.name == 'foo publish' } + _(publish_span).wont_be_nil process_span = exporter.finished_spans.find { |s| s.name == 'foo process' } _(process_span).wont_be_nil @@ -258,8 +258,8 @@ it 'names span according to the job class' do TestJob.set(queue: :foo).perform_later - send_span = exporter.finished_spans.find { |s| s.name == 'TestJob send' } - _(send_span).wont_be_nil + publish_span = exporter.finished_spans.find { |s| s.name == 'TestJob publish' } + _(publish_span).wont_be_nil process_span = exporter.finished_spans.find { |s| s.name == 'TestJob process' } _(process_span).wont_be_nil @@ -309,11 +309,11 @@ it 'creates span links in separate traces' do TestJob.perform_later - _(send_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) _(process_span.total_recorded_links).must_equal(1) - _(process_span.links[0].span_context.trace_id).must_equal(send_span.trace_id) - _(process_span.links[0].span_context.span_id).must_equal(send_span.span_id) + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) end it 'propagates baggage' do @@ -322,11 +322,11 @@ BaggageJob.perform_later end - _(send_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) _(process_span.total_recorded_links).must_equal(1) - _(process_span.links[0].span_context.trace_id).must_equal(send_span.trace_id) - _(process_span.links[0].span_context.span_id).must_equal(send_span.span_id) + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) _(process_span.attributes['success']).must_equal(true) end end @@ -339,8 +339,8 @@ _(process_span.total_recorded_links).must_equal(0) - _(send_span.trace_id).must_equal(process_span.trace_id) - _(process_span.parent_span_id).must_equal(send_span.span_id) + _(publish_span.trace_id).must_equal(process_span.trace_id) + _(process_span.parent_span_id).must_equal(publish_span.span_id) end it 'propagates baggage' do @@ -350,8 +350,8 @@ end _(process_span.total_recorded_links).must_equal(0) - _(send_span.trace_id).must_equal(process_span.trace_id) - _(process_span.parent_span_id).must_equal(send_span.span_id) + _(publish_span.trace_id).must_equal(process_span.trace_id) + _(process_span.parent_span_id).must_equal(publish_span.span_id) _(process_span.attributes['success']).must_equal(true) end end @@ -364,8 +364,8 @@ _(process_span.total_recorded_links).must_equal(0) - _(send_span.trace_id).wont_equal(process_span.trace_id) - _(process_span.parent_span_id).wont_equal(send_span.span_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) + _(process_span.parent_span_id).wont_equal(publish_span.span_id) end it 'still propagates baggage' do @@ -376,8 +376,8 @@ _(process_span.total_recorded_links).must_equal(0) - _(send_span.trace_id).wont_equal(process_span.trace_id) - _(process_span.parent_span_id).wont_equal(send_span.span_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) + _(process_span.parent_span_id).wont_equal(publish_span.span_id) _(process_span.attributes['success']).must_equal(true) end end diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb index 50bad4617..a973adeb5 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb @@ -95,7 +95,7 @@ def span_kind(client_method) def span_name(context, client_method) case client_method when SQS_SEND_MESSAGE, SQS_SEND_MESSAGE_BATCH, SNS_PUBLISH - "#{MessagingHelper.queue_name(context)} send" + "#{MessagingHelper.queue_name(context)} publish" when SQS_RECEIVE_MESSAGE "#{MessagingHelper.queue_name(context)} receive" else diff --git a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb index ed07e858c..1917da5e0 100644 --- a/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb +++ b/instrumentation/aws_sdk/test/opentelemetry/instrumentation_test.rb @@ -205,7 +205,7 @@ sns_client.publish message: 'msg', phone_number: '123456' _(last_span.attributes['messaging.destination']).must_equal 'phone_number' - _(last_span.name).must_equal 'phone_number send' + _(last_span.name).must_equal 'phone_number publish' end end end diff --git a/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/patch_helpers.rb b/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/patch_helpers.rb index 8e2d0f4e6..4cb67b884 100644 --- a/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/patch_helpers.rb +++ b/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/patch_helpers.rb @@ -16,7 +16,7 @@ def self.with_send_span(channel, tracer, exchange, routing_key, &block) attributes = basic_attributes(channel, channel.connection, exchange, routing_key) destination = destination_name(exchange, routing_key) - tracer.in_span("#{destination} send", attributes: attributes, kind: :producer, &block) + tracer.in_span("#{destination} publish", attributes: attributes, kind: :producer, &block) end def self.with_process_span(channel, tracer, delivery_info, properties, &block) diff --git a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/channel_test.rb b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/channel_test.rb index f82c72bb1..737483c7e 100644 --- a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/channel_test.rb +++ b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/channel_test.rb @@ -48,17 +48,17 @@ _(spans.size >= 3).must_equal(true) - send_span = spans.find { |span| span.name == "#{topic}.ruby.news send" } - _(send_span).wont_be_nil - _(send_span.kind).must_equal(:producer) - _(send_span.attributes['messaging.system']).must_equal('rabbitmq') - _(send_span.attributes['messaging.destination']).must_equal(topic) - _(send_span.attributes['messaging.destination_kind']).must_equal('topic') - _(send_span.attributes['messaging.protocol']).must_equal('AMQP') - _(send_span.attributes['messaging.protocol_version']).must_equal('0.9.1') - _(send_span.attributes['messaging.rabbitmq.routing_key']).must_equal('ruby.news') - _(send_span.attributes['net.peer.name']).must_equal(host) - _(send_span.attributes['net.peer.port']).must_equal(port.to_i) + publish_span = spans.find { |span| span.name == "#{topic}.ruby.news publish" } + _(publish_span).wont_be_nil + _(publish_span.kind).must_equal(:producer) + _(publish_span.attributes['messaging.system']).must_equal('rabbitmq') + _(publish_span.attributes['messaging.destination']).must_equal(topic) + _(publish_span.attributes['messaging.destination_kind']).must_equal('topic') + _(publish_span.attributes['messaging.protocol']).must_equal('AMQP') + _(publish_span.attributes['messaging.protocol_version']).must_equal('0.9.1') + _(publish_span.attributes['messaging.rabbitmq.routing_key']).must_equal('ruby.news') + _(publish_span.attributes['net.peer.name']).must_equal(host) + _(publish_span.attributes['net.peer.port']).must_equal(port.to_i) receive_span = spans.find { |span| span.name == "#{topic}.ruby.news receive" } _(receive_span).wont_be_nil @@ -78,7 +78,7 @@ _(process_span.trace_id).must_equal(receive_span.trace_id) linked_span_context = process_span.links.first.span_context - _(linked_span_context.trace_id).must_equal(send_span.trace_id) - _(linked_span_context.span_id).must_equal(send_span.span_id) + _(linked_span_context.trace_id).must_equal(publish_span.trace_id) + _(linked_span_context.span_id).must_equal(publish_span.span_id) end end unless ENV['OMIT_SERVICES'] diff --git a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/consumer_test.rb b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/consumer_test.rb index d6322014e..2d19600bc 100644 --- a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/consumer_test.rb +++ b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/consumer_test.rb @@ -53,9 +53,9 @@ _(spans.size >= 3).must_equal(true) - send_span = spans.find { |span| span.name == "#{topic}.ruby.news send" } - _(send_span).wont_be_nil - _(send_span.kind).must_equal(:producer) + publish_span = spans.find { |span| span.name == "#{topic}.ruby.news publish" } + _(publish_span).wont_be_nil + _(publish_span.kind).must_equal(:producer) receive_span = spans.find { |span| span.name == "#{topic}.ruby.news receive" } _(receive_span).wont_be_nil @@ -68,7 +68,7 @@ _(process_span.trace_id).must_equal(receive_span.trace_id) linked_span_context = process_span.links.first.span_context - _(linked_span_context.trace_id).must_equal(send_span.trace_id) - _(linked_span_context.span_id).must_equal(send_span.span_id) + _(linked_span_context.trace_id).must_equal(publish_span.trace_id) + _(linked_span_context.span_id).must_equal(publish_span.span_id) end end unless ENV['OMIT_SERVICES'] diff --git a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/queue_test.rb b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/queue_test.rb index c0c90a292..86c2df1ee 100644 --- a/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/queue_test.rb +++ b/instrumentation/bunny/test/opentelemetry/instrumentation/bunny/patches/queue_test.rb @@ -47,8 +47,8 @@ queue.pop { |_delivery_info, _metadata, _payload| break } - send_span = spans.find { |span| span.name == ".#{queue_name} send" } - _(send_span).wont_be_nil + publish_span = spans.find { |span| span.name == ".#{queue_name} publish" } + _(publish_span).wont_be_nil receive_span = spans.find { |span| span.name == ".#{queue_name} receive" } _(receive_span).wont_be_nil @@ -58,7 +58,7 @@ _(process_span.kind).must_equal(:consumer) linked_span_context = process_span.links.first.span_context - _(linked_span_context.trace_id).must_equal(send_span.trace_id) + _(linked_span_context.trace_id).must_equal(publish_span.trace_id) end it 'traces messages returned' do diff --git a/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin.rb b/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin.rb index 5d9e49fd8..fccba0641 100644 --- a/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin.rb +++ b/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin.rb @@ -17,10 +17,10 @@ def instrument_enqueue(job, &block) return block.call(job) unless enabled? attributes = build_attributes(job) - attributes['messaging.operation'] = 'send' + attributes['messaging.operation'] = 'publish' attributes.compact! - tracer.in_span("#{job_queue(job)} send", attributes: attributes, kind: :producer) do |span| + tracer.in_span("#{job_queue(job)} publish", attributes: attributes, kind: :producer) do |span| yield job span.set_attribute('messaging.message_id', job.id.to_s) add_events(span, job) diff --git a/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb b/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb index 17f1f93a7..2f358cefe 100644 --- a/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb +++ b/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb @@ -65,13 +65,13 @@ def job_data _(exporter.finished_spans.size).must_equal 1 _(span).must_be_kind_of OpenTelemetry::SDK::Trace::SpanData - _(span.name).must_equal 'default send' + _(span.name).must_equal 'default publish' _(span.attributes['messaging.system']).must_equal 'delayed_job' _(span.attributes['messaging.destination']).must_equal 'default' _(span.attributes['messaging.destination_kind']).must_equal 'queue' _(span.attributes['messaging.delayed_job.name']).must_equal 'BasicPayload' _(span.attributes['messaging.delayed_job.priority']).must_equal 0 - _(span.attributes['messaging.operation']).must_equal 'send' + _(span.attributes['messaging.operation']).must_equal 'publish' _(span.attributes['messaging.message_id']).must_be_kind_of String _(span.events.size).must_equal 2 @@ -122,7 +122,7 @@ def job_data _(exporter.finished_spans).must_equal [] job_enqueue _(exporter.finished_spans.size).must_equal 1 - _(exporter.finished_spans.first.name).must_equal 'default send' + _(exporter.finished_spans.first.name).must_equal 'default publish' job_run _(exporter.finished_spans.size).must_equal 2 diff --git a/instrumentation/que/lib/opentelemetry/instrumentation/que/patches/que_job.rb b/instrumentation/que/lib/opentelemetry/instrumentation/que/patches/que_job.rb index 7e89e9f89..5be898984 100644 --- a/instrumentation/que/lib/opentelemetry/instrumentation/que/patches/que_job.rb +++ b/instrumentation/que/lib/opentelemetry/instrumentation/que/patches/que_job.rb @@ -22,7 +22,7 @@ def enqueue(*args, job_options: {}, **arg_opts) tracer = Que::Instrumentation.instance.tracer otel_config = Que::Instrumentation.instance.config - tracer.in_span('send', kind: :producer) do |span| + tracer.in_span('publish', kind: :producer) do |span| # Que doesn't have a good place to store metadata. There are # basically two options: the job payload and the job tags. # @@ -57,7 +57,7 @@ def enqueue(*args, job_options: {}, **arg_opts) job_attrs = job.que_attrs end - span.name = "#{job_attrs[:job_class]} send" + span.name = "#{job_attrs[:job_class]} publish" span.add_attributes(QueJob.job_attributes(job_attrs)) job @@ -73,7 +73,7 @@ def self.job_attributes(job_attrs) attributes = { 'messaging.system' => 'que', 'messaging.destination_kind' => 'queue', - 'messaging.operation' => 'send', + 'messaging.operation' => 'publish', 'messaging.destination' => job_attrs[:queue] || 'default', 'messaging.que.job_class' => job_attrs[:job_class], 'messaging.que.priority' => job_attrs[:priority] || 100 diff --git a/instrumentation/que/test/opentelemetry/instrumentation/que_test.rb b/instrumentation/que/test/opentelemetry/instrumentation/que_test.rb index 5c4c9bfd4..9ec9847c1 100644 --- a/instrumentation/que/test/opentelemetry/instrumentation/que_test.rb +++ b/instrumentation/que/test/opentelemetry/instrumentation/que_test.rb @@ -35,7 +35,7 @@ TestJobAsync.enqueue span = finished_spans.last - _(span.name).must_equal('TestJobAsync send') + _(span.name).must_equal('TestJobAsync publish') end it 'records attributes' do @@ -45,7 +45,7 @@ _(attributes['messaging.system']).must_equal('que') _(attributes['messaging.destination']).must_equal('default') _(attributes['messaging.destination_kind']).must_equal('queue') - _(attributes['messaging.operation']).must_equal('send') + _(attributes['messaging.operation']).must_equal('publish') _(attributes['messaging.message_id']).must_be_instance_of(Integer) _(attributes['messaging.que.job_class']).must_equal('TestJobAsync') _(attributes['messaging.que.priority']).must_equal(100) @@ -117,7 +117,7 @@ TestJobSync.enqueue span1 = finished_spans.last - _(span1.name).must_equal('TestJobSync send') + _(span1.name).must_equal('TestJobSync publish') span2 = finished_spans.first _(span2.name).must_equal('TestJobSync process') @@ -171,14 +171,14 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) _(process_span.total_recorded_links).must_equal(1) - _(process_span.links[0].span_context.trace_id).must_equal(send_span.trace_id) - _(process_span.links[0].span_context.span_id).must_equal(send_span.span_id) + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) end end @@ -191,11 +191,11 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).must_equal(process_span.trace_id) - _(process_span.parent_span_id).must_equal(send_span.span_id) + _(publish_span.trace_id).must_equal(process_span.trace_id) + _(process_span.parent_span_id).must_equal(publish_span.span_id) _(process_span.total_recorded_links).must_equal(0) end end @@ -221,11 +221,11 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).wont_equal(process_span.trace_id) - _(send_span.total_recorded_links).must_equal(0) + _(publish_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.total_recorded_links).must_equal(0) _(process_span.total_recorded_links).must_equal(0) end end @@ -281,7 +281,7 @@ def self.run(first, second); end end span = finished_spans.last - _(span.name).must_equal('TestJobAsync send') + _(span.name).must_equal('TestJobAsync publish') end it 'links spans together' do @@ -293,14 +293,14 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) _(process_span.total_recorded_links).must_equal(1) - _(process_span.links[0].span_context.trace_id).must_equal(send_span.trace_id) - _(process_span.links[0].span_context.span_id).must_equal(send_span.span_id) + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) end end @@ -376,7 +376,7 @@ def self.run(first, second); end end span1 = finished_spans.first - _(span1.name).must_equal('TestJobSync send') + _(span1.name).must_equal('TestJobSync publish') span2 = finished_spans.last _(span2.name).must_equal('TestJobSync process') @@ -429,14 +429,14 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.trace_id).wont_equal(process_span.trace_id) _(process_span.total_recorded_links).must_equal(1) - _(process_span.links[0].span_context.trace_id).must_equal(send_span.trace_id) - _(process_span.links[0].span_context.span_id).must_equal(send_span.span_id) + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) end end @@ -452,11 +452,11 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).must_equal(process_span.trace_id) - _(process_span.parent_span_id).must_equal(send_span.span_id) + _(publish_span.trace_id).must_equal(process_span.trace_id) + _(process_span.parent_span_id).must_equal(publish_span.span_id) _(process_span.total_recorded_links).must_equal(0) end end @@ -482,11 +482,11 @@ def self.run(first, second); end _(finished_spans.size).must_equal(2) - send_span = finished_spans.first + publish_span = finished_spans.first process_span = finished_spans.last - _(send_span.trace_id).wont_equal(process_span.trace_id) - _(send_span.total_recorded_links).must_equal(0) + _(publish_span.trace_id).wont_equal(process_span.trace_id) + _(publish_span.total_recorded_links).must_equal(0) _(process_span.total_recorded_links).must_equal(0) end end diff --git a/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/patches/consumer.rb b/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/patches/consumer.rb index f1d46eae8..ba711d575 100644 --- a/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/patches/consumer.rb +++ b/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/patches/consumer.rb @@ -19,7 +19,7 @@ def produce(payload, topic:, key: nil, partition: nil, partition_key: nil, heade headers ||= {} - tracer.in_span("#{topic} send", attributes: attributes, kind: :producer) do + tracer.in_span("#{topic} publish", attributes: attributes, kind: :producer) do OpenTelemetry.propagation.inject(headers) super end diff --git a/instrumentation/racecar/test/opentelemetry/instrumentation/racecar_test.rb b/instrumentation/racecar/test/opentelemetry/instrumentation/racecar_test.rb index 66b63d5ed..44be8030b 100644 --- a/instrumentation/racecar/test/opentelemetry/instrumentation/racecar_test.rb +++ b/instrumentation/racecar/test/opentelemetry/instrumentation/racecar_test.rb @@ -40,7 +40,7 @@ def produce(messages) producer.delivery_callback = ->(_) {} producer_messages.map do |msg| - tracer.in_span("#{msg[:topic]} send", kind: :producer) do + tracer.in_span("#{msg[:topic]} publish", kind: :producer) do msg[:headers] ||= {} OpenTelemetry.propagation.inject(msg[:headers]) producer.produce(**msg) @@ -120,9 +120,9 @@ def stop_racecar(thread) it 'traces each message and traces publishing' do process_spans = spans.select { |s| s.name == "#{topic_name} process" } - racecar_send_spans = spans.select { |s| s.name == "ack-#{topic_name} send" } + racecar_publish_spans = spans.select { |s| s.name == "ack-#{topic_name} publish" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.name).must_equal("#{topic_name} process") _(first_process_span.kind).must_equal(:consumer) @@ -132,20 +132,20 @@ def stop_racecar(thread) first_process_span_link = first_process_span.links[0] linked_span_context = first_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic_name} send") - _(linked_send_span.trace_id).must_equal(first_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic_name} publish") + _(linked_publish_span.trace_id).must_equal(first_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) # first racecar ack span - first_send_span = racecar_send_spans[0] - _(first_send_span.name).must_equal("ack-#{topic_name} send") - _(first_send_span.kind).must_equal(:producer) - _(first_send_span.instrumentation_library.name).must_equal('OpenTelemetry::Instrumentation::Racecar') - _(first_send_span.parent_span_id).must_equal(first_process_span.span_id) - _(first_send_span.trace_id).must_equal(first_process_span.trace_id) - - # Second pair of send and process spans + first_publish_span = racecar_publish_spans[0] + _(first_publish_span.name).must_equal("ack-#{topic_name} publish") + _(first_publish_span.kind).must_equal(:producer) + _(first_publish_span.instrumentation_library.name).must_equal('OpenTelemetry::Instrumentation::Racecar') + _(first_publish_span.parent_span_id).must_equal(first_process_span.span_id) + _(first_publish_span.trace_id).must_equal(first_process_span.trace_id) + + # Second pair of publish and process spans second_process_span = process_spans[1] _(second_process_span.name).must_equal("#{topic_name} process") _(second_process_span.kind).must_equal(:consumer) @@ -153,18 +153,18 @@ def stop_racecar(thread) second_process_span_link = second_process_span.links[0] linked_span_context = second_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic_name} send") - _(linked_send_span.trace_id).must_equal(second_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic_name} publish") + _(linked_publish_span.trace_id).must_equal(second_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) # second racecar ack span - second_send_span = racecar_send_spans[1] - _(second_send_span.name).must_equal("ack-#{topic_name} send") - _(second_send_span.kind).must_equal(:producer) - _(second_send_span.instrumentation_library.name).must_equal('OpenTelemetry::Instrumentation::Racecar') - _(second_send_span.parent_span_id).must_equal(second_process_span.span_id) - _(second_send_span.trace_id).must_equal(second_process_span.trace_id) + second_publish_span = racecar_publish_spans[1] + _(second_publish_span.name).must_equal("ack-#{topic_name} publish") + _(second_publish_span.kind).must_equal(:producer) + _(second_publish_span.instrumentation_library.name).must_equal('OpenTelemetry::Instrumentation::Racecar') + _(second_publish_span.parent_span_id).must_equal(second_process_span.span_id) + _(second_publish_span.trace_id).must_equal(second_process_span.trace_id) end describe 'when message keys are encoded differently' do @@ -212,7 +212,7 @@ def stop_racecar(thread) it 'can consume and publish a message' do process_spans = spans.select { |s| s.name == "#{topic_name} process" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.name).must_equal("#{topic_name} process") _(first_process_span.kind).must_equal(:consumer) @@ -222,10 +222,10 @@ def stop_racecar(thread) first_process_span_link = first_process_span.links[0] linked_span_context = first_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic_name} send") - _(linked_send_span.trace_id).must_equal(first_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic_name} publish") + _(linked_publish_span.trace_id).must_equal(first_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) event = first_process_span.events.first _(event.name).must_equal('exception') diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/patches/producer.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/patches/producer.rb index 7b234b70e..3515f9ca5 100644 --- a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/patches/producer.rb +++ b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/patches/producer.rb @@ -19,7 +19,7 @@ def produce(topic:, payload: nil, key: nil, partition: nil, partition_key: nil, headers ||= {} - tracer.in_span("#{topic} send", attributes: attributes, kind: :producer) do + tracer.in_span("#{topic} publish", attributes: attributes, kind: :producer) do OpenTelemetry.propagation.inject(headers) super 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 3ddcaf2f9..bfd2f9da7 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/consumer_test.rb @@ -72,7 +72,7 @@ process_spans = spans.select { |s| s.name == "#{topic_name} process" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.name).must_equal("#{topic_name} process") _(first_process_span.kind).must_equal(:consumer) @@ -82,12 +82,12 @@ first_process_span_link = first_process_span.links[0] linked_span_context = first_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic_name} send") - _(linked_send_span.trace_id).must_equal(first_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic_name} publish") + _(linked_publish_span.trace_id).must_equal(first_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) - # Second pair of send and process spans + # Second pair of publish and process spans second_process_span = process_spans[1] _(second_process_span.name).must_equal("#{topic_name} process") _(second_process_span.kind).must_equal(:consumer) @@ -95,10 +95,10 @@ second_process_span_link = second_process_span.links[0] linked_span_context = second_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic_name} send") - _(linked_send_span.trace_id).must_equal(second_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic_name} publish") + _(linked_publish_span.trace_id).must_equal(second_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) event = second_process_span.events.first _(event.name).must_equal('exception') @@ -148,7 +148,7 @@ _(spans.size).must_equal(4) process_spans = spans.select { |s| s.name == "#{topic_name} process" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.attributes).wont_include('messaging.kafka.message_key') 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 983d8b157..06e40de58 100644 --- a/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb +++ b/instrumentation/rdkafka/test/opentelemetry/instrumentation/rdkafka/patches/producer_test.rb @@ -48,7 +48,7 @@ delivery_handles.each(&:wait) - _(spans.first.name).must_equal("#{topic_name} send") + _(spans.first.name).must_equal("#{topic_name} publish") _(spans.first.kind).must_equal(:producer) _(spans.first.attributes['messaging.system']).must_equal('kafka') diff --git a/instrumentation/resque/lib/opentelemetry/instrumentation/resque/patches/resque_module.rb b/instrumentation/resque/lib/opentelemetry/instrumentation/resque/patches/resque_module.rb index 98d6de033..bde8b8737 100644 --- a/instrumentation/resque/lib/opentelemetry/instrumentation/resque/patches/resque_module.rb +++ b/instrumentation/resque/lib/opentelemetry/instrumentation/resque/patches/resque_module.rb @@ -35,8 +35,8 @@ def push(queue, item) } span_name = case config[:span_naming] - when :job_class then "#{job_class} send" - else "#{queue} send" + when :job_class then "#{job_class} publish" + else "#{queue} publish" end tracer.in_span(span_name, attributes: attributes, kind: :producer) do diff --git a/instrumentation/resque/test/opentelemetry/instrumentation/resque/patches/resque_test.rb b/instrumentation/resque/test/opentelemetry/instrumentation/resque/patches/resque_test.rb index 951add09b..1b8f7ee1a 100644 --- a/instrumentation/resque/test/opentelemetry/instrumentation/resque/patches/resque_test.rb +++ b/instrumentation/resque/test/opentelemetry/instrumentation/resque/patches/resque_test.rb @@ -26,7 +26,7 @@ it 'traces' do Resque.enqueue(DummyJob) - _(enqueue_span.name).must_equal('super_urgent send') + _(enqueue_span.name).must_equal('super_urgent publish') _(enqueue_span.attributes['messaging.system']).must_equal('resque') _(enqueue_span.attributes['messaging.resque.job_class']).must_equal('DummyJob') _(enqueue_span.attributes['messaging.destination']).must_equal('super_urgent') @@ -35,7 +35,7 @@ it 'traces when enqueued with Active Job' do DummyJobWithActiveJob.perform_later(1, 2) - _(enqueue_span.name).must_equal('super_urgent send') + _(enqueue_span.name).must_equal('super_urgent publish') _(enqueue_span.attributes['messaging.system']).must_equal('resque') _(enqueue_span.attributes['messaging.resque.job_class']).must_equal('DummyJobWithActiveJob') _(enqueue_span.attributes['messaging.destination']).must_equal('super_urgent') @@ -48,12 +48,12 @@ it 'uses the job class name for the span name' do Resque.enqueue(DummyJob) - _(enqueue_span.name).must_equal('DummyJob send') + _(enqueue_span.name).must_equal('DummyJob publish') end it 'uses the job class name when enqueued with Active Job' do DummyJobWithActiveJob.perform_later(1, 2) - _(enqueue_span.name).must_equal('DummyJobWithActiveJob send') + _(enqueue_span.name).must_equal('DummyJobWithActiveJob publish') end end end diff --git a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/client.rb b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/client.rb index 09996bd76..1e5a5d4da 100644 --- a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/client.rb +++ b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/client.rb @@ -24,7 +24,7 @@ def deliver_message(value, topic:, key: nil, headers: {}, partition: nil, partit attributes['messaging.kafka.partition'] = partition if partition - tracer.in_span("#{topic} send", attributes: attributes, kind: :producer) do + tracer.in_span("#{topic} publish", attributes: attributes, kind: :producer) do OpenTelemetry.propagation.inject(headers) super end diff --git a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/producer.rb b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/producer.rb index 5b1948546..8d7880be0 100644 --- a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/producer.rb +++ b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/patches/producer.rb @@ -22,7 +22,7 @@ def produce(value, topic:, key: nil, headers: {}, partition: nil, partition_key: # Thread's context, so the next two lines preserve the correct Thread-local context. ctx = OpenTelemetry.propagation.extract(headers) OpenTelemetry::Context.with_current(ctx) do - tracer.in_span("#{topic} send", attributes: attributes, kind: :producer) do + tracer.in_span("#{topic} publish", attributes: attributes, kind: :producer) do OpenTelemetry.propagation.inject(headers) super end diff --git a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/client_test.rb b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/client_test.rb index b6b97982e..a5c6a3e80 100644 --- a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/client_test.rb +++ b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/client_test.rb @@ -40,7 +40,7 @@ kafka.each_message(topic: topic) { |_msg| break } # rubocop:disable Lint/UnreachableLoop _(spans.size).must_equal(2) - _(spans[0].name).must_equal("#{topic} send") + _(spans[0].name).must_equal("#{topic} publish") _(spans[0].kind).must_equal(:producer) _(spans[1].name).must_equal("#{topic} process") @@ -57,9 +57,9 @@ break if counter >= 2 end - send_spans = spans.select { |s| s.name == "#{topic} send" } - _(send_spans[0].attributes).wont_include('messaging.kafka.message_key') - _(send_spans[1].attributes['messaging.kafka.message_key']).must_equal('foobarbaz') + publish_spans = spans.select { |s| s.name == "#{topic} publish" } + _(publish_spans[0].attributes).wont_include('messaging.kafka.message_key') + _(publish_spans[1].attributes['messaging.kafka.message_key']).must_equal('foobarbaz') process_spans = spans.select { |s| s.name == "#{topic} process" } _(process_spans[0].attributes).wont_include('messaging.kafka.message_key') diff --git a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/consumer_test.rb b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/consumer_test.rb index 5c9937a26..2a175612b 100644 --- a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/consumer_test.rb +++ b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/consumer_test.rb @@ -58,7 +58,7 @@ process_spans = spans.select { |s| s.name == "#{topic} process" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.name).must_equal("#{topic} process") _(first_process_span.kind).must_equal(:consumer) @@ -68,12 +68,12 @@ first_process_span_link = first_process_span.links[0] linked_span_context = first_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic} send") - _(linked_send_span.trace_id).must_equal(first_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic} publish") + _(linked_publish_span.trace_id).must_equal(first_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) - # Second pair of send and process spans + # Second pair of publish and process spans second_process_span = process_spans[1] _(second_process_span.name).must_equal("#{topic} process") _(second_process_span.kind).must_equal(:consumer) @@ -81,10 +81,10 @@ second_process_span_link = second_process_span.links[0] linked_span_context = second_process_span_link.span_context - linked_send_span = spans.find { |s| s.span_id == linked_span_context.span_id } - _(linked_send_span.name).must_equal("#{topic} send") - _(linked_send_span.trace_id).must_equal(second_process_span.trace_id) - _(linked_send_span.trace_id).must_equal(linked_span_context.trace_id) + linked_publish_span = spans.find { |s| s.span_id == linked_span_context.span_id } + _(linked_publish_span.name).must_equal("#{topic} publish") + _(linked_publish_span.trace_id).must_equal(second_process_span.trace_id) + _(linked_publish_span.trace_id).must_equal(linked_span_context.trace_id) event = second_process_span.events.first _(event.name).must_equal('exception') @@ -106,7 +106,7 @@ process_spans = spans.select { |s| s.name == "#{topic} process" } - # First pair for send and process spans + # First pair for publish and process spans first_process_span = process_spans[0] _(first_process_span.attributes).wont_include('messaging.kafka.message_key') diff --git a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/producer_test.rb b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/producer_test.rb index 15c298437..8324e1000 100644 --- a/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/producer_test.rb +++ b/instrumentation/ruby_kafka/test/opentelemetry/instrumentation/ruby-kafka/patches/producer_test.rb @@ -24,8 +24,8 @@ let(:producer) { kafka.producer } let(:consumer) { kafka.consumer(group_id: SecureRandom.uuid, fetcher_max_queue_size: 1) } let(:async_producer) { kafka.async_producer(delivery_threshold: 1000) } - let(:send_span) { EXPORTER.finished_spans.find { |sp| sp.name == "#{topic} send" } } - let(:async_send_span) { EXPORTER.finished_spans.find { |sp| sp.name == "#{async_topic} send" } } + let(:publish_span) { EXPORTER.finished_spans.find { |sp| sp.name == "#{topic} publish" } } + let(:async_publish_span) { EXPORTER.finished_spans.find { |sp| sp.name == "#{async_topic} publish" } } before do kafka.create_topic(topic) @@ -54,7 +54,7 @@ producer.produce('hello', topic: topic) producer.deliver_messages - _(spans.first.name).must_equal("#{topic} send") + _(spans.first.name).must_equal("#{topic} publish") _(spans.first.kind).must_equal(:producer) _(spans.first.attributes['messaging.system']).must_equal('kafka') @@ -68,7 +68,7 @@ # Wait for the async calls to produce spans wait_for(error_message: 'Max wait time exceeded for async producer') { EXPORTER.finished_spans.size.positive? } - _(spans.first.name).must_equal("#{async_topic} send") + _(spans.first.name).must_equal("#{async_topic} publish") _(spans.first.kind).must_equal(:producer) _(spans.first.attributes['messaging.system']).must_equal('kafka') @@ -83,8 +83,8 @@ producer.deliver_messages end - _(send_span.hex_parent_span_id).must_equal(span_id) - _(send_span.hex_trace_id).must_equal(trace_id) + _(publish_span.hex_parent_span_id).must_equal(span_id) + _(publish_span.hex_trace_id).must_equal(trace_id) end it 'propagates context when tracing async produce calls' do @@ -98,8 +98,8 @@ # Wait for the async calls to produce spans wait_for(error_message: 'Max wait time exceeded for async producer') { EXPORTER.finished_spans.size == 2 } - _(async_send_span.trace_id).must_equal(sp.context.trace_id) - _(async_send_span.parent_span_id).must_equal(sp.context.span_id) + _(async_publish_span.trace_id).must_equal(sp.context.trace_id) + _(async_publish_span.parent_span_id).must_equal(sp.context.span_id) end it 'propagates context for nonrecording spans' do @@ -122,7 +122,7 @@ end sp.finish _(EXPORTER.finished_spans.size).must_equal(2) - _(send_span.hex_parent_span_id).must_equal(sp.context.hex_span_id) + _(publish_span.hex_parent_span_id).must_equal(sp.context.hex_span_id) end end end unless ENV['OMIT_SERVICES'] diff --git a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb index 02105564b..039390a8f 100644 --- a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb +++ b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb @@ -25,8 +25,8 @@ def call(_worker_class, job, _queue, _redis_pool) attributes[SemanticConventions::Trace::PEER_SERVICE] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service] span_name = case instrumentation_config[:span_naming] - when :job_class then "#{job['wrapped']&.to_s || job['class']} send" - else "#{job['queue']} send" + when :job_class then "#{job['wrapped']&.to_s || job['class']} publish" + else "#{job['queue']} publish" end tracer.in_span(span_name, attributes: attributes, kind: :producer) do |span| diff --git a/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware_test.rb b/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware_test.rb index b76c490c4..a2de3d05d 100644 --- a/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware_test.rb +++ b/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware_test.rb @@ -35,7 +35,7 @@ _(exporter.finished_spans.size).must_equal 1 - _(enqueue_span.name).must_equal 'default send' + _(enqueue_span.name).must_equal 'default publish' _(enqueue_span.kind).must_equal :producer _(enqueue_span.parent_span_id).must_equal OpenTelemetry::Trace::INVALID_SPAN_ID _(enqueue_span.attributes['messaging.system']).must_equal 'sidekiq' @@ -49,7 +49,7 @@ it 'traces when enqueued with Active Job' do SimpleJobWithActiveJob.perform_later(1, 2) - _(enqueue_span.name).must_equal('default send') + _(enqueue_span.name).must_equal('default publish') _(enqueue_span.attributes['messaging.system']).must_equal('sidekiq') _(enqueue_span.attributes['messaging.sidekiq.job_class']).must_equal('SimpleJobWithActiveJob') _(enqueue_span.attributes['messaging.destination']).must_equal('default') @@ -62,12 +62,12 @@ it 'uses the job class name for the span name' do SimpleJob.perform_async - _(enqueue_span.name).must_equal('SimpleJob send') + _(enqueue_span.name).must_equal('SimpleJob publish') end it 'uses the job class name when enqueued with Active Job' do SimpleJobWithActiveJob.perform_later(1, 2) - _(enqueue_span.name).must_equal('SimpleJobWithActiveJob send') + _(enqueue_span.name).must_equal('SimpleJobWithActiveJob publish') end end diff --git a/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware_test.rb b/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware_test.rb index 716ca8373..145d3b743 100644 --- a/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware_test.rb +++ b/instrumentation/sidekiq/test/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware_test.rb @@ -123,7 +123,7 @@ # root job that enqueues another job _(root_span.parent_span_id).must_equal OpenTelemetry::Trace::INVALID_SPAN_ID - _(root_span.name).must_equal 'default send' + _(root_span.name).must_equal 'default publish' _(root_span.kind).must_equal :producer # process span is linked to the root enqueuing job @@ -133,7 +133,7 @@ # enquene span is child to the parent process job child_span2 = spans.find { |s| s.parent_span_id == child_span1.span_id } - _(child_span2.name).must_equal 'default send' + _(child_span2.name).must_equal 'default publish' _(child_span2.kind).must_equal :producer # last process job is linked back to the process job that enqueued it @@ -182,7 +182,7 @@ _(exporter.finished_spans.size).must_equal 4 _(root_span.parent_span_id).must_equal OpenTelemetry::Trace::INVALID_SPAN_ID - _(root_span.name).must_equal 'default send' + _(root_span.name).must_equal 'default publish' _(root_span.kind).must_equal :producer child_span1 = spans.find { |s| s.parent_span_id == root_span.span_id } @@ -190,7 +190,7 @@ _(child_span1.kind).must_equal :consumer child_span2 = spans.find { |s| s.parent_span_id == child_span1.span_id } - _(child_span2.name).must_equal 'default send' + _(child_span2.name).must_equal 'default publish' _(child_span2.kind).must_equal :producer child_span3 = spans.find { |s| s.parent_span_id == child_span2.span_id } From acca96d1902377b0a74e48d06c18763c91142075 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:39:16 -0500 Subject: [PATCH 07/15] chore(deps): bump actions/checkout from 3 to 4 (#649) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout 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-contrib-canary.yml | 4 ++-- .github/workflows/ci-contrib.yml | 4 ++-- .github/workflows/ci-instrumentation-canary.yml | 2 +- .../ci-instrumentation-with-services-canary.yml | 2 +- .../workflows/ci-instrumentation-with-services.yml | 12 ++++++------ .github/workflows/ci-instrumentation.yml | 2 +- .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-request.yml | 2 +- .github/workflows/release-retry.yml | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-contrib-canary.yml b/.github/workflows/ci-contrib-canary.yml index a0fe8b8ad..358b06544 100644 --- a/.github/workflows/ci-contrib-canary.yml +++ b/.github/workflows/ci-contrib-canary.yml @@ -20,7 +20,7 @@ jobs: name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -72,7 +72,7 @@ jobs: name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index 0be521fa0..7f9ee2038 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -22,7 +22,7 @@ jobs: name: "propagator-${{ matrix.gem }} / ${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -61,7 +61,7 @@ jobs: name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-canary.yml b/.github/workflows/ci-instrumentation-canary.yml index 6beffb1e3..4dd45a722 100644 --- a/.github/workflows/ci-instrumentation-canary.yml +++ b/.github/workflows/ci-instrumentation-canary.yml @@ -57,7 +57,7 @@ jobs: name: ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-with-services-canary.yml b/.github/workflows/ci-instrumentation-with-services-canary.yml index db9be3e56..b375afb7c 100644 --- a/.github/workflows/ci-instrumentation-with-services-canary.yml +++ b/.github/workflows/ci-instrumentation-with-services-canary.yml @@ -28,7 +28,7 @@ jobs: name: ${{ matrix.gem }} / ubuntu-latest / services runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 4284fee84..3b1f9a342 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -22,7 +22,7 @@ jobs: name: other / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -68,7 +68,7 @@ jobs: name: mysql / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -105,7 +105,7 @@ jobs: name: kafka / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -158,7 +158,7 @@ jobs: name: redis / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -202,7 +202,7 @@ jobs: name: postgresql / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: @@ -243,7 +243,7 @@ jobs: name: rabbitmq / ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index 53b0244c5..b5bacdeb2 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -48,7 +48,7 @@ jobs: name: ${{ matrix.gem }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Test Ruby 3.2" uses: ./.github/actions/test_gem with: diff --git a/.github/workflows/installation-tests.yml b/.github/workflows/installation-tests.yml index 83152651d..c5f792896 100644 --- a/.github/workflows/installation-tests.yml +++ b/.github/workflows/installation-tests.yml @@ -21,7 +21,7 @@ jobs: name: ${{ matrix.ruby-version }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} diff --git a/.github/workflows/release-hook-on-closed.yml b/.github/workflows/release-hook-on-closed.yml index cb22c6e4c..bbbcfd735 100644 --- a/.github/workflows/release-hook-on-closed.yml +++ b/.github/workflows/release-hook-on-closed.yml @@ -16,7 +16,7 @@ jobs: with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Toys run: "gem install --no-document toys" - name: Process release request diff --git a/.github/workflows/release-hook-on-push.yml b/.github/workflows/release-hook-on-push.yml index 0c5929047..1dfc480fd 100644 --- a/.github/workflows/release-hook-on-push.yml +++ b/.github/workflows/release-hook-on-push.yml @@ -17,7 +17,7 @@ jobs: with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Toys run: "gem install --no-document toys" - name: Update open releases diff --git a/.github/workflows/release-perform.yml b/.github/workflows/release-perform.yml index c7dfe7305..4e8b37bc6 100644 --- a/.github/workflows/release-perform.yml +++ b/.github/workflows/release-perform.yml @@ -26,7 +26,7 @@ jobs: with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Toys run: "gem install --no-document toys" - name: Perform release diff --git a/.github/workflows/release-request.yml b/.github/workflows/release-request.yml index b98f0ee47..964847450 100644 --- a/.github/workflows/release-request.yml +++ b/.github/workflows/release-request.yml @@ -20,7 +20,7 @@ jobs: with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Toys run: "gem install --no-document toys" - name: Open release pull request diff --git a/.github/workflows/release-retry.yml b/.github/workflows/release-retry.yml index d74b98d3f..dd5c3a81c 100644 --- a/.github/workflows/release-retry.yml +++ b/.github/workflows/release-retry.yml @@ -23,7 +23,7 @@ jobs: with: ruby-version: ${{ env.ruby_version }} - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Toys run: "gem install --no-document toys" - name: Retry release From d1ad4a7633073a0460061261fb1f7f1fd25455f8 Mon Sep 17 00:00:00 2001 From: Sander Jans Date: Thu, 7 Sep 2023 04:52:58 +0200 Subject: [PATCH 08/15] refactor: split resource_detectors into their own gems. (#639) * refactor: split resource_detectors into their own gems. * ruboproof. * rebase on upstream/main * chore: remove superfluous yard-doctest gem, add post_install_message to opentelemetry-resource_detectors gemspec. --------- Co-authored-by: Ariel Valentin --- .github/dependabot.yml | 8 + .github/workflows/ci-contrib-canary.yml | 2 + .github/workflows/ci-contrib.yml | 2 + .toys/.data/releases.yml | 10 + releases/Gemfile | 7 + .../opentelemetry/resource/detectors/azure.rb | 8 + .../detectors/google_cloud_platform.rb | 8 + .../opentelemetry-resource_detectors.gemspec | 3 + resources/azure/.rubocop.yml | 1 + resources/azure/.yardopts | 9 + resources/azure/CHANGELOG.md | 1 + resources/azure/Gemfile | 14 ++ resources/azure/LICENSE | 201 ++++++++++++++++++ resources/azure/README.md | 58 +++++ resources/azure/Rakefile | 28 +++ .../opentelemetry-resource-detector-azure.rb | 7 + .../lib/opentelemetry/resource/detector.rb | 23 ++ .../opentelemetry/resource/detector/azure.rb | 69 ++++++ .../resource/detector/azure/version.rb | 15 ++ ...ntelemetry-resource-detector-azure.gemspec | 44 ++++ .../resource/detector/azure_test.rb | 120 +++++++++++ resources/azure/test/test_helper.rb | 17 ++ resources/container/.yardopts | 6 +- ...emetry-resource-detector-container.gemspec | 1 - resources/container/test/test_helper.rb | 1 - resources/google_cloud_platform/.rubocop.yml | 1 + resources/google_cloud_platform/.yardopts | 9 + resources/google_cloud_platform/CHANGELOG.md | 1 + resources/google_cloud_platform/Gemfile | 14 ++ resources/google_cloud_platform/LICENSE | 201 ++++++++++++++++++ resources/google_cloud_platform/README.md | 72 +++++++ resources/google_cloud_platform/Rakefile | 28 +++ ...resource-detector-google_cloud_platform.rb | 7 + .../lib/opentelemetry/resource/detector.rb | 23 ++ .../detector/google_cloud_platform.rb | 72 +++++++ .../detector/google_cloud_platform/version.rb | 15 ++ ...rce-detector-google_cloud_platform.gemspec | 45 ++++ .../detector/google_cloud_platform_test.rb | 110 ++++++++++ .../google_cloud_platform/test/test_helper.rb | 17 ++ 39 files changed, 1273 insertions(+), 5 deletions(-) create mode 100644 resources/azure/.rubocop.yml create mode 100644 resources/azure/.yardopts create mode 100644 resources/azure/CHANGELOG.md create mode 100644 resources/azure/Gemfile create mode 100644 resources/azure/LICENSE create mode 100644 resources/azure/README.md create mode 100644 resources/azure/Rakefile create mode 100644 resources/azure/lib/opentelemetry-resource-detector-azure.rb create mode 100644 resources/azure/lib/opentelemetry/resource/detector.rb create mode 100644 resources/azure/lib/opentelemetry/resource/detector/azure.rb create mode 100644 resources/azure/lib/opentelemetry/resource/detector/azure/version.rb create mode 100644 resources/azure/opentelemetry-resource-detector-azure.gemspec create mode 100644 resources/azure/test/opentelemetry/resource/detector/azure_test.rb create mode 100644 resources/azure/test/test_helper.rb create mode 100644 resources/google_cloud_platform/.rubocop.yml create mode 100644 resources/google_cloud_platform/.yardopts create mode 100644 resources/google_cloud_platform/CHANGELOG.md create mode 100644 resources/google_cloud_platform/Gemfile create mode 100644 resources/google_cloud_platform/LICENSE create mode 100644 resources/google_cloud_platform/README.md create mode 100644 resources/google_cloud_platform/Rakefile create mode 100644 resources/google_cloud_platform/lib/opentelemetry-resource-detector-google_cloud_platform.rb create mode 100644 resources/google_cloud_platform/lib/opentelemetry/resource/detector.rb create mode 100644 resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform.rb create mode 100644 resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb create mode 100644 resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec create mode 100644 resources/google_cloud_platform/test/opentelemetry/resource/detector/google_cloud_platform_test.rb create mode 100644 resources/google_cloud_platform/test/test_helper.rb diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2c09a8945..bc622e2e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -177,7 +177,15 @@ updates: directory: "/resource_detectors" schedule: interval: weekly +- package-ecosystem: bundler + directory: "/resources/azure" + schedule: + interval: weekly - package-ecosystem: bundler directory: "/resources/container" schedule: interval: weekly +- package-ecosystem: bundler + directory: "/resources/google_cloud_platform" + schedule: + interval: weekly diff --git a/.github/workflows/ci-contrib-canary.yml b/.github/workflows/ci-contrib-canary.yml index 358b06544..ebf4f534a 100644 --- a/.github/workflows/ci-contrib-canary.yml +++ b/.github/workflows/ci-contrib-canary.yml @@ -64,7 +64,9 @@ jobs: matrix: gem: - resource_detectors + - resource-detector-azure - resource-detector-container + - resource-detector-google_cloud_platform os: - ubuntu-latest - macos-latest diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index 7f9ee2038..c2a86e1b0 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -55,7 +55,9 @@ jobs: matrix: gem: - resource_detectors + - resource-detector-azure - resource-detector-container + - resource-detector-google_cloud_platform os: - ubuntu-latest name: "opentelemetry-${{ matrix.gem }} / ${{ matrix.os }}" diff --git a/.toys/.data/releases.yml b/.toys/.data/releases.yml index f927c5112..da3c23ed4 100644 --- a/.toys/.data/releases.yml +++ b/.toys/.data/releases.yml @@ -208,7 +208,17 @@ gems: version_rb_path: lib/opentelemetry/resource/detectors/version.rb version_constant: [OpenTelemetry, Resource, Detectors, VERSION] + - name: opentelemetry-resource-detector-azure + directory: resources/azure + version_rb_path: lib/opentelemetry/resource/detector/azure/version.rb + version_constant: [OpenTelemetry, Resource, Detector, Azure, VERSION] + - name: opentelemetry-resource-detector-container directory: resources/container version_rb_path: lib/opentelemetry/resource/detector/container/version.rb version_constant: [OpenTelemetry, Resource, Detector, Container, VERSION] + + - name: opentelemetry-resource-detector-google_cloud_platform + directory: resources/google_cloud_platform + version_rb_path: lib/opentelemetry/resource/detector/google_cloud_platform/version.rb + version_constant: [OpenTelemetry, Resource, Detector, GoogleCloudPlatform, VERSION] diff --git a/releases/Gemfile b/releases/Gemfile index 16e0a0128..bfc49848d 100644 --- a/releases/Gemfile +++ b/releases/Gemfile @@ -51,3 +51,10 @@ Dir['../instrumentation/**/version.rb'].each do |f| version = File.read(f).match(/VERSION = '([\d\.]+)'/)[1] gem "opentelemetry-instrumentation-#{name}", version end + +Dir['../resources/**/version.rb'].each do |f| + name = f.match(%r{resources/(\w+)/lib})[1] + + version = File.read(f).match(/VERSION = '([\d\.]+)'/)[1] + gem "opentelemetry-resource-detector-#{name}", version +end diff --git a/resource_detectors/lib/opentelemetry/resource/detectors/azure.rb b/resource_detectors/lib/opentelemetry/resource/detectors/azure.rb index 41397ff5f..c27ccc012 100644 --- a/resource_detectors/lib/opentelemetry/resource/detectors/azure.rb +++ b/resource_detectors/lib/opentelemetry/resource/detectors/azure.rb @@ -10,12 +10,20 @@ module OpenTelemetry module Resource module Detectors # Azure contains detect class method for determining Azure environment resource attributes + # + # This gem has been moved into a separate gem: + # opentelemetry-resource-detector-azure + # + # Log a warning if someone still uses this gem for Azure Resource Detection module Azure extend self AZURE_METADATA_URI = 'http://169.254.169.254/metadata/instance/compute?api-version=2019-08-15' def detect + OpenTelemetry.logger.warn('Azure resource detector - The Azure resource detector has been moved to a separate gem. ' \ + 'Please use the "opentelemetry-resource-detector-azure" gem onwards.') + metadata = azure_metadata resource_attributes = {} diff --git a/resource_detectors/lib/opentelemetry/resource/detectors/google_cloud_platform.rb b/resource_detectors/lib/opentelemetry/resource/detectors/google_cloud_platform.rb index 75a0a64b5..17795ebf4 100644 --- a/resource_detectors/lib/opentelemetry/resource/detectors/google_cloud_platform.rb +++ b/resource_detectors/lib/opentelemetry/resource/detectors/google_cloud_platform.rb @@ -10,10 +10,18 @@ module OpenTelemetry module Resource module Detectors # GoogleCloudPlatform contains detect class method for determining gcp environment resource attributes + # + # This gem has been moved into a separate gem: + # opentelemetry-resource-detector-google_cloud_platform + # + # Log a warning if someone still uses this gem for GoogleCloudPlatform Resource Detection module GoogleCloudPlatform extend self def detect + OpenTelemetry.logger.warn('GoogleCloudPlatform resource detector - The GoogleCloudPlatform resource detector has been moved to a separate gem. ' \ + 'Please use the "opentelemetry-resource-detector-google_cloud_platform" gem onwards.') + gcp_env = Google::Cloud::Env.new resource_attributes = {} diff --git a/resource_detectors/opentelemetry-resource_detectors.gemspec b/resource_detectors/opentelemetry-resource_detectors.gemspec index 06d0f7264..449b89dab 100644 --- a/resource_detectors/opentelemetry-resource_detectors.gemspec +++ b/resource_detectors/opentelemetry-resource_detectors.gemspec @@ -36,6 +36,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' + spec.post_install_message = 'This gem has been deprecated. Please use opentelemetry-resource-detector-azure ' \ + 'or opentelemetry-resource-detector-google_cloud_platform onwards.' + if spec.respond_to?(:metadata) spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/resource_detectors' diff --git a/resources/azure/.rubocop.yml b/resources/azure/.rubocop.yml new file mode 100644 index 000000000..1248a2f82 --- /dev/null +++ b/resources/azure/.rubocop.yml @@ -0,0 +1 @@ +inherit_from: ../../.rubocop.yml diff --git a/resources/azure/.yardopts b/resources/azure/.yardopts new file mode 100644 index 000000000..7f834c16b --- /dev/null +++ b/resources/azure/.yardopts @@ -0,0 +1,9 @@ +--no-private +--title=OpenTelemetry Resource Detector Azure +--markup=markdown +--main=README.md +./lib/opentelemetry/resource/detector/**/*.rb +./lib/opentelemetry/resource/detector.rb +- +README.md +CHANGELOG.md diff --git a/resources/azure/CHANGELOG.md b/resources/azure/CHANGELOG.md new file mode 100644 index 000000000..da56bcc0f --- /dev/null +++ b/resources/azure/CHANGELOG.md @@ -0,0 +1 @@ +# Release History: opentelemetry-resource-detector-azure diff --git a/resources/azure/Gemfile b/resources/azure/Gemfile new file mode 100644 index 000000000..6ae9e48bc --- /dev/null +++ b/resources/azure/Gemfile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +source 'https://rubygems.org' + +gemspec + +group :development, :test do + gem 'byebug' unless RUBY_PLATFORM == 'java' + gem 'pry' +end diff --git a/resources/azure/LICENSE b/resources/azure/LICENSE new file mode 100644 index 000000000..1ef7dad2c --- /dev/null +++ b/resources/azure/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/resources/azure/README.md b/resources/azure/README.md new file mode 100644 index 000000000..1784ff070 --- /dev/null +++ b/resources/azure/README.md @@ -0,0 +1,58 @@ +# OpenTelemetry::Resource::Detector::Azure + +The `opentelemetry-resource-detector-azure` gem provides a Azure resource detector for OpenTelemetry. + +## What is OpenTelemetry? + +OpenTelemetry is an open source observability framework, providing a general-purpose API, SDK, and related tools required for the instrumentation of cloud-native software, frameworks, and libraries. + +OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools. + +## How does this gem fit in? + +The `opentelemetry-resource-detector-azure` gem provides a means of retrieving a resource for supported environments following the resource semantic conventions. + +## How do I get started? + +Install the gem using: + +``` +gem install opentelemetry-sdk +gem install opentelemetry-resource-detector-azure +``` + +Or, if you use Bundler, include `opentelemetry-sdk` and `opentelemetry-resource-detector-azure` in your `Gemfile`. + +```rb +require 'opentelemetry/sdk' +require 'opentelemetry/resource/detector' + +OpenTelemetry::SDK.configure do |c| + c.resource = OpenTelemetry::Resource::Detector::Azure.detect +end +``` + +This will populate the following resource attributes for compute running on Azure: + +* `cloud.provider` +* `cloud.account.id` +* `cloud.platform` +* `cloud.region` +* `cloud.availability_zone` +* `host.id` +* `host.image.id` +* `host.name` +* `host.type` + +## How can I get involved? + +The `opentelemetry-resource-detector-azure` gem source is on GitHub, along with related gems. + +The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the meeting calendar for dates and times. For more information on this and other language SIGs, see the OpenTelemetry community page. + +## License + +The `opentelemetry-resource-detector-azure` gem is distributed under the Apache 2.0 license. See LICENSE for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/discussions +[k8sattributesprocessor-url]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/k8sattributesprocessor/README.md \ No newline at end of file diff --git a/resources/azure/Rakefile b/resources/azure/Rakefile new file mode 100644 index 000000000..1a64ba842 --- /dev/null +++ b/resources/azure/Rakefile @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/gem_tasks' +require 'rake/testtask' +require 'yard' +require 'rubocop/rake_task' + +RuboCop::RakeTask.new + +Rake::TestTask.new :test do |t| + t.libs << 'test' + t.libs << 'lib' + t.test_files = FileList['test/**/*_test.rb'] +end + +YARD::Rake::YardocTask.new do |t| + t.stats_options = ['--list-undoc'] +end + +if RUBY_ENGINE == 'truffleruby' + task default: %i[test] +else + task default: %i[test rubocop yard] +end diff --git a/resources/azure/lib/opentelemetry-resource-detector-azure.rb b/resources/azure/lib/opentelemetry-resource-detector-azure.rb new file mode 100644 index 000000000..a740ef21c --- /dev/null +++ b/resources/azure/lib/opentelemetry-resource-detector-azure.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'opentelemetry/resource/detector' diff --git a/resources/azure/lib/opentelemetry/resource/detector.rb b/resources/azure/lib/opentelemetry/resource/detector.rb new file mode 100644 index 000000000..98c0e367f --- /dev/null +++ b/resources/azure/lib/opentelemetry/resource/detector.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'opentelemetry/sdk' +require 'opentelemetry/resource/detector/azure' +require 'opentelemetry/resource/detector/azure/version' + +# OpenTelemetry is an open source observability framework, providing a +# general-purpose API, SDK, and related tools required for the instrumentation +# of cloud-native software, frameworks, and libraries. +# +# The OpenTelemetry module provides global accessors for telemetry objects. +# See the documentation for the `opentelemetry-api` gem for details. +module OpenTelemetry + module Resource + # Detector contains the resource detectors + module Detector + end + end +end diff --git a/resources/azure/lib/opentelemetry/resource/detector/azure.rb b/resources/azure/lib/opentelemetry/resource/detector/azure.rb new file mode 100644 index 000000000..2b7e51a85 --- /dev/null +++ b/resources/azure/lib/opentelemetry/resource/detector/azure.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'net/http' + +module OpenTelemetry + module Resource + module Detector + # Azure contains detect class method for determining Azure environment resource attributes + module Azure + extend self + + AZURE_METADATA_URI = 'http://169.254.169.254/metadata/instance/compute?api-version=2019-08-15' + + def detect + metadata = azure_metadata + resource_attributes = {} + + unless metadata.nil? + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_PROVIDER] = 'azure' + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_ACCOUNT_ID] = metadata['subscriptionId'] + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_PLATFORM] = cloud_platform(metadata['provider']) + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_REGION] = metadata['location'] + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_AVAILABILITY_ZONE] = metadata['zone'] + + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_ID] = metadata['vmId'] + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_IMAGE_ID] = metadata.dig('storageProfile', 'imageReference', 'id') + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_TYPE] = metadata['vmSize'] + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_NAME] = metadata['name'] + end + + resource_attributes.delete_if { |_key, value| value.nil? || value.empty? } + OpenTelemetry::SDK::Resources::Resource.create(resource_attributes) + end + + private + + def azure_metadata + uri = URI(AZURE_METADATA_URI) + + req = Net::HTTP::Get.new(uri) + req['Metadata'] = 'true' + + response = Net::HTTP.start(uri.hostname, uri.port, open_timeout: 2) do |http| + http.request(req) + end + + return unless response.code == '200' + + JSON.parse(response.body) + rescue Errno::EHOSTDOWN, Net::OpenTimeout, SocketError + nil + end + + def cloud_platform(metadata) + case metadata + when 'Microsoft.Compute' + 'azure_vm' + else + '' + end + end + end + end + end +end diff --git a/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb b/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb new file mode 100644 index 000000000..3a629249c --- /dev/null +++ b/resources/azure/lib/opentelemetry/resource/detector/azure/version.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Resource + module Detector + module Azure + VERSION = '0.1.0' + end + end + end +end diff --git a/resources/azure/opentelemetry-resource-detector-azure.gemspec b/resources/azure/opentelemetry-resource-detector-azure.gemspec new file mode 100644 index 000000000..057091148 --- /dev/null +++ b/resources/azure/opentelemetry-resource-detector-azure.gemspec @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'opentelemetry/resource/detector/azure/version' + +Gem::Specification.new do |spec| + spec.name = 'opentelemetry-resource-detector-azure' + spec.version = OpenTelemetry::Resource::Detector::Azure::VERSION + spec.authors = ['OpenTelemetry Authors'] + spec.email = ['cncf-opentelemetry-contributors@lists.cncf.io'] + + spec.summary = 'Azure resource detection helpers for OpenTelemetry' + spec.description = 'Azure resource detection helpers for OpenTelemetry' + spec.homepage = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib' + spec.license = 'Apache-2.0' + + spec.files = Dir.glob('lib/**/*.rb') + + Dir.glob('*.md') + + ['LICENSE', '.yardopts'] + spec.require_paths = ['lib'] + spec.required_ruby_version = '>= 2.6.0' + + spec.add_dependency 'opentelemetry-sdk', '~> 1.0' + + 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.55.1' + spec.add_development_dependency 'simplecov', '~> 0.17' + spec.add_development_dependency 'webmock', '~> 3.18.1' + spec.add_development_dependency 'yard', '~> 0.9' + + if spec.respond_to?(:metadata) + spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" + spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/resources/container' + 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 +end diff --git a/resources/azure/test/opentelemetry/resource/detector/azure_test.rb b/resources/azure/test/opentelemetry/resource/detector/azure_test.rb new file mode 100644 index 000000000..a4416b1d4 --- /dev/null +++ b/resources/azure/test/opentelemetry/resource/detector/azure_test.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'test_helper' + +describe OpenTelemetry::Resource::Detector::Azure do + before do + WebMock.disable_net_connect! + stub_request(:get, 'http://169.254.169.254/metadata/instance/compute?api-version=2019-08-15') + .with( + headers: { + 'Accept' => '*/*', + 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', + 'Host' => '169.254.169.254', + 'Metadata' => 'true', + 'User-Agent' => 'Ruby' + } + ).to_raise(SocketError) + end + + after do + WebMock.allow_net_connect! + end + + let(:detector) { OpenTelemetry::Resource::Detector::Azure } + + describe '.detect' do + let(:detected_resource) { detector.detect } + let(:detected_resource_attributes) { detected_resource.attribute_enumerator.to_h } + let(:expected_resource_attributes) { {} } + + describe 'when NOT in an azure environment' do + it 'returns an empty resource' do + _(detected_resource).must_be_instance_of(OpenTelemetry::SDK::Resources::Resource) + _(detected_resource_attributes).must_equal(expected_resource_attributes) + end + end + + describe 'when in an azure VM environment' do + let(:project_id) { 'opentelemetry' } + let(:azure_metadata) do + { + 'subscriptionId' => project_id, + 'provider' => 'Microsoft.Compute', + 'location' => 'westeurope', + 'zone' => '2', + 'vmId' => '012345671234-abcd-1234-0123456789ab', + 'storageProfile' => { + 'imageReference' => { + 'id' => '/subscriptions/12345678-abcd-1234-abcd-0123456789ab/resourceGroups/AKS-Ubuntu/providers/Microsoft.Compute/galleries/AKSUbuntu/images/1804gen2containerd/versions/2022.06.22' + } + }, + 'vmSize' => 'Standard_D2s_v3', + 'name' => 'opentelemetry' + }.to_json + end + + before do + metadata = Minitest::Mock.new + metadata.expect(:code, 200) + metadata.expect(:body, azure_metadata) + metadata.expect(:nil?, false) + + WebMock.disable_net_connect! + stub_request(:get, 'http://169.254.169.254/metadata/instance/compute?api-version=2019-08-15') + .with( + headers: { + 'Accept' => '*/*', + 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', + 'Host' => '169.254.169.254', + 'Metadata' => 'true', + 'User-Agent' => 'Ruby' + } + ).to_return(status: 200, body: azure_metadata, headers: {}) + end + + after do + WebMock.allow_net_connect! + end + + let(:expected_resource_attributes) do + { + 'cloud.provider' => 'azure', + 'cloud.account.id' => 'opentelemetry', + 'cloud.platform' => 'azure_vm', + 'cloud.region' => 'westeurope', + 'cloud.availability_zone' => '2', + 'host.id' => '012345671234-abcd-1234-0123456789ab', + 'host.image.id' => '/subscriptions/12345678-abcd-1234-abcd-0123456789ab/resourceGroups/AKS-Ubuntu/providers/Microsoft.Compute/galleries/AKSUbuntu/images/1804gen2containerd/versions/2022.06.22', + 'host.name' => 'opentelemetry', + 'host.type' => 'Standard_D2s_v3' + } + end + + it 'returns a resource with azure attributes' do + _(detected_resource).must_be_instance_of(OpenTelemetry::SDK::Resources::Resource) + _(detected_resource_attributes).must_equal(expected_resource_attributes) + end + + describe 'and a nil resource value is detected' do + let(:project_id) { nil } + + it 'returns a resource without that attribute' do + _(detected_resource_attributes.key?('cloud.account.id')).must_equal(false) + end + end + + describe 'and an empty string resource value is detected' do + let(:project_id) { '' } + + it 'returns a resource without that attribute' do + _(detected_resource_attributes.key?('cloud.account.id')).must_equal(false) + end + end + end + end +end diff --git a/resources/azure/test/test_helper.rb b/resources/azure/test/test_helper.rb new file mode 100644 index 000000000..3727952a1 --- /dev/null +++ b/resources/azure/test/test_helper.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/setup' +Bundler.require(:default, :development, :test) + +SimpleCov.minimum_coverage 85 +SimpleCov.start + +require 'opentelemetry-resource-detector-azure' +require 'minitest/autorun' +require 'webmock/minitest' + +OpenTelemetry.logger = Logger.new($stderr, level: ENV.fetch('OTEL_LOG_LEVEL', 'fatal').to_sym) diff --git a/resources/container/.yardopts b/resources/container/.yardopts index e65a4667a..c6faada6c 100644 --- a/resources/container/.yardopts +++ b/resources/container/.yardopts @@ -1,9 +1,9 @@ --no-private ---title=OpenTelemetry Resource Detectors Container +--title=OpenTelemetry Resource Detector Container --markup=markdown --main=README.md -./lib/opentelemetry/resource/detectors/**/*.rb -./lib/opentelemetry/resource/detectors.rb +./lib/opentelemetry/resource/detector/**/*.rb +./lib/opentelemetry/resource/detector.rb - README.md CHANGELOG.md diff --git a/resources/container/opentelemetry-resource-detector-container.gemspec b/resources/container/opentelemetry-resource-detector-container.gemspec index a20dbd340..baf1db746 100644 --- a/resources/container/opentelemetry-resource-detector-container.gemspec +++ b/resources/container/opentelemetry-resource-detector-container.gemspec @@ -32,7 +32,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17' - spec.add_development_dependency 'webmock', '~> 3.18.1' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/resources/container/test/test_helper.rb b/resources/container/test/test_helper.rb index e7274e33d..1937b514a 100644 --- a/resources/container/test/test_helper.rb +++ b/resources/container/test/test_helper.rb @@ -12,6 +12,5 @@ require 'opentelemetry-resource-detector-container' require 'minitest/autorun' -require 'webmock/minitest' OpenTelemetry.logger = Logger.new($stderr, level: ENV.fetch('OTEL_LOG_LEVEL', 'fatal').to_sym) diff --git a/resources/google_cloud_platform/.rubocop.yml b/resources/google_cloud_platform/.rubocop.yml new file mode 100644 index 000000000..1248a2f82 --- /dev/null +++ b/resources/google_cloud_platform/.rubocop.yml @@ -0,0 +1 @@ +inherit_from: ../../.rubocop.yml diff --git a/resources/google_cloud_platform/.yardopts b/resources/google_cloud_platform/.yardopts new file mode 100644 index 000000000..bfbc5db2f --- /dev/null +++ b/resources/google_cloud_platform/.yardopts @@ -0,0 +1,9 @@ +--no-private +--title=OpenTelemetry Resource Detector Google Cloud Platform +--markup=markdown +--main=README.md +./lib/opentelemetry/resource/detector/**/*.rb +./lib/opentelemetry/resource/detector.rb +- +README.md +CHANGELOG.md diff --git a/resources/google_cloud_platform/CHANGELOG.md b/resources/google_cloud_platform/CHANGELOG.md new file mode 100644 index 000000000..03d7f86f9 --- /dev/null +++ b/resources/google_cloud_platform/CHANGELOG.md @@ -0,0 +1 @@ +# Release History: opentelemetry-resource-detector-google_cloud_platform diff --git a/resources/google_cloud_platform/Gemfile b/resources/google_cloud_platform/Gemfile new file mode 100644 index 000000000..6ae9e48bc --- /dev/null +++ b/resources/google_cloud_platform/Gemfile @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +source 'https://rubygems.org' + +gemspec + +group :development, :test do + gem 'byebug' unless RUBY_PLATFORM == 'java' + gem 'pry' +end diff --git a/resources/google_cloud_platform/LICENSE b/resources/google_cloud_platform/LICENSE new file mode 100644 index 000000000..1ef7dad2c --- /dev/null +++ b/resources/google_cloud_platform/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/resources/google_cloud_platform/README.md b/resources/google_cloud_platform/README.md new file mode 100644 index 000000000..fb928269b --- /dev/null +++ b/resources/google_cloud_platform/README.md @@ -0,0 +1,72 @@ +# OpenTelemetry::Resource::Detector::GoogleCloudPlatform + +The `opentelemetry-resource-detector-google_cloud_platform` gem provides a Google Cloud Platform resource detector for OpenTelemetry. + +## What is OpenTelemetry? + +OpenTelemetry is an open source observability framework, providing a general-purpose API, SDK, and related tools required for the instrumentation of cloud-native software, frameworks, and libraries. + +OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools. + +## How does this gem fit in? + +The `opentelemetry-resource-detector-google_cloud_platform` gem provides a means of retrieving a resource for supported environments following the resource semantic conventions. + +## How do I get started? + +Install the gem using: + +``` +gem install opentelemetry-sdk +gem install opentelemetry-resource-detector-google_cloud_platform +``` + +Or, if you use Bundler, include `opentelemetry-sdk` and `opentelemetry-resource-detector-google_cloud_platform` in your `Gemfile`. + +```rb +require 'opentelemetry/sdk' +require 'opentelemetry/resource/detector' + +OpenTelemetry::SDK.configure do |c| + c.resource = OpenTelemetry::Resource::Detector::GoogleCloudPlatform.detect +end +``` + + +This will populate the following resource attributes for compute running on Google Cloud Platform: + +* Compute Engine: +* * `cloud.provider` +* * `cloud.account.id` +* * `cloud.region` +* * `cloud.availability_zone` +* * `host.id` +* * `host.name` + +* Google Kubernetes Engine: +* * `k8s.cluster.name` +* * `k8s.namespace.name` +* * `k8s.pod.name` +* * `k8s.node.name` +* * `container.name` + +* Google Cloud Run: +* * `cloud.provider` +* * `cloud.account.id` +* * `cloud.region` +* * `cloud.availability_zone` +* * `faas.name` +* * `faas.version` + +## How can I get involved? + +The `opentelemetry-resource-detector-google_cloud_platform` gem source is on GitHub, along with related gems. + +The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the meeting calendar for dates and times. For more information on this and other language SIGs, see the OpenTelemetry community page. + +## License + +The `opentelemetry-resource-detector-google_cloud_platform` gem is distributed under the Apache 2.0 license. See LICENSE for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/discussions +[k8sattributesprocessor-url]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/k8sattributesprocessor/README.md \ No newline at end of file diff --git a/resources/google_cloud_platform/Rakefile b/resources/google_cloud_platform/Rakefile new file mode 100644 index 000000000..1a64ba842 --- /dev/null +++ b/resources/google_cloud_platform/Rakefile @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/gem_tasks' +require 'rake/testtask' +require 'yard' +require 'rubocop/rake_task' + +RuboCop::RakeTask.new + +Rake::TestTask.new :test do |t| + t.libs << 'test' + t.libs << 'lib' + t.test_files = FileList['test/**/*_test.rb'] +end + +YARD::Rake::YardocTask.new do |t| + t.stats_options = ['--list-undoc'] +end + +if RUBY_ENGINE == 'truffleruby' + task default: %i[test] +else + task default: %i[test rubocop yard] +end diff --git a/resources/google_cloud_platform/lib/opentelemetry-resource-detector-google_cloud_platform.rb b/resources/google_cloud_platform/lib/opentelemetry-resource-detector-google_cloud_platform.rb new file mode 100644 index 000000000..a740ef21c --- /dev/null +++ b/resources/google_cloud_platform/lib/opentelemetry-resource-detector-google_cloud_platform.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'opentelemetry/resource/detector' diff --git a/resources/google_cloud_platform/lib/opentelemetry/resource/detector.rb b/resources/google_cloud_platform/lib/opentelemetry/resource/detector.rb new file mode 100644 index 000000000..4dcd898bc --- /dev/null +++ b/resources/google_cloud_platform/lib/opentelemetry/resource/detector.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'opentelemetry/sdk' +require 'opentelemetry/resource/detector/google_cloud_platform' +require 'opentelemetry/resource/detector/google_cloud_platform/version' + +# OpenTelemetry is an open source observability framework, providing a +# general-purpose API, SDK, and related tools required for the instrumentation +# of cloud-native software, frameworks, and libraries. +# +# The OpenTelemetry module provides global accessors for telemetry objects. +# See the documentation for the `opentelemetry-api` gem for details. +module OpenTelemetry + module Resource + # Detector contains the resource detectors + module Detector + end + end +end diff --git a/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform.rb b/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform.rb new file mode 100644 index 000000000..440996d01 --- /dev/null +++ b/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'google-cloud-env' + +module OpenTelemetry + module Resource + module Detector + # GoogleCloudPlatform contains detect class method for determining gcp environment resource attributes + module GoogleCloudPlatform + extend self + + def detect + gcp_env = Google::Cloud::Env.new + resource_attributes = {} + + if gcp_env.compute_engine? + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_PROVIDER] = 'gcp' + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_ACCOUNT_ID] = gcp_env.project_id + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_REGION] = gcp_env.instance_attribute('cluster-location') + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_AVAILABILITY_ZONE] = gcp_env.instance_zone + + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_ID] = gcp_env.lookup_metadata('instance', 'id') + resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_NAME] = ENV['HOSTNAME'] || + gcp_env.lookup_metadata('instance', 'hostname') || + safe_gethostname + end + + if gcp_env.kubernetes_engine? + resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_CLUSTER_NAME] = gcp_env.instance_attribute('cluster-name') + resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_NAMESPACE_NAME] = gcp_env.kubernetes_engine_namespace_id + resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_POD_NAME] = ENV['HOSTNAME'] || safe_gethostname + resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_NODE_NAME] = gcp_env.lookup_metadata('instance', 'hostname') + + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CONTAINER_NAME] = ENV.fetch('CONTAINER_NAME', nil) + end + + if gcp_env.knative? + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_PROVIDER] = 'gcp' + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_ACCOUNT_ID] = gcp_env.project_id + resource_attributes[OpenTelemetry::SemanticConventions::Resource::FAAS_NAME] = gcp_env.knative_service_id + resource_attributes[OpenTelemetry::SemanticConventions::Resource::FAAS_VERSION] = gcp_env.knative_service_revision + zone = gcp_env.instance_zone + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_REGION] = get_region zone + resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_AVAILABILITY_ZONE] = zone + end + + resource_attributes.delete_if { |_key, value| value.nil? || value.empty? } + OpenTelemetry::SDK::Resources::Resource.create(resource_attributes) + end + + private + + def get_region(zone) + return if zone.nil? || zone.empty? + + split_arr = zone.split('-', 3) + split_arr[0].concat('-', split_arr[1]) + end + + def safe_gethostname + Socket.gethostname + rescue StandardError + '' + end + end + end + end +end 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 new file mode 100644 index 000000000..a1ca07145 --- /dev/null +++ b/resources/google_cloud_platform/lib/opentelemetry/resource/detector/google_cloud_platform/version.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +module OpenTelemetry + module Resource + module Detector + module GoogleCloudPlatform + VERSION = '0.1.0' + end + end + end +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 new file mode 100644 index 000000000..f5d9a6bec --- /dev/null +++ b/resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'opentelemetry/resource/detector/google_cloud_platform/version' + +Gem::Specification.new do |spec| + spec.name = 'opentelemetry-resource-detector-google_cloud_platform' + spec.version = OpenTelemetry::Resource::Detector::GoogleCloudPlatform::VERSION + spec.authors = ['OpenTelemetry Authors'] + spec.email = ['cncf-opentelemetry-contributors@lists.cncf.io'] + + spec.summary = 'Google Cloud Platform resource detection helpers for OpenTelemetry' + spec.description = 'Google Cloud Platform resource detection helpers for OpenTelemetry' + spec.homepage = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib' + spec.license = 'Apache-2.0' + + spec.files = Dir.glob('lib/**/*.rb') + + Dir.glob('*.md') + + ['LICENSE', '.yardopts'] + spec.require_paths = ['lib'] + spec.required_ruby_version = '>= 2.6.0' + + spec.add_dependency 'google-cloud-env' + spec.add_dependency 'opentelemetry-sdk', '~> 1.0' + + 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.55.1' + spec.add_development_dependency 'simplecov', '~> 0.17' + spec.add_development_dependency 'webmock', '~> 3.18.1' + spec.add_development_dependency 'yard', '~> 0.9' + + if spec.respond_to?(:metadata) + spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md" + spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/resources/container' + 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 +end diff --git a/resources/google_cloud_platform/test/opentelemetry/resource/detector/google_cloud_platform_test.rb b/resources/google_cloud_platform/test/opentelemetry/resource/detector/google_cloud_platform_test.rb new file mode 100644 index 000000000..c737fb30a --- /dev/null +++ b/resources/google_cloud_platform/test/opentelemetry/resource/detector/google_cloud_platform_test.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'test_helper' + +describe OpenTelemetry::Resource::Detector::GoogleCloudPlatform do + let(:detector) { OpenTelemetry::Resource::Detector::GoogleCloudPlatform } + + describe '.detect' do + before do + WebMock.disable_net_connect! + stub_request(:get, 'http://169.254.169.254/') + .with( + headers: { + 'Accept' => '*/*', + 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', + 'Metadata-Flavor' => 'Google', + 'User-Agent' => 'Ruby' + } + ) + .to_return(status: 200, body: '', headers: {}) + end + + after do + WebMock.allow_net_connect! + end + + let(:detected_resource) { detector.detect } + let(:detected_resource_attributes) { detected_resource.attribute_enumerator.to_h } + let(:expected_resource_attributes) { {} } + + it 'returns an empty resource' do + _(detected_resource).must_be_instance_of(OpenTelemetry::SDK::Resources::Resource) + _(detected_resource_attributes).must_equal(expected_resource_attributes) + end + + describe 'when in a gcp environment' do + let(:project_id) { 'opentelemetry' } + + before do + gcp_env_mock = Minitest::Mock.new + gcp_env_mock.expect(:compute_engine?, true) + gcp_env_mock.expect(:project_id, project_id) + gcp_env_mock.expect(:instance_attribute, 'us-central1', %w[cluster-location]) + gcp_env_mock.expect(:instance_zone, 'us-central1-a') + gcp_env_mock.expect(:lookup_metadata, 'opentelemetry-test', %w[instance id]) + gcp_env_mock.expect(:lookup_metadata, 'opentelemetry-node-1', %w[instance hostname]) + gcp_env_mock.expect(:instance_attribute, 'opentelemetry-cluster', %w[cluster-name]) + gcp_env_mock.expect(:kubernetes_engine?, true) + gcp_env_mock.expect(:kubernetes_engine_namespace_id, 'default') + gcp_env_mock.expect(:knative?, true) + gcp_env_mock.expect(:project_id, project_id) + gcp_env_mock.expect(:knative_service_id, 'test-google-cloud-function') + gcp_env_mock.expect(:knative_service_revision, '2') + gcp_env_mock.expect(:instance_zone, 'us-central1-a') + + Socket.stub(:gethostname, 'opentelemetry-test') do + old_hostname = ENV.fetch('HOSTNAME', nil) + ENV['HOSTNAME'] = 'opentelemetry-host-name-1' + begin + Google::Cloud::Env.stub(:new, gcp_env_mock) { detected_resource } + ensure + ENV['HOSTNAME'] = old_hostname + end + end + end + + let(:expected_resource_attributes) do + { + 'cloud.provider' => 'gcp', + 'cloud.account.id' => 'opentelemetry', + 'cloud.region' => 'us-central1', + 'cloud.availability_zone' => 'us-central1-a', + 'host.id' => 'opentelemetry-test', + 'host.name' => 'opentelemetry-host-name-1', + 'k8s.cluster.name' => 'opentelemetry-cluster', + 'k8s.namespace.name' => 'default', + 'k8s.pod.name' => 'opentelemetry-host-name-1', + 'k8s.node.name' => 'opentelemetry-node-1', + 'faas.name' => 'test-google-cloud-function', + 'faas.version' => '2' + } + end + + it 'returns a resource with gcp attributes' do + _(detected_resource).must_be_instance_of(OpenTelemetry::SDK::Resources::Resource) + _(detected_resource_attributes).must_equal(expected_resource_attributes) + end + + describe 'and a nil resource value is detected' do + let(:project_id) { nil } + + it 'returns a resource without that attribute' do + _(detected_resource_attributes.key?('cloud.account.id')).must_equal(false) + end + end + + describe 'and an empty string resource value is detected' do + let(:project_id) { '' } + + it 'returns a resource without that attribute' do + _(detected_resource_attributes.key?('cloud.account.id')).must_equal(false) + end + end + end + end +end diff --git a/resources/google_cloud_platform/test/test_helper.rb b/resources/google_cloud_platform/test/test_helper.rb new file mode 100644 index 000000000..ed27a8743 --- /dev/null +++ b/resources/google_cloud_platform/test/test_helper.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# Copyright The OpenTelemetry Authors +# +# SPDX-License-Identifier: Apache-2.0 + +require 'bundler/setup' +Bundler.require(:default, :development, :test) + +SimpleCov.minimum_coverage 85 +SimpleCov.start + +require 'opentelemetry-resource-detector-google_cloud_platform' +require 'minitest/autorun' +require 'webmock/minitest' + +OpenTelemetry.logger = Logger.new($stderr, level: ENV.fetch('OTEL_LOG_LEVEL', 'fatal').to_sym) From 0ed039f261d83fbdf00020cef2bb9dca015568f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 22:29:57 -0500 Subject: [PATCH 09/15] release: Release 2 gems (#654) * release: Release 2 gems * ci: force --------- Co-authored-by: Ariel Valentin Co-authored-by: Ariel Valentin --- resources/azure/CHANGELOG.md | 4 ++++ resources/google_cloud_platform/CHANGELOG.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/resources/azure/CHANGELOG.md b/resources/azure/CHANGELOG.md index da56bcc0f..b141c98a1 100644 --- a/resources/azure/CHANGELOG.md +++ b/resources/azure/CHANGELOG.md @@ -1 +1,5 @@ # Release History: opentelemetry-resource-detector-azure + +### v0.1.0 / 2023-09-07 + +* Initial release. diff --git a/resources/google_cloud_platform/CHANGELOG.md b/resources/google_cloud_platform/CHANGELOG.md index 03d7f86f9..8df9867ea 100644 --- a/resources/google_cloud_platform/CHANGELOG.md +++ b/resources/google_cloud_platform/CHANGELOG.md @@ -1 +1,5 @@ # Release History: opentelemetry-resource-detector-google_cloud_platform + +### v0.1.0 / 2023-09-07 + +* Initial release. From 3b4189bf2a0edb2809fb144a392058240dc1167b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 23:54:23 -0500 Subject: [PATCH 10/15] release: Release 11 gems (#655) Co-authored-by: Ariel Valentin --- .toys/.data/releases.yml | 8 ++++---- instrumentation/active_job/CHANGELOG.md | 4 ++++ .../instrumentation/active_job/version.rb | 2 +- instrumentation/all/CHANGELOG.md | 4 ++++ .../instrumentation/all/version.rb | 2 +- .../opentelemetry-instrumentation-all.gemspec | 18 +++++++++--------- instrumentation/aws_sdk/CHANGELOG.md | 4 ++++ .../instrumentation/aws_sdk/version.rb | 2 +- instrumentation/bunny/CHANGELOG.md | 4 ++++ .../instrumentation/bunny/version.rb | 2 +- instrumentation/delayed_job/CHANGELOG.md | 4 ++++ .../instrumentation/delayed_job/version.rb | 2 +- instrumentation/que/CHANGELOG.md | 4 ++++ .../instrumentation/que/version.rb | 2 +- instrumentation/racecar/CHANGELOG.md | 4 ++++ .../instrumentation/racecar/version.rb | 2 +- instrumentation/rails/CHANGELOG.md | 4 ++++ .../instrumentation/rails/version.rb | 2 +- ...opentelemetry-instrumentation-rails.gemspec | 2 +- instrumentation/rdkafka/CHANGELOG.md | 4 ++++ .../instrumentation/rdkafka/version.rb | 2 +- instrumentation/ruby_kafka/CHANGELOG.md | 4 ++++ .../instrumentation/ruby_kafka/version.rb | 2 +- instrumentation/sidekiq/CHANGELOG.md | 4 ++++ .../instrumentation/sidekiq/version.rb | 2 +- 25 files changed, 69 insertions(+), 25 deletions(-) diff --git a/.toys/.data/releases.yml b/.toys/.data/releases.yml index da3c23ed4..8b78685f3 100644 --- a/.toys/.data/releases.yml +++ b/.toys/.data/releases.yml @@ -114,10 +114,6 @@ gems: directory: instrumentation/active_model_serializers version_constant: [OpenTelemetry, Instrumentation, ActiveModelSerializers, VERSION] - - name: opentelemetry-instrumentation-all - directory: instrumentation/all - version_constant: [OpenTelemetry, Instrumentation, All, VERSION] - - name: opentelemetry-instrumentation-concurrent_ruby directory: instrumentation/concurrent_ruby version_constant: [OpenTelemetry, Instrumentation, ConcurrentRuby, VERSION] @@ -195,6 +191,10 @@ gems: directory: instrumentation/sinatra version_constant: [OpenTelemetry, Instrumentation, Sinatra, VERSION] + - name: opentelemetry-instrumentation-all + directory: instrumentation/all + version_constant: [OpenTelemetry, Instrumentation, All, VERSION] + - name: opentelemetry-propagator-ottrace directory: propagator/ottrace version_constant: [OpenTelemetry, Propagator, OTTrace, VERSION] diff --git a/instrumentation/active_job/CHANGELOG.md b/instrumentation/active_job/CHANGELOG.md index eaef35814..fdc4420c9 100644 --- a/instrumentation/active_job/CHANGELOG.md +++ b/instrumentation/active_job/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_job +### v0.6.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.5.2 / 2023-08-03 * FIXED: Add code semconv attributes diff --git a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/version.rb b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/version.rb index fc7a6fa2e..5d7f6add4 100644 --- a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/version.rb +++ b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module ActiveJob - VERSION = '0.5.2' + VERSION = '0.6.0' end end end diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index fca9c3d5e..98153575f 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-all +### v0.50.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.40.0 / 2023-08-07 * ADDED: Add Gruf instrumentation diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 45347f321..1f53ffd1d 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.40.0' + VERSION = '0.50.0' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 141810dd3..1651e4ee9 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -27,11 +27,11 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0' spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.20.1' - spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.4.1' - spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.20.1' + spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.5.0' + spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.21.1' spec.add_dependency 'opentelemetry-instrumentation-dalli', '~> 0.24.1' - spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.20.1' + spec.add_dependency 'opentelemetry-instrumentation-delayed_job', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-ethon', '~> 0.21.1' spec.add_dependency 'opentelemetry-instrumentation-excon', '~> 0.21.1' spec.add_dependency 'opentelemetry-instrumentation-faraday', '~> 0.23.1' @@ -46,17 +46,17 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-instrumentation-mysql2', '~> 0.24.2' spec.add_dependency 'opentelemetry-instrumentation-net_http', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-pg', '~> 0.25.2' - spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.6.1' - spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.2.1' + spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.7.0' + spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.3.0' spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.23.1' - spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.27.1' + spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.28.0' spec.add_dependency 'opentelemetry-instrumentation-rake', '~> 0.2.1' - spec.add_dependency 'opentelemetry-instrumentation-rdkafka', '~> 0.3.1' + spec.add_dependency 'opentelemetry-instrumentation-rdkafka', '~> 0.4.0' spec.add_dependency 'opentelemetry-instrumentation-redis', '~> 0.25.1' spec.add_dependency 'opentelemetry-instrumentation-resque', '~> 0.4.1' spec.add_dependency 'opentelemetry-instrumentation-restclient', '~> 0.22.1' - spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.20.1' - spec.add_dependency 'opentelemetry-instrumentation-sidekiq', '~> 0.24.1' + spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.21.0' + spec.add_dependency 'opentelemetry-instrumentation-sidekiq', '~> 0.25.0' spec.add_dependency 'opentelemetry-instrumentation-sinatra', '~> 0.23.1' spec.add_dependency 'opentelemetry-instrumentation-trilogy', '~> 0.56.1' diff --git a/instrumentation/aws_sdk/CHANGELOG.md b/instrumentation/aws_sdk/CHANGELOG.md index 4916d4d71..686a7708a 100644 --- a/instrumentation/aws_sdk/CHANGELOG.md +++ b/instrumentation/aws_sdk/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-aws_sdk +### v0.5.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.4.2 / 2023-08-03 * FIXED: Remove inline linter rules diff --git a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb index 17a14f8e1..d40079038 100644 --- a/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb +++ b/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module AwsSdk - VERSION = '0.4.2' + VERSION = '0.5.0' end end end diff --git a/instrumentation/bunny/CHANGELOG.md b/instrumentation/bunny/CHANGELOG.md index e8d72bb69..8f51168d3 100644 --- a/instrumentation/bunny/CHANGELOG.md +++ b/instrumentation/bunny/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-bunny +### v0.21.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.20.1 / 2023-06-05 * FIXED: Base config options diff --git a/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/version.rb b/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/version.rb index e278de395..579cb36a4 100644 --- a/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/version.rb +++ b/instrumentation/bunny/lib/opentelemetry/instrumentation/bunny/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Bunny - VERSION = '0.20.1' + VERSION = '0.21.0' end end end diff --git a/instrumentation/delayed_job/CHANGELOG.md b/instrumentation/delayed_job/CHANGELOG.md index 6013e8752..67b9f9441 100644 --- a/instrumentation/delayed_job/CHANGELOG.md +++ b/instrumentation/delayed_job/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-delayed_job +### v0.21.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.20.1 / 2023-06-05 * FIXED: Base config options diff --git a/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/version.rb b/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/version.rb index e1fde513b..989bf86fb 100644 --- a/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/version.rb +++ b/instrumentation/delayed_job/lib/opentelemetry/instrumentation/delayed_job/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module DelayedJob - VERSION = '0.20.1' + VERSION = '0.21.0' end end end diff --git a/instrumentation/que/CHANGELOG.md b/instrumentation/que/CHANGELOG.md index 7a878d463..91c8a240c 100644 --- a/instrumentation/que/CHANGELOG.md +++ b/instrumentation/que/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-que +### v0.7.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.6.2 / 2023-08-07 * FIXED: Correctly set bulk_enqueue job options diff --git a/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb b/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb index d4fc1e649..b49a45f06 100644 --- a/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb +++ b/instrumentation/que/lib/opentelemetry/instrumentation/que/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Que - VERSION = '0.6.2' + VERSION = '0.7.0' end end end diff --git a/instrumentation/racecar/CHANGELOG.md b/instrumentation/racecar/CHANGELOG.md index 636abbd07..cb0cce4a4 100644 --- a/instrumentation/racecar/CHANGELOG.md +++ b/instrumentation/racecar/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-racecar +### v0.3.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.2.1 / 2023-06-05 * FIXED: Base config options diff --git a/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/version.rb b/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/version.rb index 7db626987..86a2d94b4 100644 --- a/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/version.rb +++ b/instrumentation/racecar/lib/opentelemetry/instrumentation/racecar/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Racecar - VERSION = '0.2.1' + VERSION = '0.3.0' end end end diff --git a/instrumentation/rails/CHANGELOG.md b/instrumentation/rails/CHANGELOG.md index 8483d9a8d..2ff2b00e9 100644 --- a/instrumentation/rails/CHANGELOG.md +++ b/instrumentation/rails/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rails +### v0.28.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.27.1 / 2023-06-05 * FIXED: Use latest bug fix version for all dependencies diff --git a/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb b/instrumentation/rails/lib/opentelemetry/instrumentation/rails/version.rb index 314fdc88b..f5d46002f 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.27.1' + VERSION = '0.28.0' end end end diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index b9661b472..886bbe8b5 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-instrumentation-action_pack', '~> 0.7.0' spec.add_dependency 'opentelemetry-instrumentation-action_view', '~> 0.6.0' - spec.add_dependency 'opentelemetry-instrumentation-active_job', '~> 0.5.1' + spec.add_dependency 'opentelemetry-instrumentation-active_job', '~> 0.6.0' spec.add_dependency 'opentelemetry-instrumentation-active_record', '~> 0.6.1' spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.4.1' spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1' diff --git a/instrumentation/rdkafka/CHANGELOG.md b/instrumentation/rdkafka/CHANGELOG.md index 805c5ebb6..4b66d4fd6 100644 --- a/instrumentation/rdkafka/CHANGELOG.md +++ b/instrumentation/rdkafka/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-rdkafka +### v0.4.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.3.2 / 2023-07-21 * ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537) diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/version.rb index 17df4b6b4..150141cec 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.3.2' + VERSION = '0.4.0' end end end diff --git a/instrumentation/ruby_kafka/CHANGELOG.md b/instrumentation/ruby_kafka/CHANGELOG.md index 3308f99c6..cad2b514d 100644 --- a/instrumentation/ruby_kafka/CHANGELOG.md +++ b/instrumentation/ruby_kafka/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-ruby_kafka +### v0.21.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.20.2 / 2023-08-09 * FIXED: propagate context from async producer diff --git a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/version.rb b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/version.rb index 3d75d39e0..ec39acf71 100644 --- a/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/version.rb +++ b/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module RubyKafka - VERSION = '0.20.2' + VERSION = '0.21.0' end end end diff --git a/instrumentation/sidekiq/CHANGELOG.md b/instrumentation/sidekiq/CHANGELOG.md index 8109594a4..8fb267d12 100644 --- a/instrumentation/sidekiq/CHANGELOG.md +++ b/instrumentation/sidekiq/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-sidekiq +### v0.25.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.24.4 / 2023-08-07 * FIXED: Allow traces inside jobs while avoiding Redis noise diff --git a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/version.rb b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/version.rb index b60032f3e..bde8730d8 100644 --- a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/version.rb +++ b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Sidekiq - VERSION = '0.24.4' + VERSION = '0.25.0' end end end From d0d8e2dafccc1bc35b6e497bf6b6c8f0c9d6a5b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 00:41:33 -0500 Subject: [PATCH 11/15] release: Release 2 gems (#657) * release: Release 2 gems * docs: Update changelog --------- Co-authored-by: Ariel Valentin Co-authored-by: Ariel Valentin --- instrumentation/active_support/CHANGELOG.md | 4 ++++ .../instrumentation/active_support/version.rb | 2 +- resource_detectors/CHANGELOG.md | 8 ++++++-- .../lib/opentelemetry/resource/detectors/version.rb | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/instrumentation/active_support/CHANGELOG.md b/instrumentation/active_support/CHANGELOG.md index 3ca30ff7e..b2ad56d80 100644 --- a/instrumentation/active_support/CHANGELOG.md +++ b/instrumentation/active_support/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-active_support +### v0.4.2 / 2023-09-07 + +FIXED: Reduce Object allocation + ### v0.4.1 / 2023-06-05 * FIXED: Base config options 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 8d0733ba2..bb7b408cc 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.4.1' + VERSION = '0.4.2' end end end diff --git a/resource_detectors/CHANGELOG.md b/resource_detectors/CHANGELOG.md index 9633e6025..5d6b2c0e6 100644 --- a/resource_detectors/CHANGELOG.md +++ b/resource_detectors/CHANGELOG.md @@ -1,8 +1,12 @@ # Release History: opentelemetry-resource_detectors -### v0.24.1 / 2023-08-03 +### v0.24.2 / 2023-09-07 -* FIXED: Remove inline linter rules +* CHANGED: split resource_detectors into their own gems + +### v0.24.1 / 2023-08-03 + +* FIXED: Remove inline linter rules ### v0.24.0 / 2023-08-02 diff --git a/resource_detectors/lib/opentelemetry/resource/detectors/version.rb b/resource_detectors/lib/opentelemetry/resource/detectors/version.rb index 0fb11c0d8..d500bc012 100644 --- a/resource_detectors/lib/opentelemetry/resource/detectors/version.rb +++ b/resource_detectors/lib/opentelemetry/resource/detectors/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Resource module Detectors - VERSION = '0.24.1' + VERSION = '0.24.2' end end end From c6b0a652f5c0ebf979b066aa435447417b59d538 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:23:10 -0500 Subject: [PATCH 12/15] release: Release opentelemetry-instrumentation-resque 0.5.0 (#660) * release: Release opentelemetry-instrumentation-resque 0.5.0 * docs: Update instrumentation/resque/CHANGELOG.md * chore: Bump all 0.50.1 --------- Co-authored-by: Ariel Valentin Co-authored-by: Ariel Valentin Co-authored-by: Ariel Valentin --- instrumentation/all/CHANGELOG.md | 4 ++++ .../all/lib/opentelemetry/instrumentation/all/version.rb | 2 +- instrumentation/all/opentelemetry-instrumentation-all.gemspec | 2 +- instrumentation/resque/CHANGELOG.md | 4 ++++ .../lib/opentelemetry/instrumentation/resque/version.rb | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 98153575f..54d4ef2d1 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -2,6 +2,10 @@ ### v0.50.0 / 2023-09-07 +* FIXED: Align messaging instrumentation operation names (Resque) + +### v0.50.0 / 2023-09-07 + * FIXED: Align messaging instrumentation operation names ### v0.40.0 / 2023-08-07 diff --git a/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb b/instrumentation/all/lib/opentelemetry/instrumentation/all/version.rb index 1f53ffd1d..038f4e9a2 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.50.0' + VERSION = '0.50.1' end end end diff --git a/instrumentation/all/opentelemetry-instrumentation-all.gemspec b/instrumentation/all/opentelemetry-instrumentation-all.gemspec index 1651e4ee9..0bb1151ac 100644 --- a/instrumentation/all/opentelemetry-instrumentation-all.gemspec +++ b/instrumentation/all/opentelemetry-instrumentation-all.gemspec @@ -53,7 +53,7 @@ Gem::Specification.new do |spec| 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' - spec.add_dependency 'opentelemetry-instrumentation-resque', '~> 0.4.1' + spec.add_dependency 'opentelemetry-instrumentation-resque', '~> 0.5.0' spec.add_dependency 'opentelemetry-instrumentation-restclient', '~> 0.22.1' spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.21.0' spec.add_dependency 'opentelemetry-instrumentation-sidekiq', '~> 0.25.0' diff --git a/instrumentation/resque/CHANGELOG.md b/instrumentation/resque/CHANGELOG.md index b59f27ddd..5225be2c0 100644 --- a/instrumentation/resque/CHANGELOG.md +++ b/instrumentation/resque/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History: opentelemetry-instrumentation-resque +### v0.5.0 / 2023-09-07 + +* FIXED: Align messaging instrumentation operation names + ### v0.4.2 / 2023-08-03 * FIXED: Remove inline linter rules diff --git a/instrumentation/resque/lib/opentelemetry/instrumentation/resque/version.rb b/instrumentation/resque/lib/opentelemetry/instrumentation/resque/version.rb index 9327a3bd4..284cf059f 100644 --- a/instrumentation/resque/lib/opentelemetry/instrumentation/resque/version.rb +++ b/instrumentation/resque/lib/opentelemetry/instrumentation/resque/version.rb @@ -7,7 +7,7 @@ module OpenTelemetry module Instrumentation module Resque - VERSION = '0.4.2' + VERSION = '0.5.0' end end end From 4d1f5a178f788f626762eb926691b58f63333f69 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Thu, 7 Sep 2023 11:10:23 -0500 Subject: [PATCH 13/15] docs: Fix CHANGELOG.md --- instrumentation/all/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/all/CHANGELOG.md b/instrumentation/all/CHANGELOG.md index 54d4ef2d1..c81851ebf 100644 --- a/instrumentation/all/CHANGELOG.md +++ b/instrumentation/all/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History: opentelemetry-instrumentation-all -### v0.50.0 / 2023-09-07 +### v0.50.1 / 2023-09-07 * FIXED: Align messaging instrumentation operation names (Resque) From d77b700e6be06dec0cf44c39a603cc4f36966582 Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Fri, 8 Sep 2023 12:55:40 -0500 Subject: [PATCH 14/15] chore(deps): webmock 3.19 (#651) --- .../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 +- .../aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec | 2 +- .../opentelemetry-instrumentation-delayed_job.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 +- .../koala/opentelemetry-instrumentation-koala.gemspec | 2 +- instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec | 2 +- .../mongo/opentelemetry-instrumentation-mongo.gemspec | 2 +- .../net_http/opentelemetry-instrumentation-net_http.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 +- .../resque/opentelemetry-instrumentation-resque.gemspec | 2 +- .../restclient/opentelemetry-instrumentation-restclient.gemspec | 2 +- .../rspec/opentelemetry-instrumentation-rspec.gemspec | 2 +- .../sinatra/opentelemetry-instrumentation-sinatra.gemspec | 2 +- resource_detectors/opentelemetry-resource_detectors.gemspec | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec index 14f7f1b85..f12531d06 100644 --- a/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec +++ b/instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec index df30e19c4..26502b714 100644 --- a/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec +++ b/instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec index 7435a04d1..2e0ab8892 100644 --- a/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec +++ b/instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec index daadc39a3..fa465c7ac 100644 --- a/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec +++ b/instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec index e46147904..b9351875f 100644 --- a/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec +++ b/instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec b/instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec index 06c3d3d0e..6b6aaa7d3 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 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec index 16d842c83..1c91da124 100644 --- a/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec +++ b/instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec index aebf9d6d5..86648b55b 100644 --- a/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec +++ b/instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sqlite3' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec index 65eb139d9..117c4e6f1 100644 --- a/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec +++ b/instrumentation/excon/opentelemetry-instrumentation-excon.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec index 69c972db0..d89bcaf74 100644 --- a/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec +++ b/instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec index 2c015a9c0..1d59fb9a6 100644 --- a/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec +++ b/instrumentation/grape/opentelemetry-instrumentation-grape.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec index 97db8d729..c5a8678c3 100644 --- a/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec +++ b/instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec index 6e3af470d..4a7a0b550 100644 --- a/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec +++ b/instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 12.3.3' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/http/opentelemetry-instrumentation-http.gemspec b/instrumentation/http/opentelemetry-instrumentation-http.gemspec index f03ad32aa..c8cd137b4 100644 --- a/instrumentation/http/opentelemetry-instrumentation-http.gemspec +++ b/instrumentation/http/opentelemetry-instrumentation-http.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec index e5b7616e4..6bd4328fe 100644 --- a/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec +++ b/instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec index 37ae31a8c..578fd1e1c 100644 --- a/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec +++ b/instrumentation/koala/opentelemetry-instrumentation-koala.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec index 662b6117f..f5c24419d 100644 --- a/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec +++ b/instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec index 2cc2671e5..38fa563e1 100644 --- a/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec +++ b/instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec index bffe390b4..d61af1b88 100644 --- a/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec +++ b/instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0.1' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.11.0' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec index 9d3867c1c..cb52a1d09 100644 --- a/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec +++ b/instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec index fff4f7f90..35d20b559 100644 --- a/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec +++ b/instrumentation/rack/opentelemetry-instrumentation-rack.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec-mocks' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec index 886bbe8b5..c49f43e70 100644 --- a/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec +++ b/instrumentation/rails/opentelemetry-instrumentation-rails.gemspec @@ -43,7 +43,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.22.0' - spec.add_development_dependency 'webmock', '~> 3.18.1' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' spec.metadata['source_code_uri'] = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rails' if spec.respond_to?(:metadata) diff --git a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec index 9a414e19d..086244590 100644 --- a/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec +++ b/instrumentation/rake/opentelemetry-instrumentation-rake.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '>= 0.9.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec index 572977609..9dbd122db 100644 --- a/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec +++ b/instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rdkafka', '>= 0.12' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec index 8d8e4d163..6294c5453 100644 --- a/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec +++ b/instrumentation/resque/opentelemetry-instrumentation-resque.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'resque' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec index ab0e52ba0..42aaaa0fe 100644 --- a/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec +++ b/instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rest-client', '~> 2.1.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec index 66603e777..976bd7c10 100644 --- a/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec +++ b/instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3.10.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index 0be3e8c3a..3bc862704 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'sinatra', '~> 2.0.7' - spec.add_development_dependency 'webmock', '~> 3.7.6' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' if spec.respond_to?(:metadata) diff --git a/resource_detectors/opentelemetry-resource_detectors.gemspec b/resource_detectors/opentelemetry-resource_detectors.gemspec index 449b89dab..0f6eb3693 100644 --- a/resource_detectors/opentelemetry-resource_detectors.gemspec +++ b/resource_detectors/opentelemetry-resource_detectors.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rubocop', '~> 1.56.1' spec.add_development_dependency 'simplecov', '~> 0.17' - spec.add_development_dependency 'webmock', '~> 3.18.1' + spec.add_development_dependency 'webmock', '~> 3.19' spec.add_development_dependency 'yard', '~> 0.9' spec.post_install_message = 'This gem has been deprecated. Please use opentelemetry-resource-detector-azure ' \ From 352812e023851db1fa20cc9a083a864b75f51189 Mon Sep 17 00:00:00 2001 From: Jimmy Bourassa Date: Sun, 17 Sep 2023 10:34:53 -0400 Subject: [PATCH 15/15] Micro optimization: build Hash w/ `{}` (#665) --- .../graphql/tracers/graphql_trace.rb | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb index 3f470685d..881aa10ec 100644 --- a/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb +++ b/instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb @@ -75,10 +75,11 @@ def execute_field(field:, query:, ast_node:, arguments:, object:, &block) platform_key = _otel_execute_field_key(field: field) return super unless platform_key - attributes = {} - attributes['graphql.field.parent'] = field.owner&.graphql_name - attributes['graphql.field.name'] = field.graphql_name - attributes['graphql.lazy'] = false + attributes = { + 'graphql.field.parent' => field.owner&.graphql_name, + 'graphql.field.name' => field.graphql_name, + 'graphql.lazy' => false + } tracer.in_span(platform_key, attributes: attributes, &block) end @@ -87,10 +88,11 @@ def execute_field_lazy(field:, query:, ast_node:, arguments:, object:, &block) platform_key = _otel_execute_field_key(field: field) return super unless platform_key - attributes = {} - attributes['graphql.field.parent'] = field.owner&.graphql_name - attributes['graphql.field.name'] = field.graphql_name - attributes['graphql.lazy'] = true + attributes = { + 'graphql.field.parent' => field.owner&.graphql_name, + 'graphql.field.name' => field.graphql_name, + 'graphql.lazy' => true + } tracer.in_span(platform_key, attributes: attributes, &block) end @@ -99,9 +101,10 @@ def authorized(query:, type:, object:, &block) platform_key = @_otel_authorized_key_cache[type] return super unless platform_key - attributes = {} - attributes['graphql.type.name'] = type.graphql_name - attributes['graphql.lazy'] = false + attributes = { + 'graphql.type.name' => type.graphql_name, + 'graphql.lazy' => false + } tracer.in_span(platform_key, attributes: attributes, &block) end @@ -110,9 +113,10 @@ def authorized_lazy(query:, type:, object:, &block) platform_key = @_otel_authorized_key_cache[type] return super unless platform_key - attributes = {} - attributes['graphql.type.name'] = type.graphql_name - attributes['graphql.lazy'] = true + attributes = { + 'graphql.type.name' => type.graphql_name, + 'graphql.lazy' => true + } tracer.in_span(platform_key, attributes: attributes, &block) end @@ -120,9 +124,10 @@ def authorized_lazy(query:, type:, object:, &block) def resolve_type(query:, type:, object:, &block) platform_key = @_otel_resolve_type_key_cache[type] - attributes = {} - attributes['graphql.type.name'] = type.graphql_name - attributes['graphql.lazy'] = false + attributes = { + 'graphql.type.name' => type.graphql_name, + 'graphql.lazy' => false + } tracer.in_span(platform_key, attributes: attributes, &block) end @@ -130,9 +135,10 @@ def resolve_type(query:, type:, object:, &block) def resolve_type_lazy(query:, type:, object:, &block) platform_key = @_otel_resolve_type_key_cache[type] - attributes = {} - attributes['graphql.type.name'] = type.graphql_name - attributes['graphql.lazy'] = true + attributes = { + 'graphql.type.name' => type.graphql_name, + 'graphql.lazy' => true + } tracer.in_span(platform_key, attributes: attributes, &block) end