appsignal 0.12.beta.3 → 0.12.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -113,6 +113,22 @@ module Appsignal
113
113
  end
114
114
  alias :tag_job :tag_request
115
115
 
116
+ def set_gauge(key, value)
117
+ Appsignal::Extension.set_gauge(key, value)
118
+ end
119
+
120
+ def set_process_gauge(key, value)
121
+ Appsignal::Extension.set_process_gauge(key, value)
122
+ end
123
+
124
+ def increment_counter(key, value)
125
+ Appsignal::Extension.increment_counter(key, value)
126
+ end
127
+
128
+ def add_distribution_value(key, value)
129
+ Appsignal::Extension.add_distribution_value(key, value)
130
+ end
131
+
116
132
  def logger
117
133
  @in_memory_log = StringIO.new unless @in_memory_log
118
134
  @logger ||= Logger.new(@in_memory_log).tap do |l|
@@ -1,4 +1,4 @@
1
1
  module Appsignal
2
- VERSION = '0.12.beta.3'
3
- AGENT_VERSION = 'e01ad7b'
2
+ VERSION = '0.12.beta.4'
3
+ AGENT_VERSION = '5399e29'
4
4
  end
@@ -292,6 +292,36 @@ describe Appsignal do
292
292
  end
293
293
  end
294
294
 
295
+ describe "custom stats" do
296
+ describe ".set_gauge" do
297
+ it "should call set_gauge on the extension" do
298
+ Appsignal::Extension.should_receive(:set_gauge).with('key', 0.1)
299
+ Appsignal.set_gauge('key', 0.1)
300
+ end
301
+ end
302
+
303
+ describe ".set_process_gauge" do
304
+ it "should call set_process_gauge on the extension" do
305
+ Appsignal::Extension.should_receive(:set_process_gauge).with('key', 0.1)
306
+ Appsignal.set_process_gauge('key', 0.1)
307
+ end
308
+ end
309
+
310
+ describe ".increment_counter" do
311
+ it "should call increment_counter on the extension" do
312
+ Appsignal::Extension.should_receive(:increment_counter).with('key', 1)
313
+ Appsignal.increment_counter('key', 1)
314
+ end
315
+ end
316
+
317
+ describe ".add_distribution_value" do
318
+ it "should call increment_counter on the extension" do
319
+ Appsignal::Extension.should_receive(:add_distribution_value).with('key', 0.1)
320
+ Appsignal.add_distribution_value('key', 0.1)
321
+ end
322
+ end
323
+ end
324
+
295
325
  describe '.logger' do
296
326
  subject { Appsignal.logger }
297
327
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.beta.3
4
+ version: 0.12.beta.4
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-06-05 00:00:00.000000000 Z
16
+ date: 2015-06-11 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rack