You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2022/08/14 15:47:34 UTC

[skywalking-java] branch main updated: Update plugin test document for logging. (#294)

This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


The following commit(s) were added to refs/heads/main by this push:
     new 115bcc1a3 Update plugin test document for logging. (#294)
115bcc1a3 is described below

commit 115bcc1a3fde5003def1bbd8bc985627bc3c5ee8
Author: jmjoy <91...@qq.com>
AuthorDate: Sun Aug 14 23:47:30 2022 +0800

    Update plugin test document for logging. (#294)
---
 CHANGES.md                                         |  3 +-
 .../setup/service-agent/java-agent/Plugin-test.md  | 55 ++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 418b7918b..3a3a60388 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -19,7 +19,8 @@ Release Notes.
 #### Documentation
 
 * Add a section in `Bootstrap-plugins` doc, introducing HttpURLConnection Plugin compatibility.
-* Update `Plugin automatic test framework` ,fix inconsistent description about configuration.yml
+* Update `Plugin automatic test framework`, fix inconsistent description about configuration.yml.
+* Update `Plugin automatic test framework`, add expected data format of the log items.
 
 All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/138?closed=1)
 
diff --git a/docs/en/setup/service-agent/java-agent/Plugin-test.md b/docs/en/setup/service-agent/java-agent/Plugin-test.md
index 287bf6dfe..fc336a4b0 100644
--- a/docs/en/setup/service-agent/java-agent/Plugin-test.md
+++ b/docs/en/setup/service-agent/java-agent/Plugin-test.md
@@ -331,6 +331,61 @@ The verify description for MeterId
 | singleValue | counter or gauge value. Using condition operate of the number to validate, such as `gt`, `ge`. If current meter is histogram, don't need to write this field.
 | histogramBuckets | histogram bucket. The bucket list must be ordered. The tool assert at least one bucket of the histogram having nonzero count. If current meter is counter or gauge, don't need to write this field.
 
+
+**Expected Data Format Of The Log Items**
+```yml
+logItems:
+-
+  serviceName: SERVICE_NAME(string)
+  logSize: LOG_SIZE(int)
+  logs:
+  - ...
+```
+
+| Field       |  Description
+|-------------| ---
+| serviceName | Service Name.
+| logSize     | The number of logs is expected.
+| logs        | log list. Follow the next section to see how to describe every log.
+
+**Expected Data Format Of The Log**
+
+```yml
+    timestamp: TIMESTAMP_VALUE(int)
+    endpoint: ENDPOINT_VALUE(int)
+    traceContext:
+      traceId: TRACE_ID_VALUE(string)
+      traceSegmentId: TRACE_SEGMENT_ID_VALUE(string)
+      spanId: SPAN_ID_VALUE(int)
+    body:
+      type: TYPE_VALUE(string)
+      content: # Choose one of three (text, json or yaml)
+        text: TEXT_VALUE(string)
+        # json: JSON_VALUE(string)
+        # yaml: YAML_VALUE(string)
+    tags:
+      data:
+        - key: TAG_KEY(string)
+          value: TAG_VALUE(string)
+        ...
+    layer: LAYER_VALUE(string)
+    ...
+```
+
+The verify description for Log
+
+| Field                       | Description
+|-----------------------------|---
+| timestamp                   | log timestamp.
+| endpoint                    | log endpoint.
+| traceContext.traceId        | log associated trace id.
+| traceContext.traceSegmentId | log associated trace segment id.
+| traceContext.spanId         | log associated span id.
+| body.type                   | log body type.
+| body.content                | log content, the sub field choose one of three (text, json or yaml).
+| tags.data                   | log tags, key value pairs.
+| layer                       | log layer.
+
 ### startup.sh
 
 This script provide a start point to JVM based service, most of them starts by a `java -jar`, with some variables.