quarkus-logging-json
quarkus-logging-json copied to clipboard
add format for google cloud platform
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
Nice PR! We are also waiting for this to merged.
Would love to see this merged, any help needed?
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.
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