ForzaElixir / rollbax

Exception tracking and logging from Elixir to Rollbar
https://hexdocs.pm/rollbax
ISC License
243 stars 52 forks source link

Register handler to :logger instead of :error_logger #126

Open grossvogel opened 8 months ago

grossvogel commented 8 months ago

We recently upgraded to Elixir 1.15 and noticed that certain errors like LiveView process crashes were no longer being sent to Rollbar despite having enable_crash_reports enabled. The problem appears to be related to the fact that Rollbax registers itself as a handler to the old :error_logger, while Elixir has been moving to :logger instead.

There's a little more background and discussion in this issue: https://github.com/elixir-lang/elixir/issues/13030

grzuy commented 2 months ago

We solved this issue for ourselves by writing a new library/package called tower_rollbar (https://github.com/mimiquate/tower_rollbar) from scratch, which we ended up open sourcing and releasing.

It's compatible with elixir 1.15+.

Built on top of newer Erlang's logger and Elixir Logger. No code nor support for old and deprecated error_logger.

Hope it proves useful for others as it has been for us so far after a few months on production :slightly_smiling_face: