quarkus-logging-json icon indicating copy to clipboard operation
quarkus-logging-json copied to clipboard

add format for google cloud platform

Open johnnystargazer opened this issue 3 years ago • 4 comments

Reference: https://cloud.google.com/logging/docs/agent/configuration#process-payload

Most of the java code logic is copy from https://github.com/spring-cloud/spring-cloud-gcp/blob/main/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java

johnnystargazer avatar Dec 24 '21 19:12 johnnystargazer

Nice PR! We are also waiting for this to merged.

DPGrev avatar Feb 09 '22 11:02 DPGrev

Would love to see this merged, any help needed?

ayhanap avatar Oct 20 '22 14:10 ayhanap

I have not used GCP by my self, and there are two different PRs not with same fields. For me I am not sure what the correct format is, I think its maybe better just disable all the defaults fields, and create own JsonProvider, with all the fields wanted.

SlyngDK avatar Oct 20 '22 14:10 SlyngDK

Ok, I will analyze both PRs and list differences. There are many optional fields but the critical fields are severity and message(containing stacktrace). Without these, all logs are shown as default severity and there is no automatic ErrorReporting out of stacktraces.

As reference, these are the docs for json fields.

https://cloud.google.com/logging/docs/structured-logging https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

ayhanap avatar Oct 20 '22 15:10 ayhanap