wu-sheng commented on a change in pull request #3365: add logstash logback 
plugin
URL: https://github.com/apache/skywalking/pull/3365#discussion_r319048868
 
 

 ##########
 File path: 
docs/en/setup/service-agent/java-agent/Application-toolkit-logback-1.x.md
 ##########
 @@ -55,3 +56,25 @@
 ```
 
 * When you use `-javaagent` to active the sky-walking tracer, logback will 
output **traceId**, if it existed. If the tracer is inactive, the output will 
be `TID: N/A`.
+
+# logstash logback plugin
+
+* Dependency the toolkit, such as using maven or gradle
+
+```xml
+<dependency>
+    <groupId>org.apache.skywalking</groupId>
+    <artifactId>apm-toolkit-logback-1.x</artifactId>
+    <version>${skywalking.version}</version>
+</dependency>
+```
+
+* set `LogstashEncoder` of logback.xml
+
+```xml
+<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+    <provider 
class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.logstash.TraceIdJsonProvider">
+    </provider>
+    <customFields>{"app_id":"${app_id}"}</customFields>
 
 Review comment:
   What is `app_id`? Is it related to SkyWalking?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to