sentry-gruf 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +32 -49
- data/README.md +5 -1
- data/lib/sentry/gruf/server_interceptor.rb +3 -0
- data/lib/sentry/gruf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed35b86a9c9b8ce391c178812f0ffa3a4f4104fa3bd01b06a1135495e9eadeea
|
|
4
|
+
data.tar.gz: cdd8c27eae11f6beaf613f6292c71e7377e36d6d48c17966cb3c407f50d26438
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be1a402bc48f8381bcf7d0f459c0b2d8aeb43abf3374a52fc98c70814ba348b12a9f30a10475f85edf1ef047d274b5e399a061fd863bfa840a69903be48d8e3e
|
|
7
|
+
data.tar.gz: 61da7bc76030efde43997280bbff87f88ddffb81dee16588ce931cd9beafcba37807d20508e300ad7cda9d1309132968f572f866ea0bf6287af5b5253615ed2a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sentry-gruf (1.0
|
|
4
|
+
sentry-gruf (1.1.0)
|
|
5
5
|
gruf (~> 2.10)
|
|
6
6
|
sentry-ruby-core (~> 4.8)
|
|
7
7
|
|
|
@@ -26,37 +26,22 @@ GEM
|
|
|
26
26
|
coderay (1.1.3)
|
|
27
27
|
colorize (0.8.1)
|
|
28
28
|
concurrent-ruby (1.1.9)
|
|
29
|
-
diff-lcs (1.
|
|
29
|
+
diff-lcs (1.5.0)
|
|
30
30
|
docile (1.4.0)
|
|
31
31
|
dry-inflector (0.2.1)
|
|
32
32
|
e2mmap (0.1.0)
|
|
33
|
-
faraday (1.
|
|
34
|
-
faraday-
|
|
35
|
-
faraday-em_synchrony (~> 1.0)
|
|
36
|
-
faraday-excon (~> 1.1)
|
|
37
|
-
faraday-httpclient (~> 1.0.1)
|
|
38
|
-
faraday-net_http (~> 1.0)
|
|
39
|
-
faraday-net_http_persistent (~> 1.1)
|
|
40
|
-
faraday-patron (~> 1.0)
|
|
41
|
-
faraday-rack (~> 1.0)
|
|
42
|
-
multipart-post (>= 1.2, < 3)
|
|
33
|
+
faraday (2.1.0)
|
|
34
|
+
faraday-net_http (~> 2.0)
|
|
43
35
|
ruby2_keywords (>= 0.0.4)
|
|
44
|
-
faraday-
|
|
45
|
-
|
|
46
|
-
faraday-excon (1.1.0)
|
|
47
|
-
faraday-httpclient (1.0.1)
|
|
48
|
-
faraday-net_http (1.0.1)
|
|
49
|
-
faraday-net_http_persistent (1.2.0)
|
|
50
|
-
faraday-patron (1.0.0)
|
|
51
|
-
faraday-rack (1.0.0)
|
|
52
|
-
google-protobuf (3.19.1-x86_64-linux)
|
|
36
|
+
faraday-net_http (2.0.1)
|
|
37
|
+
google-protobuf (3.19.3-x86_64-linux)
|
|
53
38
|
googleapis-common-protos-types (1.3.0)
|
|
54
39
|
google-protobuf (~> 3.14)
|
|
55
40
|
grpc (1.41.0-x86_64-linux)
|
|
56
41
|
google-protobuf (~> 3.17)
|
|
57
42
|
googleapis-common-protos-types (~> 1.0)
|
|
58
43
|
grpc-tools (1.41.0)
|
|
59
|
-
gruf (2.
|
|
44
|
+
gruf (2.12.0)
|
|
60
45
|
activesupport (> 4)
|
|
61
46
|
concurrent-ruby (> 1)
|
|
62
47
|
e2mmap (>= 0.1)
|
|
@@ -70,15 +55,14 @@ GEM
|
|
|
70
55
|
json (2.6.1)
|
|
71
56
|
method_source (1.0.0)
|
|
72
57
|
minitest (5.15.0)
|
|
73
|
-
multipart-post (2.1.1)
|
|
74
58
|
parallel (1.21.0)
|
|
75
|
-
parser (3.0.
|
|
59
|
+
parser (3.1.0.0)
|
|
76
60
|
ast (~> 2.4.1)
|
|
77
61
|
pry (0.14.1)
|
|
78
62
|
coderay (~> 1.1)
|
|
79
63
|
method_source (~> 1.0)
|
|
80
64
|
rack (2.2.3)
|
|
81
|
-
rainbow (3.
|
|
65
|
+
rainbow (3.1.1)
|
|
82
66
|
rake (13.0.6)
|
|
83
67
|
regexp_parser (2.2.0)
|
|
84
68
|
rexml (3.2.5)
|
|
@@ -98,44 +82,43 @@ GEM
|
|
|
98
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
99
83
|
rspec-support (~> 3.10.0)
|
|
100
84
|
rspec-support (3.10.3)
|
|
101
|
-
rubocop (1.
|
|
85
|
+
rubocop (1.24.0)
|
|
102
86
|
parallel (~> 1.10)
|
|
103
87
|
parser (>= 3.0.0.0)
|
|
104
88
|
rainbow (>= 2.2.2, < 4.0)
|
|
105
89
|
regexp_parser (>= 1.8, < 3.0)
|
|
106
90
|
rexml
|
|
107
|
-
rubocop-ast (>= 1.
|
|
91
|
+
rubocop-ast (>= 1.15.0, < 2.0)
|
|
108
92
|
ruby-progressbar (~> 1.7)
|
|
109
93
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
110
|
-
rubocop-ast (1.15.
|
|
94
|
+
rubocop-ast (1.15.1)
|
|
111
95
|
parser (>= 3.0.1.1)
|
|
112
|
-
rubocop-config-umbrellio (1.
|
|
113
|
-
rubocop (= 1.
|
|
114
|
-
rubocop-performance (= 1.
|
|
115
|
-
rubocop-rails (= 2.
|
|
116
|
-
rubocop-rake (= 0.
|
|
117
|
-
rubocop-rspec (= 2.
|
|
118
|
-
rubocop-sequel (= 0.
|
|
119
|
-
rubocop-performance (1.
|
|
120
|
-
rubocop (>=
|
|
96
|
+
rubocop-config-umbrellio (1.24.0.56)
|
|
97
|
+
rubocop (= 1.24.0)
|
|
98
|
+
rubocop-performance (= 1.13.0)
|
|
99
|
+
rubocop-rails (= 2.13.0)
|
|
100
|
+
rubocop-rake (= 0.6.0)
|
|
101
|
+
rubocop-rspec (= 2.7.0)
|
|
102
|
+
rubocop-sequel (= 0.3.3)
|
|
103
|
+
rubocop-performance (1.13.0)
|
|
104
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
121
105
|
rubocop-ast (>= 0.4.0)
|
|
122
|
-
rubocop-rails (2.
|
|
106
|
+
rubocop-rails (2.13.0)
|
|
123
107
|
activesupport (>= 4.2.0)
|
|
124
108
|
rack (>= 1.1)
|
|
125
|
-
rubocop (>=
|
|
126
|
-
rubocop-rake (0.
|
|
127
|
-
rubocop
|
|
128
|
-
rubocop-rspec (2.2.0)
|
|
109
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
110
|
+
rubocop-rake (0.6.0)
|
|
129
111
|
rubocop (~> 1.0)
|
|
130
|
-
|
|
131
|
-
|
|
112
|
+
rubocop-rspec (2.7.0)
|
|
113
|
+
rubocop (~> 1.19)
|
|
114
|
+
rubocop-sequel (0.3.3)
|
|
132
115
|
rubocop (~> 1.0)
|
|
133
116
|
ruby-progressbar (1.11.0)
|
|
134
117
|
ruby2_keywords (0.0.5)
|
|
135
|
-
sentry-ruby-core (4.
|
|
118
|
+
sentry-ruby-core (4.9.2)
|
|
136
119
|
concurrent-ruby
|
|
137
120
|
faraday
|
|
138
|
-
sequel (5.
|
|
121
|
+
sequel (5.52.0)
|
|
139
122
|
simplecov (0.21.2)
|
|
140
123
|
docile (~> 1.1)
|
|
141
124
|
simplecov-html (~> 0.11)
|
|
@@ -145,7 +128,7 @@ GEM
|
|
|
145
128
|
simplecov_json_formatter (0.1.3)
|
|
146
129
|
slop (4.9.1)
|
|
147
130
|
symbiont-ruby (0.7.0)
|
|
148
|
-
thor (1.1
|
|
131
|
+
thor (1.2.1)
|
|
149
132
|
thwait (0.2.0)
|
|
150
133
|
e2mmap
|
|
151
134
|
tzinfo (2.0.4)
|
|
@@ -157,7 +140,7 @@ GEM
|
|
|
157
140
|
webrick (1.7.0)
|
|
158
141
|
yard (0.9.27)
|
|
159
142
|
webrick (~> 1.7.0)
|
|
160
|
-
zeitwerk (2.5.
|
|
143
|
+
zeitwerk (2.5.3)
|
|
161
144
|
|
|
162
145
|
PLATFORMS
|
|
163
146
|
x86_64-linux
|
|
@@ -178,4 +161,4 @@ DEPENDENCIES
|
|
|
178
161
|
yard
|
|
179
162
|
|
|
180
163
|
BUNDLED WITH
|
|
181
|
-
2.3.
|
|
164
|
+
2.3.5
|
data/README.md
CHANGED
|
@@ -31,10 +31,14 @@ For the server side, the installation will look something like this:
|
|
|
31
31
|
```ruby
|
|
32
32
|
Gruf.configure do |config|
|
|
33
33
|
config.interceptors.clear # Like config.use_default_interceptors = false
|
|
34
|
-
config.interceptors.use(
|
|
34
|
+
config.interceptors.use(
|
|
35
|
+
Sentry::Gruf::ServerInterceptor,
|
|
36
|
+
sensitive_grpc_codes: [2, 5],
|
|
37
|
+
)
|
|
35
38
|
# Other interceptors go below.
|
|
36
39
|
end
|
|
37
40
|
```
|
|
41
|
+
where sensitive_grpc_codes is an optional array with codes of GRPC errors which will be reported to the Sentry.
|
|
38
42
|
|
|
39
43
|
And for the client side:
|
|
40
44
|
|
|
@@ -17,6 +17,9 @@ module Sentry
|
|
|
17
17
|
def call
|
|
18
18
|
yield
|
|
19
19
|
rescue Exception => e
|
|
20
|
+
sensitive_grpc_codes = options[:sensitive_grpc_codes] || []
|
|
21
|
+
raise if e.is_a?(GRPC::BadStatus) && !sensitive_grpc_codes.include?(e.code.to_s)
|
|
22
|
+
|
|
20
23
|
::Sentry.configure_scope do |scope|
|
|
21
24
|
scope.set_transaction_name(request.service_key)
|
|
22
25
|
scope.set_tags(
|
data/lib/sentry/gruf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentry-gruf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- JustAnotherDude
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gruf
|
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '0'
|
|
84
84
|
requirements: []
|
|
85
|
-
rubygems_version: 3.3.
|
|
85
|
+
rubygems_version: 3.3.5
|
|
86
86
|
signing_key:
|
|
87
87
|
specification_version: 4
|
|
88
88
|
summary: Gruf both client and server interceptors, which report bugs to the Sentry.
|