appsignal 0.8.6.beta.0 → 0.8.6.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/lib/appsignal.rb +3 -1
- data/lib/appsignal/agent.rb +1 -1
- data/lib/appsignal/transaction.rb +1 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +6 -0
- data/spec/lib/appsignal_spec.rb +16 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzlhYWQ4OGJmZTVkOWRhYzIzNGQzNmU5YzJlZGRiNTEwMGMzMTZjNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjY2MTUyOWFjMjUyMGRiNWZjYjNhYTc1MDQ1OTk2MjI1NDA4ZmI5OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmMwOTdkMjBmM2RjY2M0Y2ViYmFhNzc3NGEwY2IyNzU5YzAyMmMzZWNkNDI2
|
10
|
+
ZTA0MGQzYTk0YzM0YWVjYTJmN2Q3NDMxNmYyNTgwMTVkYWM1ZmYzMWU3MDc2
|
11
|
+
ZmIxYTU1MmZkNTA4NjBiM2M5ZjkxZjcyYTYwYTI3MGUyZWVhNTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGM3MWMwOTRmN2MxYmRiMWE5NmUyMzE5ODU1MDllOWQxMGZjZWU5YTMzMjcx
|
14
|
+
ZWIzMWNjYTQzZjdiMTg2MmVmNjZmNGMzZDFjNTc5ZWFjNWRkOGM1OTQ4Mzdh
|
15
|
+
ZTQxMmZkNGVjYzgyOWMwZjJiNjViMzY1OTRhZmY4NDdhZWU5NWQ=
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# 0.8.6
|
2
2
|
* Resque support
|
3
|
+
* Support tags in Appsignal.send_exception
|
4
|
+
* Alias tag_request to tag_job, for background jobs
|
5
|
+
* Skip sanitization of env if env is nil
|
6
|
+
* Small bugfix in forking logic
|
3
7
|
|
4
8
|
# 0.8.5
|
5
9
|
* Don't require revision in CLI notify_of_deploy
|
data/lib/appsignal.rb
CHANGED
@@ -61,10 +61,11 @@ module Appsignal
|
|
61
61
|
raise exception
|
62
62
|
end
|
63
63
|
|
64
|
-
def send_exception(exception)
|
64
|
+
def send_exception(exception, tags=nil)
|
65
65
|
return if is_ignored_exception?(exception)
|
66
66
|
transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
|
67
67
|
transaction.add_exception(exception)
|
68
|
+
transaction.set_tags(tags) if tags
|
68
69
|
transaction.complete!
|
69
70
|
Appsignal.agent.send_queue
|
70
71
|
end
|
@@ -81,6 +82,7 @@ module Appsignal
|
|
81
82
|
return false unless transaction
|
82
83
|
transaction.set_tags(params)
|
83
84
|
end
|
85
|
+
alias :tag_job :tag_request
|
84
86
|
|
85
87
|
def transactions
|
86
88
|
@transactions ||= {}
|
data/lib/appsignal/agent.rb
CHANGED
data/lib/appsignal/version.rb
CHANGED
@@ -453,6 +453,12 @@ describe Appsignal::Transaction do
|
|
453
453
|
before { transaction.send(:sanitize_environment!) }
|
454
454
|
|
455
455
|
its(:keys) { should =~ whitelisted_keys }
|
456
|
+
|
457
|
+
context "when env is nil" do
|
458
|
+
let(:env) { nil }
|
459
|
+
|
460
|
+
it { should be_empty }
|
461
|
+
end
|
456
462
|
end
|
457
463
|
|
458
464
|
describe '#sanitize_tags!' do
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -132,6 +132,10 @@ describe Appsignal do
|
|
132
132
|
Appsignal.tag_request.should be_false
|
133
133
|
end
|
134
134
|
end
|
135
|
+
|
136
|
+
it "should also listen to tag_job" do
|
137
|
+
Appsignal.should respond_to(:tag_job)
|
138
|
+
end
|
135
139
|
end
|
136
140
|
|
137
141
|
describe ".transactions" do
|
@@ -253,6 +257,7 @@ describe Appsignal do
|
|
253
257
|
|
254
258
|
describe ".send_exception" do
|
255
259
|
before { Appsignal::Pipe.stub(:current => false) }
|
260
|
+
let(:tags) { nil }
|
256
261
|
|
257
262
|
it "should send the exception to AppSignal" do
|
258
263
|
agent = double(:shutdown => true)
|
@@ -263,6 +268,16 @@ describe Appsignal do
|
|
263
268
|
Appsignal::Transaction.should_receive(:create).and_call_original
|
264
269
|
end
|
265
270
|
|
271
|
+
context "with tags" do
|
272
|
+
let(:tags) { {:a => 'a', :b => 'b'} }
|
273
|
+
|
274
|
+
it "should tag the request before sending" do
|
275
|
+
transaction = Appsignal::Transaction.create(SecureRandom.uuid, {})
|
276
|
+
Appsignal::Transaction.stub(:create => transaction)
|
277
|
+
transaction.should_receive(:set_tags).with(tags)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
266
281
|
it "should not send the exception if it's in the ignored list" do
|
267
282
|
Appsignal.stub(:is_ignored_exception? => true)
|
268
283
|
Appsignal::Transaction.should_not_receive(:create)
|
@@ -272,7 +287,7 @@ describe Appsignal do
|
|
272
287
|
begin
|
273
288
|
raise "I am an exception"
|
274
289
|
rescue Exception => e
|
275
|
-
Appsignal.send_exception(e)
|
290
|
+
Appsignal.send_exception(e, tags)
|
276
291
|
end
|
277
292
|
end
|
278
293
|
end
|
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.8.6.beta.
|
4
|
+
version: 0.8.6.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-02-
|
15
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|