lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb in aspecto-opentelemetry-instrumentation-aws_sdk-0.1.6 vs lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb in aspecto-opentelemetry-instrumentation-aws_sdk-0.1.7
- old
+ new
@@ -7,11 +7,11 @@
module OpenTelemetry
module Instrumentation
module AwsSdk
# Instrumentation class that detects and installs the AwsSdk instrumentation
class Instrumentation < OpenTelemetry::Instrumentation::Base
- MINIMUM_VERSION = Gem::Version.new('2.0')
+ MINIMUM_VERSION = Gem::Version.new('2.1')
install do |_config|
require_dependencies
add_plugin(Seahorse::Client::Base, *loaded_constants)
end
@@ -22,26 +22,27 @@
compatible do
gem_version >= MINIMUM_VERSION
end
+ option :inject_messaging_context, default: false, validate: :boolean
option :suppress_internal_instrumentation, default: false, validate: :boolean
- private
-
- def require_dependencies
- require_relative 'handler'
- require_relative 'services'
- require_relative 'message_attribute_setter'
- require_relative 'messaging_helper'
- end
-
def gem_version
if Gem.loaded_specs['aws-sdk']
Gem.loaded_specs['aws-sdk'].version
elsif Gem.loaded_specs['aws-sdk-core']
Gem.loaded_specs['aws-sdk-core'].version
end
+ end
+
+ private
+
+ def require_dependencies
+ require_relative 'handler'
+ require_relative 'services'
+ require_relative 'message_attributes'
+ require_relative 'messaging_helper'
end
def add_plugin(*targets)
targets.each { |klass| klass.add_plugin(AwsSdk::Plugin) }
end