instrumental_agent 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ ### 0.12.3 [April 26th, 2013]
2
+ * Default collector is now collector.instrumentalapp.com
3
+
1
4
  ### 0.12.2 [February 28th, 2013]
2
5
  * Allow customization of Capistrano deploy message
3
6
 
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
5
  if RUBY_VERSION < "1.9"
6
6
  # Built and installed via ext/mkrf_conf.rb
7
7
  gem 'system_timer', '~> 1.2'
8
- end
8
+ end
@@ -40,13 +40,13 @@ module Instrumental
40
40
  )
41
41
 
42
42
  # defaults
43
- # host: instrumentalapp.com
43
+ # host: collector.instrumentalapp.com
44
44
  # port: 8000
45
45
  # enabled: true
46
46
  # synchronous: false
47
47
  @api_key = api_key
48
48
  @host, @port = options[:collector].to_s.split(':')
49
- @host ||= 'instrumentalapp.com'
49
+ @host ||= 'collector.instrumentalapp.com'
50
50
  @port = (@port || 8000).to_i
51
51
  @enabled = options.has_key?(:enabled) ? !!options[:enabled] : true
52
52
  @synchronous = !!options[:synchronous]
@@ -239,10 +239,10 @@ module Instrumental
239
239
  end
240
240
 
241
241
  def send_command(cmd, *args)
242
+ cmd = "%s %s\n" % [cmd, args.collect { |a| a.to_s }.join(" ")]
242
243
  if enabled?
243
244
  start_connection_worker if !running?
244
245
 
245
- cmd = "%s %s\n" % [cmd, args.collect { |a| a.to_s }.join(" ")]
246
246
  if @queue.size < MAX_BUFFER
247
247
  @queue_full_warning = false
248
248
  logger.debug "Queueing: #{cmd.chomp}"
@@ -255,6 +255,8 @@ module Instrumental
255
255
  logger.debug "Dropping command, queue full(#{@queue.size}): #{cmd.chomp}"
256
256
  nil
257
257
  end
258
+ else
259
+ logger.debug cmd.strip
258
260
  end
259
261
  end
260
262
 
@@ -1,3 +1,3 @@
1
1
  module Instrumental
2
- VERSION = '0.12.2'
2
+ VERSION = '0.12.3'
3
3
  end
@@ -48,6 +48,12 @@ describe Instrumental::Agent, "disabled" do
48
48
  wait
49
49
  @server.commands.should be_empty
50
50
  end
51
+
52
+ it "should send metrics to logger" do
53
+ now = Time.now
54
+ @agent.logger.should_receive(:debug).with("gauge metric 1 #{now.to_i} 1")
55
+ @agent.gauge("metric", 1)
56
+ end
51
57
  end
52
58
 
53
59
  describe Instrumental::Agent, "enabled" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instrumental_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-02-28 00:00:00.000000000 Z
15
+ date: 2013-04-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: -2246520972920567467
168
+ hash: -1789921750295419555
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements:
@@ -174,10 +174,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  segments:
176
176
  - 0
177
- hash: -2246520972920567467
177
+ hash: -1789921750295419555
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 1.8.25
180
+ rubygems_version: 1.8.24
181
181
  signing_key:
182
182
  specification_version: 3
183
183
  summary: Agent for reporting data to instrumentalapp.com