bin/instrument_server in instrumental_tools-0.5.2 vs bin/instrument_server in instrumental_tools-0.5.3
- old
+ new
@@ -10,10 +10,11 @@
end
require 'instrumental_agent'
require 'pidly'
require 'tmpdir'
require 'optparse'
+require 'socket'
class SystemInspector
TYPES = [:gauges, :incrementors]
attr_accessor *TYPES
@@ -380,10 +381,10 @@
options = {
:daemon => false,
:collector => 'instrumentalapp.com',
:port => '8000',
- :hostname => `hostname`.chomp,
+ :hostname => Socket.gethostname,
}
option_parser = OptionParser.new do |opts|
opts.banner = "Usage: instrument_server -k API_KEY [options] [-d #{ServerController::COMMANDS.join('|')}]"
opts.on('-k', '--api_key API_KEY', 'API key of your project') do |api_key|