lib/instana/activator.rb in instana-1.200.0 vs lib/instana/activator.rb in instana-1.201.0.pre1
- old
+ new
@@ -41,6 +41,16 @@
instrument if can_instrument?
end
end
end
-Dir["#{__dir__}/activators/*.rb"].sort.each { |f| require(f) }
+Dir["#{__dir__}/activators/*.rb"]
+ .sort
+ .select do |f|
+ if ENV['INSTANA_ACTIVATE_SET']
+ base = File.basename(f, '.rb')
+ ENV.fetch('INSTANA_ACTIVATE_SET', '').split(',').include?(base)
+ else
+ true
+ end
+end
+ .each { |f| require(f) }