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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24ff0c577e744986e81a26dbdc2cf376d3ad0d909c79d96068df030ab4dec855
4
- data.tar.gz: e1c182989769d24173a8569207564ae6c1f0f2f4f7f1d3b2d6a06c1c9132d9a5
3
+ metadata.gz: ed35b86a9c9b8ce391c178812f0ffa3a4f4104fa3bd01b06a1135495e9eadeea
4
+ data.tar.gz: cdd8c27eae11f6beaf613f6292c71e7377e36d6d48c17966cb3c407f50d26438
5
5
  SHA512:
6
- metadata.gz: 67a6ac9f50e356a19e03a7b7d5e90f83f0482eac6b59334fdca63f1f42a8c0a6a5bcef049d54402e0471e616e09a440196163420a3a26e112356e0ab8cdd41d6
7
- data.tar.gz: 7bf588cd1b376d75e3c0ca378c152c26a1383dae3ed0ee2cba89275cb6a18323194958b35326883beacbd5eb65e7f7e6b029c82b639a7fe44dc65a47e1968519
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.2)
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.4.4)
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.8.0)
34
- faraday-em_http (~> 1.0)
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-em_http (1.0.0)
45
- faraday-em_synchrony (1.0.0)
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.11.0)
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.3.2)
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.0.0)
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.17.0)
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.7.0, < 2.0)
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.0)
94
+ rubocop-ast (1.15.1)
111
95
  parser (>= 3.0.1.1)
112
- rubocop-config-umbrellio (1.17.0.53)
113
- rubocop (= 1.17.0)
114
- rubocop-performance (= 1.10.0)
115
- rubocop-rails (= 2.9.1)
116
- rubocop-rake (= 0.5.1)
117
- rubocop-rspec (= 2.2.0)
118
- rubocop-sequel (= 0.2.0)
119
- rubocop-performance (1.10.0)
120
- rubocop (>= 0.90.0, < 2.0)
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.9.1)
106
+ rubocop-rails (2.13.0)
123
107
  activesupport (>= 4.2.0)
124
108
  rack (>= 1.1)
125
- rubocop (>= 0.90.0, < 2.0)
126
- rubocop-rake (0.5.1)
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
- rubocop-ast (>= 1.1.0)
131
- rubocop-sequel (0.2.0)
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.8.1)
118
+ sentry-ruby-core (4.9.2)
136
119
  concurrent-ruby
137
120
  faraday
138
- sequel (5.51.0)
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.0)
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.1)
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.0
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(Sentry::Gruf::ServerInterceptor)
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(
@@ -13,6 +13,6 @@ module Sentry
13
13
  # * c is for incremental version, it is updated in other cases
14
14
  # According to this, it is enough to specify '~> a.b'
15
15
  # if private API was not used and to specify '~> a.b.c' if it was
16
- VERSION = "1.0.2"
16
+ VERSION = "1.1.0"
17
17
  end
18
18
  end
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.2
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: 2021-12-24 00:00:00.000000000 Z
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.0
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.