lib/instana/agent/helpers.rb in instana-1.9.6 vs lib/instana/agent/helpers.rb in instana-1.9.7
- old
+ new
@@ -40,19 +40,19 @@
# Indicates if the agent is ready to send metrics
# and/or data.
#
def ready?
# In test, we're always ready :-)
- return true if ENV['INSTANA_GEM_TEST']
+ return true if ENV.key?('INSTANA_TEST')
if !@is_resque_worker && forked?
::Instana.logger.debug "Instana: detected fork. (this pid: #{Process.pid}/#{Process.ppid}) Calling after_fork"
after_fork
end
@state == :announced
rescue => e
Instana.logger.debug "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}"
- Instana.logger.debug e.backtrace.join("\r\n") unless ::Instana.test?
+ Instana.logger.debug e.backtrace.join("\r\n") unless ENV.key?('INSTANA_TEST')
return false
end
end