sentry-gruf 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed35b86a9c9b8ce391c178812f0ffa3a4f4104fa3bd01b06a1135495e9eadeea
4
- data.tar.gz: cdd8c27eae11f6beaf613f6292c71e7377e36d6d48c17966cb3c407f50d26438
3
+ metadata.gz: 5a91b26a44afd5300f91475066741f880497ef1686a52365ab27f19a7ece14ae
4
+ data.tar.gz: 8c83ed9c1fb3c605c7285325b11a1cca7875f8e296b1b89c4c1121769763face
5
5
  SHA512:
6
- metadata.gz: be1a402bc48f8381bcf7d0f459c0b2d8aeb43abf3374a52fc98c70814ba348b12a9f30a10475f85edf1ef047d274b5e399a061fd863bfa840a69903be48d8e3e
7
- data.tar.gz: 61da7bc76030efde43997280bbff87f88ddffb81dee16588ce931cd9beafcba37807d20508e300ad7cda9d1309132968f572f866ea0bf6287af5b5253615ed2a
6
+ metadata.gz: 2fe55d9f734759e141d1b37d75876b68e628d9050088bce4fd28244ec29141e58c55ca7191213f860406107bc4b040314d43a1b466dba1cb8263eb367120616a
7
+ data.tar.gz: 4cac9f51289a78fa17636e793aa58bdc3c0eeb826270858996c9bfc2f77d5a3d102b3f808366b60448e5db2021a2cac607c7563c24dd7289f306cbf1c27dbf77
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
 
4
4
  AllCops:
5
5
  DisplayCopNames: true
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
7
 
8
8
  Naming/MethodParameterName:
9
9
  AllowedNames: ["x", "y", "z"]
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sentry-gruf (1.1.0)
5
- gruf (~> 2.10)
4
+ sentry-gruf (1.2.0)
5
+ gruf (~> 2.12)
6
6
  sentry-ruby-core (~> 4.8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.1.4.4)
11
+ activesupport (6.1.7.3)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 1.6, < 2)
14
14
  minitest (>= 5.1)
@@ -25,43 +25,49 @@ GEM
25
25
  umbrellio-sequel-plugins (~> 0.4)
26
26
  coderay (1.1.3)
27
27
  colorize (0.8.1)
28
- concurrent-ruby (1.1.9)
28
+ concurrent-ruby (1.2.2)
29
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 (2.1.0)
34
- faraday-net_http (~> 2.0)
33
+ faraday (2.7.4)
34
+ faraday-net_http (>= 2.0, < 3.1)
35
35
  ruby2_keywords (>= 0.0.4)
36
- faraday-net_http (2.0.1)
37
- google-protobuf (3.19.3-x86_64-linux)
38
- googleapis-common-protos-types (1.3.0)
36
+ faraday-net_http (3.0.2)
37
+ google-protobuf (3.22.2)
38
+ google-protobuf (3.22.2-arm64-darwin)
39
+ google-protobuf (3.22.2-x86_64-linux)
40
+ googleapis-common-protos-types (1.5.0)
39
41
  google-protobuf (~> 3.14)
40
- grpc (1.41.0-x86_64-linux)
41
- google-protobuf (~> 3.17)
42
+ grpc (1.53.0)
43
+ google-protobuf (~> 3.21)
42
44
  googleapis-common-protos-types (~> 1.0)
43
- grpc-tools (1.41.0)
44
- gruf (2.12.0)
45
+ grpc (1.53.0-x86_64-linux)
46
+ google-protobuf (~> 3.21)
47
+ googleapis-common-protos-types (~> 1.0)
48
+ grpc-tools (1.53.0)
49
+ gruf (2.17.0)
45
50
  activesupport (> 4)
46
51
  concurrent-ruby (> 1)
47
52
  e2mmap (>= 0.1)
48
- grpc (~> 1.10, <= 1.41.0)
49
- grpc-tools (~> 1.10, <= 1.41.0)
53
+ grpc (~> 1.10)
54
+ grpc-tools (~> 1.10)
50
55
  json (>= 2.3)
51
56
  slop (>= 4.6)
52
57
  thwait (>= 0.1)
53
- i18n (1.8.11)
58
+ zeitwerk (>= 2)
59
+ i18n (1.12.0)
54
60
  concurrent-ruby (~> 1.0)
