I'm seeing a crash with the Scout Ecto logger in my Elixir app. I'm guessing the Scout Elixir library isn't handling all types of DBConnection.LogEntry.result values. In this particular case, we're using Ecto.Multi with multiple changes which is wrapped in a transaction. That transaction is designed to rollback in some cases. We're using Ecto 2, and scout_apm_elixir 0.4.15. Here's the stack trace:
** (EXIT from #PID<0.3733.0>) an exception was raised:
** (ArgumentError) cannot convert the given list to a string.
To be converted to a string, a list must contain only:
* strings
* integers representing Unicode codepoints
* or a list containing one of these three elements
Please check the given list or call inspect/1 to get the list representation, got:
[:rollback, :release]
(elixir) lib/list.ex:826: List.to_string/1
(scout_apm) lib/scout_apm/instruments/ecto_logger.ex:60: ScoutApm.Instruments.EctoLogger.query_name_log_entry/1
(scout_apm) lib/scout_apm/instruments/ecto_logger.ex:22: ScoutApm.Instruments.EctoLogger.log/1
(db_connection) lib/db_connection.ex:1186: DBConnection.log/6
(db_connection) lib/db_connection.ex:1167: DBConnection.transaction_log/1
(db_connection) lib/db_connection.ex:799: DBConnection.transaction/3
(ecto) lib/ecto/repo/queryable.ex:23: Ecto.Repo.Queryable.transaction/4
I'm seeing a crash with the Scout Ecto logger in my Elixir app. I'm guessing the Scout Elixir library isn't handling all types of
DBConnection.LogEntry.result
values. In this particular case, we're using Ecto.Multi with multiple changes which is wrapped in a transaction. That transaction is designed to rollback in some cases. We're using Ecto 2, andscout_apm_elixir
0.4.15. Here's the stack trace:Which points to this line: https://github.com/scoutapp/scout_apm_elixir/blob/v0.14.5/lib/scout_apm/instruments/ecto_logger.ex#L60