gruf-sentry 1.0.1 → 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/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/gruf/sentry/client_interceptor.rb +9 -11
- data/lib/gruf/sentry/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: 4e8e06b97f43cba2bea06e2bf43e10e33652e00e69094c19b634b3ecdaa7ce64
|
|
4
|
+
data.tar.gz: f020e6721cfa90811b98fe5162a9ba08e9087ef308b23e8fb2aec63bbdfed991
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35a07982ec48d66e2bc6950aab33ea962df70d9c3300ecf248e9ff2b24d50f5badf8f8d5162043df62bf2616ef7047459815b2d1e54702c33910d0b6fccee21f
|
|
7
|
+
data.tar.gz: 9b9431f117215d9048446e47d8e0896b150f7a0394c9f9ee4629a292ea5eaa858132d01249ac84d2639524932302790bf1291c7e91c7f5bd24ff8effa654e2be
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://circleci.com/gh/bigcommerce/gruf-sentry/tree/main) [](https://badge.fury.io/rb/gruf-sentry) [](http://inch-ci.org/github/bigcommerce/gruf-sentry)
|
|
4
4
|
|
|
5
|
-
Adds Sentry error reporting support for [gruf](https://github.com/bigcommerce/gruf) 2.7.0+.
|
|
5
|
+
Adds Sentry error reporting support for [gruf](https://github.com/bigcommerce/gruf) 2.7.0+ and [sentry-ruby](https://github.com/getsentry/sentry-ruby) 4.3+.
|
|
6
6
|
|
|
7
7
|
This gem will automatically report grpc failures and Gruf errors into Sentry as they happen in servers and clients.
|
|
8
8
|
|
|
@@ -33,17 +33,15 @@ module Gruf
|
|
|
33
33
|
yield
|
|
34
34
|
rescue StandardError, GRPC::BadStatus => e
|
|
35
35
|
if error?(e) # only capture
|
|
36
|
-
::Sentry.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
)
|
|
36
|
+
::Sentry.configure_scope do |scope|
|
|
37
|
+
scope.set_transaction_name(request_context.route_key)
|
|
38
|
+
scope.set_tags(grpc_method_name: request_context.method_name,
|
|
39
|
+
grpc_route_key: request_context.route_key,
|
|
40
|
+
grpc_call_type: request_context.type,
|
|
41
|
+
grpc_error_code: code_for(e),
|
|
42
|
+
grpc_error_class: e.class.name)
|
|
43
|
+
end
|
|
44
|
+
::Sentry.capture_exception(e)
|
|
47
45
|
end
|
|
48
46
|
raise # passthrough
|
|
49
47
|
end
|
data/lib/gruf/sentry/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gruf-sentry
|
|
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
|
- Shaun McCormick
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler-audit
|
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
179
|
version: '0'
|
|
180
180
|
requirements: []
|
|
181
|
-
rubygems_version: 3.
|
|
181
|
+
rubygems_version: 3.3.4
|
|
182
182
|
signing_key:
|
|
183
183
|
specification_version: 4
|
|
184
184
|
summary: Automatically report gruf failures as sentry errors
|