Method: Sentry::Client#send_envelope

Defined in:
lib/sentry/client.rb

#send_envelope(envelope) ⇒ void

This method returns an undefined value.

Send an envelope directly to Sentry.

Parameters:

  • envelope (Envelope)

    the envelope to be sent.



301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/sentry/client.rb', line 301

def send_envelope(envelope)
  transport.send_envelope(envelope) if configuration.sending_to_dsn_allowed?
  spotlight_transport.send_envelope(envelope) if spotlight_transport
rescue => e
  log_error("Envelope sending failed", e, debug: configuration.debug)

  envelope.items.map(&:data_category).each do |data_category|
    transport.record_lost_event(:network_error, data_category)
  end

  raise
end