lib/sentry/client.rb in sentry-ruby-5.15.1 vs lib/sentry/client.rb in sentry-ruby-5.15.2
- old
+ new
@@ -46,10 +46,10 @@
# @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors.
# @return [Event, nil]
def capture_event(event, scope, hint = {})
return unless configuration.sending_allowed?
- unless event.is_a?(TransactionEvent) || configuration.sample_allowed?
+ if event.is_a?(ErrorEvent) && !configuration.sample_allowed?
transport.record_lost_event(:sample_rate, 'event')
return
end
event_type = event.is_a?(Event) ? event.type : event["type"]