Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[batch] Add json parsing and severity to GCP Ops Agent config (hail-i…
…s#14187) Currently the Ops Agent does not do any parsing of the log message, so the log entry in Google Logging looks like: ``` jsonPayload: { message: "{"severity":"INFO","levelname":"INFO","asctime":"2024-01-22 16:10:45,748","filename":"worker.py","funcNameAndLine":"<module>:3461","message":"closed","hail_log":1}" } ``` The `parse_json` processor extracts the json fields from the message into fields on the `jsonPayload` so it looks like this ``` jsonPayload: { asctime: "2024-01-22 16:14:06,098" filename: "worker.py" funcNameAndLine: "<module>:180" hail_log: 1 levelname: "INFO" message: "CLOUD gcp" } ``` and only the new `message` field is displayed in the Google Logging row instead of the whole json. This also adds a `severity` field on the log entry so filters such as `SEVERITY!=INFO` work as expected.
- Loading branch information