@@ -211,7 +211,7 @@ as the version number, it will be changed in the test for every version.
| `null` | Null or empty String |
| `eq` | Equal(default) |
**Segment verify description format**
**Expected Data Format Of The Segment**
```yml
segmentItems:
-
...
...
@@ -231,7 +231,7 @@ segmentItems:
| segmentId | trace ID.
| spans | segment span list. Follow the next section to see how to describe every span.
**Span verify description format**
**Expected Data Format Of The Span**
**Notice**: The order of span list should follow the order of the span finish time.
...
...
@@ -294,6 +294,46 @@ The verify description for SegmentRef
| networkAddress | The peer value of parent exit span.
| refType | Ref type, options, CrossProcess or CrossThread.
**Expected Data Format Of The Meter Items**
```yml
meterItems:
-
serviceName:SERVICE_NAME(string)
meterSize:METER_SIZE(int)
meters:
-...
```
| Field | Description
| --- | ---
| serviceName | Service Name.
| meterSize | The number of meters is expected.
| meters | meter list. Follow the next section to see how to describe every meter.
**Expected Data Format Of The Meter**
```yml
meterId:
name:NAME(string)
tags:
-{name:TAG_NAME(string),value:TAG_VALUE(string)}
singleValue:SINGLE_VALUE(double)
histogramBuckets:
-HISTOGRAM_BUCKET(double)
...
```
The verify description for MeterId
| Field | Description
|--- |---
| name | meter name.
| tags | meter tags.
| tags.name | tag name.
| tags.value | tag value.
| 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.
### startup.sh
This script provide a start point to JVM based service, most of them starts by a `java -jar`, with some variables.
...
...
@@ -378,9 +418,9 @@ dependent services are database or cluster.
Notice, because heartbeat service could be traced fully or partially, so, segmentSize in `expectedData.yaml` should use `ge` as the operator,
and don't include the segments of heartbeat service in the expected segment data.
### The example Process of Writing Expected Data
### The example Process of Writing Tracing Expected Data
Expected data file, `expectedData.yaml`, include `SegmentItems`.
Expected data file, `expectedData.yaml`, include `SegmentItems` part.
We are using the HttpClient plugin to show how to write the expected data.
...
...
@@ -485,6 +525,80 @@ SegmentB span list should like following
### The example Process of Writing Meter Expected Data
Expected data file, `expectedData.yaml`, include `MeterItems` part.
We are using the toolkit plugin to demonstrate how to write the expected data. When write the [meter plugin](Java-Plugin-Development-Guide.md#meter-plugin), the expected data file keeps the same.