lib/instana/util.rb in instana-0.14.2 vs lib/instana/util.rb in instana-0.15.0

- old
+ new

@@ -88,14 +88,10 @@ data = {} data[:sensorVersion] = ::Instana::VERSION data[:ruby_version] = RUBY_VERSION - # Since a snapshot is only taken on process boot, - # this is ok here. - data[:start_time] = Time.now.to_s - # Framework Detection if defined?(::RailsLts::VERSION) data[:framework] = "Rails on Rails LTS-#{::RailsLts::VERSION}" elsif defined?(::Rails.version) @@ -107,9 +103,18 @@ elsif defined?(::Padrino::VERSION) data[:framework] = "Padrino #{::Padrino::VERSION}" elsif defined?(::Sinatra::VERSION) data[:framework] = "Sinatra #{::Sinatra::VERSION}" + end + + # Report Bundle + if defined?(::Gem) && Gem.respond_to?(:loaded_specs) + data[:versions] = {} + + Gem.loaded_specs.each do |k, v| + data[:versions][k] = v.version.to_s + end end data rescue => e ::Instana.logger.error "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"