periskop-client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/periskop/client/collector.rb +1 -14
- data/lib/periskop/client/models.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a60b0627c1e4075aa616aa857ddeaca798d24e76236db830d50cf429125bb28
|
4
|
+
data.tar.gz: 93edd00a43ddc36ce6f381aee402269f782c9257c2e011f372b2e87cd0bca543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd7e92bbb19014280b788324018d40e5082531edce8e775ebfa6ab9925d190febcba8b9bdf95e66acdd6f0f69f9dbcb618343c268d34a8497ea7c29b75f47eb6
|
7
|
+
data.tar.gz: 0b8d4941b6f6740f33541935557f752fb0b13f49d1e919d0454ddf14b70fd5c336e5defdc14cc68988209e71a6f2d24e1c552a164bafc92ee18577569c68f6cb
|
@@ -35,12 +35,7 @@ module Periskop
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def add_exception(exception, context)
|
38
|
-
exception_instance = ExceptionInstance.
|
39
|
-
exception.class.name,
|
40
|
-
exception.message,
|
41
|
-
exception.backtrace,
|
42
|
-
get_cause(exception)
|
43
|
-
)
|
38
|
+
exception_instance = ExceptionInstance.from_exception(exception)
|
44
39
|
exception_with_context = ExceptionWithContext.new(
|
45
40
|
exception_instance,
|
46
41
|
context,
|
@@ -58,14 +53,6 @@ module Periskop
|
|
58
53
|
aggregated_exception = @aggregated_exceptions_dict[aggregation_key]
|
59
54
|
aggregated_exception.add_exception(exception_with_context)
|
60
55
|
end
|
61
|
-
|
62
|
-
def get_cause(exception)
|
63
|
-
if RUBY_VERSION > '2.0'
|
64
|
-
return exception.cause
|
65
|
-
end
|
66
|
-
|
67
|
-
nil
|
68
|
-
end
|
69
56
|
end
|
70
57
|
end
|
71
58
|
end
|
@@ -18,6 +18,25 @@ module Periskop
|
|
18
18
|
@cause = cause
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.from_exception(exception)
|
22
|
+
ExceptionInstance.new(
|
23
|
+
exception.class.name,
|
24
|
+
exception.message,
|
25
|
+
exception.backtrace,
|
26
|
+
get_cause(exception)
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.get_cause(exception)
|
31
|
+
if RUBY_VERSION > '2.0'
|
32
|
+
if exception.cause.is_a?(Exception)
|
33
|
+
return ExceptionInstance.from_exception(exception.cause)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
21
40
|
def as_json(_options = {})
|
22
41
|
{
|
23
42
|
class: @class,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: periskop-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julio Zynger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Periskop client for Ruby
|
15
15
|
email:
|