lib/instana/agent.rb in instana-1.7.12 vs lib/instana/agent.rb in instana-1.7.13
- old
+ new
@@ -370,12 +370,12 @@
Instana.logger.debug e.backtrace.join("\r\n") unless ::Instana.test?
return false
end
# Runs a discovery process to determine where we can contact the host agent. This is usually just
- # localhost but in docker can be found on the default gateway. This also allows for manual
- # configuration via ::Instana.config[:agent_host/port].
+ # localhost but in docker can be found on the default gateway. Another option is the INSTANA_AGENT_HOST
+ # environment variable. This also allows for manual configuration via ::Instana.config[:agent_host/port].
#
# @return [Hash] a hash with :agent_host, :agent_port values or empty hash
#
def run_discovery
discovered = {}
@@ -412,9 +412,10 @@
discovered[:agent_host] = @default_gateway
discovered[:agent_port] = ::Instana.config[:agent_port]
::Instana.logger.debug "#{__method__}: Found #{discovered[:agent_host]}:#{discovered[:agent_port]}"
return discovered
end
+
nil
end
# Returns the PID that we are reporting to
#