lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb in aspecto-opentelemetry-instrumentation-aws_sdk-0.1.2 vs lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb in aspecto-opentelemetry-instrumentation-aws_sdk-0.1.3

- old
+ new

@@ -10,16 +10,11 @@ # Instrumentation class that detects and installs the AwsSdk instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base MINIMUM_VERSION = Gem::Version.new('2.0') install do |_config| - require_relative 'handler' - require_relative 'services' - require_relative 'message_attribute_setter' - require_relative 'messaging_helper' - require_relative 'db_helper' - + require_dependencies add_plugin(Seahorse::Client::Base, *loaded_constants) end present do !defined?(::Seahorse::Client::Base).nil? @@ -28,9 +23,18 @@ compatible do gem_version >= MINIMUM_VERSION end 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']