-
Notifications
You must be signed in to change notification settings - Fork 56
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
fix: support Elixir 1.17 #575
Conversation
Elixir 1.17 made some changes to error logging that affected the pattern matching in our `gen_event` handler. This supports the new and the old events when extracting details for the error context. Related: https://github.com/elixir-lang/elixir/releases/tag/v1.7.0 https://www.infoq.com/news/2018/08/elixir-1.7-improvements/ https://www.erlang.org/doc/apps/stdlib/gen_event.html https://hexdocs.pm/logger/Logger.html
31a784b
to
038ee22
Compare
Regarding 038ee22, here is the diff between the Elixir 1.15 and 1.17 events that are being passed to
GenServer extract_details args: [
[
"GenServer ",
"MyGenServer",
" terminating",
[
[10 | "** (KeyError) key :bad_key not found in: %{}"],
["\n " | ":erlang.map_get(:bad_key, %{})"],
["\n " |
"test/honeybadger/logger_test.exs:25: Honeybadger.LoggerTest.MyGenServer.handle_cast/2"],
["\n " |
"(stdlib 6.1.1) gen_server.erl:2371: :gen_server.try_handle_cast/3"],
["\n " |
"(stdlib 6.1.1) gen_server.erl:2433: :gen_server.handle_msg/6"],
["\n " |
"(stdlib 6.1.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3"]
],
+ [],
"\nLast message",
[],
": ",
"{:\"$gen_cast\", :raise_error}"
],
"\nState: ",
"%{}"
] :gen_event handler extract_details args: [
[
":gen_event handler ",
"Honeybadger.LoggerTest.MyEventHandler",
" installed in ",
"#PID<0.7227.0>",
" terminating",
[
[10 | "** (RuntimeError) Oops"],
["\n " |
"test/honeybadger/logger_test.exs:58: Honeybadger.LoggerTest.MyEventHandler.handle_event/2"],
["\n " |
"(stdlib 6.1.1) gen_event.erl:1921: :gen_event.server_update/4"],
["\n " |
"(stdlib 6.1.1) gen_event.erl:1903: :gen_event.server_notify/4"],
["\n " | "(stdlib 6.1.1) gen_event.erl:1640: :gen_event.handle_msg/6"],
["\n " |
"(stdlib 6.1.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3"]
],
+ [],
"\nLast message: ",
":raise_error"
],
"\nState: ",
"{}"
] |
Hey @sorentwo! Are you around and is there any chance you could give this a quick look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor suggestion to maximize the test matrix, but this looks good otherwise. Note that Elixir v1.18 will also be released soon (it's in an RC currently).
Co-authored-by: Parker Selbert <[email protected]>
Thanks! |
https://hexdocs.pm/elixir/1.17.3/compatibility-and-deprecations.html