New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log unhandled exceptions to configured application block #209

Merged
merged 4 commits into from Oct 4, 2018

Conversation

Projects
None yet
5 participants
@orien
Member

orien commented Oct 3, 2018

Context

We've been trying to track down an exception that's been killing our process. Rather than sifting through the logs it'd be nice to see this error in Rollbar.

Change

Handle uncaught exceptions with the application configured block. (In our case it logs to Rollbar.)

@stevehodgkiss

This comment has been minimized.

Show comment
Hide comment
@stevehodgkiss

stevehodgkiss Oct 3, 2018

Member

I think this will likely result in duplicate error reports if Rollbar is installed (and ESPRunner is invoked from rake) because Rollbar automatically instruments rake to report errors, and these errors would be raised up to the rake level and end the process.

Member

stevehodgkiss commented Oct 3, 2018

I think this will likely result in duplicate error reports if Rollbar is installed (and ESPRunner is invoked from rake) because Rollbar automatically instruments rake to report errors, and these errors would be raised up to the rake level and end the process.

@orien

This comment has been minimized.

Show comment
Hide comment
@orien

orien Oct 4, 2018

Member

@stevehodgkiss That's a good point. How about we introduce another configuration option for this case? Perhaps on_event_processor_critical_error:

  config.on_event_processor_critical_error = proc { |exception, processor_name| …
Member

orien commented Oct 4, 2018

@stevehodgkiss That's a good point. How about we introduce another configuration option for this case? Perhaps on_event_processor_critical_error:

  config.on_event_processor_critical_error = proc { |exception, processor_name| …
end
context 'when no error is raised' do
before do
allow(error_handler).to receive(:with_error_handling).and_yield
allow(logger).to receive(:info)

This comment has been minimized.

@Domon

Domon Oct 4, 2018

Nice cleanup 👍

@Domon

Domon Oct 4, 2018

Nice cleanup 👍

@Domon

Domon approved these changes Oct 4, 2018

@scottyp-env

Should help a lot, thanks @orien!

@orien orien merged commit 44c3b72 into master Oct 4, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@orien orien deleted the log_fatal_execptions_to_configured_callback branch Oct 4, 2018

@orien orien restored the log_fatal_execptions_to_configured_callback branch Oct 4, 2018

@orien orien deleted the log_fatal_execptions_to_configured_callback branch Oct 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment