ViliusS commented on code in PR #3586:
URL: https://github.com/apache/logging-log4j2/pull/3586#discussion_r2044317642
##########
log4j-layout-template-json/src/main/resources/GcpLayout.json:
##########
@@ -37,8 +42,9 @@
}
},
"logging.googleapis.com/insertId": {
- "$resolver": "counter",
- "stringified": true
+ "$resolver": "pattern",
+ "pattern": "%uuid{TIME}",
+ "stackTraceEnabled": false
Review Comment:
@vy here are the GCP logs with counter type `insertId` for the ActiveMQ
Artemis instance:

The first green column is the `insertId`, the second column is thread name.
The log up to the counter 40 is startup log. Then I have stopped Java app
(Artemis instance) after half an hour and insertId started from 0 for shutdown
log. Then it restarts at 0 second time, when I again start the app. Not sure if
that's a bug in how Artemis used Log4J for logging or a bug in Log4J itself,
but in any case, restarting from 0 after the application was restarted is not
what this field supposed to represent.
This is how it looks like with time-based UUIDs:

And this is the look with the current patch, where insertIds are generated
by GCP themselves:

--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]