55
- json (2.6.1)
61
+ json (2.6.3)
56
62
  method_source (1.0.0)
57
- minitest (5.15.0)
63
+ minitest (5.18.0)
58
64
  parallel (1.21.0)
59
65
  parser (3.1.0.0)
60
66
  ast (~> 2.4.1)
61
67
  pry (0.14.1)
62
68
  coderay (~> 1.1)
63
69
  method_source (~> 1.0)
64
- rack (2.2.3)
70
+ rack (3.0.7)
65
71
  rainbow (3.1.1)
66
72
  rake (13.0.6)
67
73
  regexp_parser (2.2.0)
@@ -126,12 +132,12 @@ GEM
126
132
  simplecov-html (0.12.3)
127
133
  simplecov-lcov (0.8.0)
128
134
  simplecov_json_formatter (0.1.3)
129
- slop (4.9.1)
135
+ slop (4.10.1)
130
136
  symbiont-ruby (0.7.0)
131
137
  thor (1.2.1)
132
138
  thwait (0.2.0)
133
139
  e2mmap
134
- tzinfo (2.0.4)
140
+ tzinfo (2.0.6)
135
141
  concurrent-ruby (~> 1.0)
136
142
  umbrellio-sequel-plugins (0.5.1.27)
137
143
  sequel
@@ -140,9 +146,11 @@ GEM
140
146
  webrick (1.7.0)
141
147
  yard (0.9.27)
142
148
  webrick (~> 1.7.0)
143
- zeitwerk (2.5.3)
149
+ zeitwerk (2.6.7)
144
150
 
145
151
  PLATFORMS
152
+ arm64-darwin-21
153
+ ruby
146
154
  x86_64-linux
147
155
 
148
156
  DEPENDENCIES
@@ -161,4 +169,4 @@ DEPENDENCIES
161
169
  yard
162
170
 
163
171
  BUNDLED WITH
164
- 2.3.5
172
+ 2.4.10
@@ -15,23 +15,29 @@ module Sentry
15
15
  # @see https://rubydoc.info/gems/gruf/Gruf/Interceptors/ServerInterceptor Gruf documentation
16
16
  # @yield Perform request logic
17
17
  def call
18
- yield
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)
18
+ # make sure the current thread has a clean hub
19
+ Sentry.clone_hub_to_current_thread
22
20
 
23
- ::Sentry.configure_scope do |scope|
21
+ Sentry.with_scope do |scope|
22
+ scope.clear_breadcrumbs
24
23
  scope.set_transaction_name(request.service_key)
25
24
  scope.set_tags(
26
25
  grpc_method: request.method_key,
27
26
  grpc_request_class: request.request_class.name,
28
27
  grpc_service_key: request.service_key,
29
28
  )
30
- end
31
29
 
32
- ::Sentry::Gruf.capture_exception(e)
30
+ begin
31
+ yield
32
+ rescue Exception => e
33
+ sensitive_grpc_codes = options[:sensitive_grpc_codes] || []
34
+ raise if e.is_a?(GRPC::BadStatus) && !sensitive_grpc_codes.include?(e.code.to_s)
35
+
36
+ ::Sentry::Gruf.capture_exception(e)
33
37
 
34
- raise
38
+ raise
39
+ end
40
+ end
35
41
  end
36
42
  end
37
43
  end
@@ -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.1.0"
16
+ VERSION = "1.2.0"
17
17
  end
18
18
  end
data/sentry_gruf.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Gruf both client and server interceptors, which report bugs to the Sentry."
13
13
  spec.homepage = "https://github.com/Cado-Labs/sentry-gruf"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = ">= 2.6.0"
15
+ spec.required_ruby_version = ">= 2.7.0"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/Cado-Labs/sentry-gruf"
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_dependency "gruf", "~> 2.10"
32
+ spec.add_dependency "gruf", "~> 2.12"
33
33
  spec.add_dependency "sentry-ruby-core", "~> 4.8"
34
34
  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.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JustAnotherDude
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-26 00:00:00.000000000 Z
11
+ date: 2023-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gruf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.10'
19
+ version: '2.12'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.10'
26
+ version: '2.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sentry-ruby-core
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -75,14 +75,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 2.6.0
78
+ version: 2.7.0
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.3.5
85
+ rubygems_version: 3.4.10
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Gruf both client and server interceptors, which report bugs to the Sentry.