ViliusS commented on code in PR #3586: URL: https://github.com/apache/logging-log4j2/pull/3586#discussion_r2045316770
########## log4j-layout-template-json/src/main/resources/GcpLayout.json: ########## @@ -49,25 +55,15 @@ "key": "span_id" }, "logging.googleapis.com/trace_sampled": true, - "_exception": { - "class": { - "$resolver": "exception", - "field": "className" - }, - "message": { - "$resolver": "exception", - "field": "message" - }, - "stackTrace": { - "$resolver": "pattern", - "pattern": "%xEx" - } + "exception": { + "$resolver": "pattern", + "pattern": "%xEx" }, Review Comment: > > As `exception` resolver doesn't add full package name to the exception, all `ActiveMQIllegalState` exceptions, even from other packages but having different stacktrace, would be grouped into one error group. > > The `exception` resolver prints exactly the same text as `Throwable#printStackTrace`. What probably happens is that GCP recognizes that format and strips the package name. He doesn't recognize `%xEx`. Google Error Reporting nor Cloud Logging does that. They just process log messages for various indicators and print them as they are. I also get the same format in plaintext JSON file before sending it to GCP, so this is definitely not processed on their side. Unless there is some kind of bug in my Log4J version (2.24.3) or Artemis app modifies internal exception format somehow. P.S. I would prefer `exception` also, because then the field is not displayed in JSON if it is empty, however full package name is more important in this case I think. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org