raven-erlang
raven-erlang copied to clipboard
Use with lager via raven_lager_backend
This may be outside of the scope of this repo, but this pull request brings raven-erlang and lager together.
I'm sure that more sentry friendly metadata can be extracted from lager, but before I drilled down I thought I'd see if this was even of interest.
Cool repo btw.
This is great! Are you interested in continuing the integration work to see if we could extract some metadata that could be pushed to sentry?
Hey @asabil -- I definitely wouldn't mind! General metadata like the source PID and such should be easy, and I can follow raven_error_logger's lead.
One issue: I'd like to avoid duplicating functionality: after issuing this pull request I found https://github.com/basho/lager/blob/7af433004d846f7489fab1f705f8b06f40171bb2/src/error_logger_lager_h.erl which performs for lager what raven_error_logger does for this repo -- handling and parsing events from the error_logger.
I think raven_error_logger works great, and makes more sense than raven_lager_backend re-parsing the errors after they pass through and are munged (though very prettily :) by lager. I'm actually not sure what the best approach would be for raven_lager_backend -- perhaps skipping these error_logger -> lager messages? though this seems inconsistent.
Hope that made sense -- thoughts?