Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/raven/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def send_event(event)
event = event.to_hash

unless @state.should_try?
failed_send(nil, event)
configuration.logger.error "Not sending event due to previous failure(s)."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool if we could log here how long we have until the next attempt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also important that the backtrace (essentially all the info on line 96) is still printed here.

For people that don't use i.e. Sidekiq to send their Sentry events (so, automated retry), they're going to lose this event forever.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok will look into it.

return
end

Expand Down Expand Up @@ -93,11 +93,7 @@ def successful_send

def failed_send(e, event)
@state.failure
if e # exception was raised
configuration.logger.error "Unable to record event with remote Sentry server (#{e.class} - #{e.message}):\n#{e.backtrace[0..10].join("\n")}"
else
configuration.logger.error "Not sending event due to previous failure(s)."
end
configuration.logger.error "Unable to record event with remote Sentry server (#{e.class} - #{e.message}):\n#{e.backtrace[0..10].join("\n")}"
configuration.logger.error("Failed to submit event: #{get_log_message(event)}")
configuration.transport_failure_callback.call(event) if configuration.transport_failure_callback
end
Expand Down