@@ -39,7 +39,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
3939 MINIMUM_VERSION = Gem ::Version . new ( '2.0.0' )
4040
4141 install do |config |
42- resolve_config ( config ) unless config [ :suppress_internal_instrumentation ] . nil?
42+ resolve_config ( config )
4343 require_dependencies
4444 patch_telemetry_plugin if telemetry_plugin?
4545 add_plugins ( Seahorse ::Client ::Base , *loaded_service_clients )
@@ -54,8 +54,8 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base
5454 end
5555
5656 option :inject_messaging_context , default : false , validate : :boolean
57+ option :suppress_internal_instrumentation , default : false , validate : :boolean
5758 option :enable_internal_instrumentation , default : false , validate : :boolean
58- option :suppress_internal_instrumentation , default : nil , validate : :boolean
5959
6060 def gem_version
6161 if Gem . loaded_specs [ 'aws-sdk' ]
@@ -70,10 +70,13 @@ def gem_version
7070 private
7171
7272 def resolve_config ( config )
73+ return unless config [ :suppress_internal_instrumentation ]
74+
75+ config [ :enable_internal_instrumentation ] = false
7376 OpenTelemetry . logger . warn (
74- 'suppress_internal_instrumentation is deprecated, please use enable_internal_instrumentation instead'
77+ 'Instrumentation AwsSdk configuration option suppress_internal_instrumentation has been deprecated,' \
78+ 'use enable_internal_instrumentation option instead'
7579 )
76- config [ :enable_internal_instrumentation ] = !config [ :suppress_internal_instrumentation ]
7780 end
7881
7982 def require_dependencies
0 commit comments