Mixed exception log formating causing problems for elastic search indexing
For rails logging when we log an exception we have multiple fields:
exception.backtrace
exception.class
exception.message
For sidekiq logging, exception
is just a string.
This works fine in VMs because we send sidekiq logs and rails logs to separate elasticsearch indexes.
In cloudnative sidekiq, all logs are combined together in the pod which means we get a mix of messages from rails and sidekiq. This is fine until field definitions collide like this. It would probably be better if we have uniform structure between sidekiq and rails.
For now we need to work around this by coercing exception
into a string for sidekiq, which is not great since we lose the ability to filter on other fields.
Edited by John Jarvis