roqua-support 0.1.2 → 0.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/roqua-support/version.rb +1 -1
- data/lib/roqua/support.rb +1 -0
- data/lib/roqua/support/errors.rb +12 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5630dc4eb6452f316d41227ba3b233fd0ec4446b
|
4
|
+
data.tar.gz: 3a33380768215e7f9cf6213511c512583af0946e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d3a36dc54de7db6ed108e623d947ad13e91ed93f4a4300774254fdecd773b683290282046a3f90f8453924bb291d94d6ea65911b10970fa04a2f75e11ddb05f
|
7
|
+
data.tar.gz: 54aa2724374a6f7ee746b5d254731007305540e9e405589ef8c57c1a598ee2820519f71a49ef0cbe87d2c6fee99dd6ac05ad69334e6499547b6269c84550e64c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/roqua/support.rb
CHANGED
data/lib/roqua/support/errors.rb
CHANGED
@@ -1,21 +1,6 @@
|
|
1
1
|
module Roqua
|
2
2
|
module Support
|
3
3
|
module Errors
|
4
|
-
if const_defined?(:Appsignal)
|
5
|
-
module Appsignal
|
6
|
-
# TODO: If and when https://github.com/appsignal/appsignal/pull/9 is merged,
|
7
|
-
# this functionality should be supported directly by Appsignal.send_exception.
|
8
|
-
def send_exception_with_tags(exception, tags = {})
|
9
|
-
return if is_ignored_exception?(exception)
|
10
|
-
transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
|
11
|
-
transaction.set_tags(tags)
|
12
|
-
transaction.add_exception(exception)
|
13
|
-
transaction.complete!
|
14
|
-
Appsignal.agent.send_queue
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
4
|
def self.extra_parameters
|
20
5
|
@extra_parameters || {}
|
21
6
|
end
|
@@ -25,6 +10,7 @@ module Roqua
|
|
25
10
|
end
|
26
11
|
|
27
12
|
def self.report(exception, extra_params = {})
|
13
|
+
return if const_defined?(:Rails) and Rails.env.test?
|
28
14
|
parameters = extra_parameters.merge(extra_params)
|
29
15
|
|
30
16
|
# Notify Roqua logging
|
@@ -42,8 +28,17 @@ module Roqua
|
|
42
28
|
end
|
43
29
|
|
44
30
|
# Notify AppSignal
|
45
|
-
if const_defined?(:Appsignal)
|
46
|
-
|
31
|
+
if const_defined?(:Appsignal) and
|
32
|
+
not Appsignal.is_ignored_exception?(exception)
|
33
|
+
# TODO: If and when https://github.com/appsignal/appsignal/pull/9 is merged,
|
34
|
+
# this functionality should be supported directly by Appsignal.send_exception.
|
35
|
+
# Appsignal.send_exception(exception, parameters: parameters)
|
36
|
+
|
37
|
+
transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
|
38
|
+
transaction.set_tags(parameters)
|
39
|
+
transaction.add_exception(exception)
|
40
|
+
transaction.complete!
|
41
|
+
Appsignal.agent.send_queue
|
47
42
|
end
|
48
43
|
end
|
49
44
|
end
|