Michael,
Generally, you will not be able to add custom configs to the managed fluentd or fluent-bit DaemonSet. To fully customize the configuration, you'd need to disable the managed DaemonSet and deploy your own, as you've already discovered.
However, you may not need to customize the configs at all, at least for some of your use cases. The way the managed configs are set up, any logs sent to stdout default to severity INFO, and any logs sent to stderr default to ERROR. As Charles said, if your log line is written as a serialized JSON object, certain fields in that object will be used to control the resulting log entry, as described in [1] and [2]. Specifically, fields named "timestamp", "timestampSeconds"+"timestampNanos", and "time" control the entry timestamp (in various formats), while "severity" controls the entry severity. So if you write the following line to stdout:
{"message":"This should be at severity ERROR\n","severity":"ERROR","time":"2021-01-27T18:00:00Z"}
You should get a log entry like the following:
{"jsonPayload":{"message":"This should be at severity ERROR\n"},"timestamp": "2021-01-27T18:00:00Z","severity": "ERROR","receiveTimestamp": "2021-01-28T01:06:40.709652601Z"}
Regarding multiline exception detection, the logging agent does detect Java exception stack traces by default, but it does not handle multiline exception messages, which is what you seem to have. For reference, the full state machine for detecting Java exceptions in the fluentd plugin sources is at [3]. The fluent-bit-based agent implements something similar. FWIW, even if the agent could detect and join that exception trace, I am not sure that Cloud Error Reporting would recognize it as a valid stack trace once it's ingested. You can verify the latter by piping your full stack trace (as written to stdout/stderr by the application) into the following command:
gcloud beta error-reporting events report \
--service manual \
--service-version test-version \
--project=$(gcloud config get-value project) \
--message-file=/dev/stdin
and checking the results on the
Error Reporting page in the Cloud Console. Sadly, if it doesn't work, I don't really have a good mitigation for you other than changing the format of that exception message to not contain newlines.
Hope this helps,
Igor