I'm having an issue with a JAVA App running in GKE where Stacktraces are shown in GCP's Log Explorer as individual logs:
The expected behavior would be that GCP show one entry per Stacktrace.
I tried generating logs using JUL and Log4J and the outcome is the same.
So I suspect there is something wrong on how logs are imported into GCP. Traditionally Stacktraces lines are separated by newline chars, so I'm guessing this is why GCP recognizes each line as a different log entry.
I also had a quick glance at the docs and there is no specific configuration for handling stacktraces.
So the question is, how can I make GCP understand that Stacktraces are a single log entry?
UPDATE: I'm guessing this would be the right way. Instead of using the default ingest, I should explicitly write the events following these docs
But again, I was wondering if there is an easier out-of-the-box config, or another approach.
Thanks!
