sentry-ruby-core 4.9.0 → 4.9.1

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: acac59016a784fe97a900098b0dbd42d74996a3193d8e8f6026da3d097593d19
4
- data.tar.gz: 2e670fbe76abfbd62e0c45e5272929a5cce1ba3ffb556afb68b50f35b4969be3
3
+ metadata.gz: 581302d8f4b4352dad44e05ccf4bbd052b2444940cde2712dbeb7ba79db8dd6d
4
+ data.tar.gz: ede4e7f3a4d8c156f19c336fbd52862b84c1ef60e42bdf8e55d491f3634da7c7
5
5
  SHA512:
6
- metadata.gz: 68fd8755acacba19433d948722cb02a751c61ea822360a6dcfb245a9657f197df08f11ceef800f6db06bc75b4c5e39862b8d2f2cb88c0f844718bccf2dffec77
7
- data.tar.gz: f3083e8f467ecc06c878aa568c01dfcfd4c793da989196f1397684ef0276107b2500eeb2233557e34a55ad6e7a53e9110fcfb06ccb68077cac63d1f3810ae3b4
6
+ metadata.gz: '02219e1309e5d539c5229ff74aac3e0377cd1480a20b99d6cc9a690e9d16967a742e0f2f5d599ec30e0ee303109b5975b342ea9645f90c4bc24111ee4beec777'
7
+ data.tar.gz: 76a5a05b324edb0571d1fe61104554444db6210f0ce76b9028e8665fcf2f083fbfa967bb941997006017931d84fdab7d3e45ee1c038d25939f1cd4a8c57ff2e8
data/lib/sentry/client.rb CHANGED
@@ -76,8 +76,9 @@ module Sentry
76
76
  # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
77
77
  # @return [Event, nil]
78
78
  def event_from_exception(exception, hint = {})
79
+ return unless @configuration.sending_allowed? && @configuration.exception_class_allowed?(exception)
80
+
79
81
  integration_meta = Sentry.integrations[hint[:integration]]
80
- return unless @configuration.exception_class_allowed?(exception)
81
82
 
82
83
  Event.new(configuration: configuration, integration_meta: integration_meta).tap do |event|
83
84
  event.add_exception_interface(exception)
@@ -90,6 +91,8 @@ module Sentry
90
91
  # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
91
92
  # @return [Event]
92
93
  def event_from_message(message, hint = {}, backtrace: nil)
94
+ return unless @configuration.sending_allowed?
95
+
93
96
  integration_meta = Sentry.integrations[hint[:integration]]
94
97
  event = Event.new(configuration: configuration, integration_meta: integration_meta, message: message)
95
98
  event.add_threads_interface(backtrace: backtrace || caller)
data/lib/sentry/hub.rb CHANGED
@@ -114,6 +114,9 @@ module Sentry
114
114
  options[:hint][:message] = message
115
115
  backtrace = options.delete(:backtrace)
116
116
  event = current_client.event_from_message(message, options[:hint], backtrace: backtrace)
117
+
118
+ return unless event
119
+
117
120
  capture_event(event, **options, &block)
118
121
  end
119
122
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
- VERSION = "4.9.0"
4
+ VERSION = "4.9.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-07 00:00:00.000000000 Z
11
+ date: 2022-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday