gruf-sentry 1.0.1 → 1.1.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: 41b5b045df57bd388ad5e01f0679a20d5a3ca18d2b426f698860b470e721dc20
4
- data.tar.gz: 0b3e8804eee42ee53b663a3425d6f17d00218684677c92c966f139f4aae92a0b
3
+ metadata.gz: 4e8e06b97f43cba2bea06e2bf43e10e33652e00e69094c19b634b3ecdaa7ce64
4
+ data.tar.gz: f020e6721cfa90811b98fe5162a9ba08e9087ef308b23e8fb2aec63bbdfed991
5
5
  SHA512:
6
- metadata.gz: d3ee1303ee5acab3ffd5c929753081f5de7d3683c5d9ba01b3f8a015beddbe9f3142e4573d59335bbeb6c946c3893ae855a72c7f54c9efe184d2c20d67cdfa3e
7
- data.tar.gz: 1ca6eae6cb90137edaab55b42627055413f43d967fb515b57784e601ef9c4703a1069d01321b95bbc96987c085a3fed1b90dbf9d29db2f7103b7a55646c77047
6
+ metadata.gz: 35a07982ec48d66e2bc6950aab33ea962df70d9c3300ecf248e9ff2b24d50f5badf8f8d5162043df62bf2616ef7047459815b2d1e54702c33910d0b6fccee21f
7
+ data.tar.gz: 9b9431f117215d9048446e47d8e0896b150f7a0394c9f9ee4629a292ea5eaa858132d01249ac84d2639524932302790bf1291c7e91c7f5bd24ff8effa654e2be
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@ Changelog for the gruf-sentry gem.
2
2
 
3
3
  ### Pending release
4
4
 
5
+ ### 1.1.0
6
+
7
+ - Update Gruf::Sentry::ClientInterceptor for new sentry-ruby format
8
+
5
9
  ### 1.0.1
6
10
 
7
11
  - Update Sentry.capture_exception to work with new sentry-ruby format
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CircleCI](https://circleci.com/gh/bigcommerce/gruf-sentry/tree/main.svg?style=svg)](https://circleci.com/gh/bigcommerce/gruf-sentry/tree/main) [![Gem Version](https://badge.fury.io/rb/gruf-sentry.svg)](https://badge.fury.io/rb/gruf-sentry) [![Inline docs](http://inch-ci.org/github/bigcommerce/gruf-sentry.svg?branch=main)](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.capture_exception(
37
- e,
38
- message: e.message,
39
- extra: {
40
- grpc_method_name: request_context.method_name,
41
- grpc_route_key: request_context.route_key,
42
- grpc_call_type: request_context.type,
43
- grpc_error_code: code_for(e),
44
- grpc_error_class: e.class
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
@@ -17,6 +17,6 @@
17
17
  #
18
18
  module Gruf
19
19
  module Sentry
20
- VERSION = '1.0.1'
20
+ VERSION = '1.1.0'
21
21
  end
22
22
  end
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.1
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: 2021-05-20 00:00:00.000000000 Z
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.0.9
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