lib/instana/agent.rb in instana-1.4.5 vs lib/instana/agent.rb in instana-1.4.6

- old
+ new

@@ -99,12 +99,14 @@ def setup # The announce timer # We attempt to announce this ruby sensor to the host agent. # In case of failure, we try again in 30 seconds. @announce_timer = @timers.every(30) do - if host_agent_ready? && announce_sensor - ::Instana.logger.warn "Host agent available. We're in business." - transition_to(:announced) + if @state == :unannounced + if host_agent_ready? && announce_sensor + transition_to(:announced) + ::Instana.logger.warn "Host agent available. We're in business. (#{@state} pid:#{Process.pid} #{@process[:name]})" + end end end # The collect timer # If we are in announced state, send metric data (only delta reporting)