@@ -46,7 +46,7 @@ def initialize(configuration)
46
46
# @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
47
47
# @return [Event, nil]
48
48
def capture_event ( event , scope , hint = { } )
49
- return unless configuration . sending_allowed ?
49
+ return unless configuration . event_building_allowed ?
50
50
51
51
if event . is_a? ( ErrorEvent ) && !configuration . sample_allowed?
52
52
transport . record_lost_event ( :sample_rate , 'event' )
@@ -82,7 +82,7 @@ def capture_event(event, scope, hint = {})
82
82
# @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
83
83
# @return [Event, nil]
84
84
def event_from_exception ( exception , hint = { } )
85
- return unless @configuration . sending_allowed ?
85
+ return unless @configuration . event_building_allowed ?
86
86
87
87
ignore_exclusions = hint . delete ( :ignore_exclusions ) { false }
88
88
return if !ignore_exclusions && !@configuration . exception_class_allowed? ( exception )
@@ -101,7 +101,7 @@ def event_from_exception(exception, hint = {})
101
101
# @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
102
102
# @return [Event]
103
103
def event_from_message ( message , hint = { } , backtrace : nil )
104
- return unless @configuration . sending_allowed ?
104
+ return unless @configuration . event_building_allowed ?
105
105
106
106
integration_meta = Sentry . integrations [ hint [ :integration ] ]
107
107
event = ErrorEvent . new ( configuration : configuration , integration_meta : integration_meta , message : message )
@@ -128,7 +128,7 @@ def event_from_check_in(
128
128
monitor_config : nil ,
129
129
check_in_id : nil
130
130
)
131
- return unless configuration . sending_allowed ?
131
+ return unless configuration . event_building_allowed ?
132
132
133
133
CheckInEvent . new (
134
134
configuration : configuration ,
@@ -172,8 +172,8 @@ def send_event(event, hint = nil)
172
172
end
173
173
end
174
174
175
- transport . send_event ( event )
176
- spotlight_transport & .send_event ( event )
175
+ transport . send_event ( event ) if configuration . sending_allowed?
176
+ spotlight_transport . send_event ( event ) if spotlight_transport
177
177
178
178
event
179
179
rescue => e
0 commit comments