diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb index e321e6e43..e240b991e 100644 --- a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb +++ b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb @@ -10,7 +10,7 @@ module Rdkafka # The Instrumentation class contains logic to detect and install the Rdkafka instrumentation class Instrumentation < OpenTelemetry::Instrumentation::Base compatible do - gem_version = Gem::Version(::Rdkafka::VERSION) + gem_version = Gem::Version.new(::Rdkafka::VERSION) Gem::Requirement.new('>= 0.10.0', '< 0.15.0').satisfied_by?(gem_version) end