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

make logging keys fluentD compatible #1591

Merged
merged 1 commit into from Jan 8, 2024
Merged

Conversation

ashmeenkaur
Copy link
Collaborator

@ashmeenkaur ashmeenkaur commented Jan 8, 2024

Description

This PR changes GCSFuse logging keys to be compatible with fluentD based on the following references:

  1. https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing
  2. https://cloud.google.com/logging/docs/agent/logging/configuration#special-fields

Changes summary:

  1. JSON log structure time changed
    "time":{"timestampSeconds":1694164762,"timestampNanos":1694164762084862036}
    to
    "timestamp":{"seconds":1704697907,"nanos":553918512}

  2. JSON log structure message changed from
    "msg":"<log message>"
    to
    "message":"<log message>"

Sample log:

{"timestamp":{"seconds":1704703429,"nanos":670828386},"severity":"TRACE","message":"fuse_debug: Op 0x00000144        connection.go:415] <- ReleaseDirHandle (PID 0)"}

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - Manually verified the log format is working with google fluentD
  2. Unit tests - Changed unit tests to match regular expression of log.
  3. Integration tests - NA

@ashmeenkaur ashmeenkaur marked this pull request as ready for review January 8, 2024 08:50
@ashmeenkaur ashmeenkaur merged commit 15f6bbd into master Jan 8, 2024
8 checks passed
@ashmeenkaur ashmeenkaur deleted the log_fluentd_compatible branch January 8, 2024 13:18
ashmeenkaur added a commit that referenced this pull request Jan 9, 2024
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.

None yet

3 participants