Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[batch] Add json parsing and severity to GCP Ops Agent config #14187

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

daniel-goldstein
Copy link
Contributor

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.

@danking danking merged commit 2858259 into hail-is:main Jan 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants