Skip to content

Adjust GcpLayout JSON to latest format (#3586) #3867

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

Merged
merged 1 commit into from
Aug 1, 2025
Merged

Conversation

jvz
Copy link
Member

@jvz jvz commented Jul 31, 2025

  • Adjust GcpLayout JSON to latest format

First, it formats the log timestamp field to the correct format recognized by Fluent-Bit (component of Google Cloud Logging) and Google Ops Agent.

Secondly, severity field now must be prefixed with logging.googleapis.com.

Third, counter cannot be used for insertId as it is duplicated on different threads.

And the last but not the least, exception, thread and logger fields are pretty standard when logging via Logback's JSON layout and Google's Spring GCP libraries. Field name changes now match these other loggers.

  • revert severity changes, remove insertId

  • Remove insertid from tests

  • fix spotless error

  • Switch exception field to use exception resolver

  • try to fix timestamp tests

  • Fix tests with empty exceptions

  • Add changelog

  • Improve changelog.


Cherry pick of #3586 to 3.x.

* Adjust GcpLayout JSON to latest format

First, it formats the log timestamp field to the correct format
recognized by Fluent-Bit (component of Google Cloud Logging) and Google
Ops Agent.

Secondly, severity field now must be prefixed with
logging.googleapis.com.

Third, counter cannot be used for insertId as it is duplicated on
different threads.

And the last but not the least, exception, thread and logger fields are
pretty standard when logging via Logback's JSON layout and Google's
Spring GCP libraries. Field name changes now match these other loggers.

* revert severity changes, remove insertId

* Remove insertid from tests

* fix spotless error

* Switch exception field to use exception resolver

* try to fix timestamp tests

* Fix tests with empty exceptions

* Add changelog

* Improve changelog.

---------

Co-authored-by: Volkan Yazıcı <[email protected]>
@jvz jvz added this to the 3.0.0-beta4 milestone Jul 31, 2025
@jvz jvz added the layouts Affects one or more Layout plugins label Jul 31, 2025
@jvz jvz merged commit 6af1756 into main Aug 1, 2025
11 checks passed
@jvz jvz deleted the fix/3.x/port-3586 branch August 1, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
layouts Affects one or more Layout plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants