lib/instana/agent.rb in instana-1.7.4 vs lib/instana/agent.rb in instana-1.7.5
- old
+ new
@@ -160,17 +160,20 @@
@announce_timer.pause
@collect_timer.resume
end
@timers.wait
end
+ rescue Exception => e
+ ::Instana.logger.warn "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
+ ::Instana.logger.debug e.backtrace.join("\r\n")
ensure
if @state == :announced
# Pause the timers so they don't fire while we are
# reporting traces
@collect_timer.pause
@announce_timer.pause
- ::Instana.logger.debug "Agent exiting. Reporting final #{::Instana.processor.queue_count} trace(s)."
+ ::Instana.logger.debug "#{Thread.current}: Agent exiting. Reporting final #{::Instana.processor.queue_count} trace(s)."
::Instana.processor.send
end
end
# Collect process ID, name and arguments to notify