lujiajing1126 commented on a change in pull request #5357:
URL: https://github.com/apache/skywalking/pull/5357#discussion_r476999697
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java
##########
@@ -259,6 +260,43 @@
* @see
org.apache.skywalking.apm.agent.core.logging.core.PatternLogger#DEFAULT_CONVERTER_MAP
*/
public static String PATTERN = "%level %timestamp %thread %class :
%msg %throwable";
+
+ public static class JSON {
+ /**
+ * Key of the AgentName
+ */
+ public static String AGENT_NAME_KEY = "agent_name";
Review comment:
The `@timestamp` is used in logstash by default, the source code can be
found here,
https://github.com/elastic/logstash/blob/0d82bc064ca8184722d159e3e8036ffe1931e666/logstash-core/src/main/java/org/logstash/Event.java#L54
The classic `logback` (which is the default logging framework in Spring
Boot) uses the following json layout,
https://github.com/qos-ch/logback-contrib/blob/c68c2e5ddc0ed589b0f1e24bac7b9300a0ea5153/json/classic/src/main/java/ch/qos/logback/contrib/json/classic/JsonLayout.java#L105-L113
I suppose so far this is the only controversial part.
I agree in this PR, we can just keep the layout a constant with some
reasonable choices of the default keys. And then wait for the feedback from the
community.
I will remove them later.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]