Open tpitale opened 8 months ago
This causes our translator to be removed and we miss errors.
@tmaszk Do you happen to have any ideas why the report
would be nil
from the translator
function call?
This code looks like it takes min_level
, level
, :format | :report
, and the report itself, which is either a map or a keyword list.
https://github.com/elixir-lang/elixir/blob/v1.15.7/lib/logger/lib/logger/translator.ex#L35
I've tried to trigger the translator using Logger.error()
and raise
. I'm guessing the apparatus is more complicated to get in there. If anyone knows how, let me know and I'll write some tests.
Okay, in essence, we are getting a message through that does not include :error_info
in the kw list. Not sure if best to guard against that case, or continue to dig to try to find out what is being sent to us.
Going to fork it and update our app to add more logging on this. See what we get on startup.
Looks like a bunch of kafka messages from erlkaf (an erlang lib). Going to check if it is a :format
or :report
.
Okay, so these are only of kind = :format
. I think I'm going to PR filtering down to just :report
.
Describe the bug
Seem to be having an error on startup in our service where
parse_error_info(nil)
is being called. If we trace this up the stack we get to some newly changed code around error reporting in the logger translator.Environment
This line seems different than the docs suggest: https://github.com/newrelic/elixir_agent/pull/421/files#diff-810b4a095e0cf9779a97430561fa26fb924a45377bb2f61394bc4849a14f45a7R22
Docs: https://hexdocs.pm/logger/1.15.7/Logger.Translator.html#c:translate/4