Skip to content
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

Use faraday to allow EM HTTP backends #22

Closed
betamatt opened this issue Oct 10, 2011 · 5 comments
Closed

Use faraday to allow EM HTTP backends #22

betamatt opened this issue Oct 10, 2011 · 5 comments

Comments

@betamatt
Copy link

I've run into a case where I have an EventMachine app that doesn't want to block while delivering Airbrake notices. Normally, I fix this by queuing the notice. However, this app is very thin and doesn't require messaging for anything else. It would be really heavy to run queueing infrastructure just for the occasional exception notice.

The obvious solution is for Airbrake to use faraday so that the backend can be switched from net_http to em-synchrony. However, this introduces a dependency that you may be trying to avoid. Is that the case or would you accept a patch?

@betamatt
Copy link
Author

Alternatively, Airbrake could be refactored a little to allow a custom Sender class. That way I could package a faraday implementation in a separate gem without introducing dependencies to base airbrake.

@betamatt
Copy link
Author

Investigating further I found that Airbrake can already be configured with a custom sender that responds to #send_to_airbrake. Works for my needs.

@thibaudgg
Copy link

@betamatt can you give an example on how you have do that. It would be great! Thanks.
I would like to use Airbrake inside a simple cramp app.

@betamatt
Copy link
Author

@thibaudgg
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants