lib/agent/server/instrument/rails.rb in site24x7_apminsight-1.5.1 vs lib/agent/server/instrument/rails.rb in site24x7_apminsight-1.5.2

- old
+ new

@@ -25,11 +25,12 @@ def instrument @obj = ManageEngine::APMObjectHolder.instance @obj.log.info "Instrumenting ActionController.. Rails Version: #{version}" ActiveSupport::Notifications.subscribe('start_processing.action_controller') do |name, start, finish, id, payload| - if @obj.config.agent_enabled && @obj.txn_util.listen?(payload[:path]) - url = "#{payload[:path]} #{payload[:controller]}##{payload[:action]}" + path = payload[:path].partition("?")[0] + if @obj.config.agent_enabled && @obj.txn_util.listen?(path) + url = "#{path} #{payload[:controller]}##{payload[:action]}" railsTracker = ManageEngine::Tracker::RootTracker.new(url, start.to_f * 1000) Thread.current[:apminsight] = railsTracker end end # subscribe \ No newline at end of file