diff --git a/instrumentation/sidekiq/.yardopts b/instrumentation/sidekiq/.yardopts index 9f610acacb..79e64ffc07 100644 --- a/instrumentation/sidekiq/.yardopts +++ b/instrumentation/sidekiq/.yardopts @@ -2,6 +2,7 @@ --title=OpenTelemetry Sidekiq Instrumentation --markup=markdown --main=README.md +--tag=instrumentation_option_default:"Default" ./lib/opentelemetry/instrumentation/**/*.rb ./lib/opentelemetry/instrumentation.rb - diff --git a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb index b1ce910b47..5f374c0ca0 100644 --- a/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb +++ b/instrumentation/sidekiq/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb @@ -27,13 +27,59 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base gem_version >= MINIMUM_VERSION end + # @!group Instrumentation Options + # @!macro + # @!method $1 + # @instrumentation_option_default `:$2` + # @!scope class + # + # Specify how the span names are set. Can be one of: + # + # - `:queue` - the span names will be set to ' '. + # - `:job_class` - the span names will be set to ' '. option :span_naming, default: :queue, validate: %I[job_class queue] + # Controls how the job's execution is traced and related + # to the trace where the job was enqueued. Can be one of: + # + # - `:link` - the job will be executed in a separate trace. The + # initial span of the execution trace will be linked to the span that + # enqueued the job, via a Span Link. + # - `:child` - the job will be executed in the same logical trace, as a direct + # child of the span that enqueued the job. + # - `:none` - the job's execution will not be explicitly linked to the span that + # enqueued the job. option :propagation_style, default: :link, validate: %i[link child none] + # @!macro + # @!method $1 + # @instrumentation_option_default `:$2` + # @!scope class + # Allows tracing Sidekiq::Launcher#heartbeat. option :trace_launcher_heartbeat, default: false, validate: :boolean + # @!macro + # @!method $1 + # @instrumentation_option_default $2 + # @!scope class + # Allows tracing Sidekiq::Scheduled#enqueue. option :trace_poller_enqueue, default: false, validate: :boolean + # @!macro + # @!method $1 + # @instrumentation_option_default $2 + # @!scope class + # Allows trasing Sidekiq::Scheduled#wait option :trace_poller_wait, default: false, validate: :boolean + # @!macro + # @!method $1 + # @instrumentation_option_default $2 + # @!scope class + # Allows tracing Sidekiq::Processor#process_one. option :trace_processor_process_one, default: false, validate: :boolean + # @!macro + # @!method $1 + # @instrumentation_option_default $2 + # @!scope class + # Sets service name of the remote service. option :peer_service, default: nil, validate: :string + # @!endgroup private diff --git a/instrumentation/sinatra/Appraisals b/instrumentation/sinatra/Appraisals index f4ebf5e8ae..837cb545c2 100644 --- a/instrumentation/sinatra/Appraisals +++ b/instrumentation/sinatra/Appraisals @@ -4,8 +4,12 @@ # # SPDX-License-Identifier: Apache-2.0 -appraise 'sinatra-3.0.x' do - gem 'sinatra', '~> 3.0.0' +appraise 'sinatra-4.x' do + gem 'sinatra', '~> 4.0' +end + +appraise 'sinatra-3.x' do + gem 'sinatra', '~> 3.0' end appraise 'sinatra-2.x' do diff --git a/instrumentation/sinatra/example/Gemfile b/instrumentation/sinatra/example/Gemfile index 0ddf65b87d..c6bb91d5d8 100644 --- a/instrumentation/sinatra/example/Gemfile +++ b/instrumentation/sinatra/example/Gemfile @@ -5,9 +5,10 @@ # SPDX-License-Identifier: Apache-2.0 source 'https://rubygems.org' -gem 'puma' gem 'opentelemetry-api' gem 'opentelemetry-common' gem 'opentelemetry-instrumentation-sinatra' gem 'opentelemetry-sdk' +gem 'puma' +gem 'rackup' gem 'sinatra' diff --git a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec index a722530832..5fb8c08107 100644 --- a/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec +++ b/instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.0' 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 'rack-test', '~> 2.1' spec.add_development_dependency 'rubocop', '~> 1.60.0' spec.add_development_dependency 'rubocop-performance', '~> 1.20' spec.add_development_dependency 'simplecov', '~> 0.17.1'