diff --git a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb index 34c0ac27c..4d9919145 100644 --- a/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb +++ b/instrumentation/rdkafka/lib/opentelemetry/instrumentation/rdkafka/instrumentation.rb @@ -12,7 +12,7 @@ class Instrumentation < OpenTelemetry::Instrumentation::Base MINIMUM_VERSION = Gem::Version.new('0.10.0') compatible do - Gem.loaded_specs['rdkafka'].version >= MINIMUM_VERSION + Gem::Version.new(::Rdkafka::VERSION) >= MINIMUM_VERSION end install do |_config|