scope-definitions.md 12.9 KB
Newer Older
1
# Scopes and Fields
W
Wing 已提交
2
Using the Aggregation Function, the requests will be grouped by time and **Group Key(s)** in each scope.
3 4 5 6 7

### SCOPE `All`

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
8 9 10 11 12 13 14 15
| name  | The service name of each request.  |   | string |
| serviceInstanceName  | The name of the service instance ID.  |   | string |
| endpoint  | The endpoint path of each request.  |   | string |
| latency  | The time taken by each request. |   |  int(in ms)  |
| status  | The success or failure of the request.  |   | bool(true for success)  |
| responseCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
16 17 18

### SCOPE `Service`

W
Wing 已提交
19
This calculates the metrics data from each request of the service. 
20 21 22

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
23 24 25 26 27 28 29 30 31 32
| name | The name of the service. | | string |
| nodeType | The kind of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| serviceInstanceName | The name of the service instance ID. | | string |
| endpointName | The name of the endpoint, such as a full path of HTTP URI. | | string |
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request. | | bool(true for success)  |
| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int|
| type | The type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
33 34
| tcpInfo.receivedBytes | The received bytes of the TCP traffic, if this request is a TCP call. | | long |
| tcpInfo.sentBytes | The sent bytes of the TCP traffic, if this request is a TCP call. | | long |
35 36 37

### SCOPE `ServiceInstance`

W
Wing 已提交
38
This calculates the metrics data from each request of the service instance. 
39 40 41

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
42 43 44 45 46 47 48 49 50 51
| name |  The name of the service instance, such as `ip:port@Service Name`.  **Note**: Currently, the native agent uses `uuid@ipv4` as the instance name, which does not assist in setting up a filter in aggregation. | | string|
| serviceName | The name of the service. | | string |
| nodeType | The kind of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| endpointName | The name of the endpoint, such as a full path of the HTTP URI. | | string|
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request. | | bool(true for success) |
| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
52 53
| tcpInfo.receivedBytes | The received bytes of the TCP traffic, if this request is a TCP call. | | long |
| tcpInfo.sentBytes | The sent bytes of the TCP traffic, if this request is a TCP call. | | long |
54 55 56

### SCOPE `Endpoint`

W
Wing 已提交
57
This calculates the metrics data from each request of the endpoint in the service. 
58 59 60

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
61 62 63 64 65 66 67 68 69 70
| name | The name of the endpoint, such as a full path of the HTTP URI. | | string |
| serviceName | The name of the service. | | string |
| serviceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| serviceInstanceName | The name of the service instance ID. | | string |
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
71 72
| tcpInfo.receivedBytes | The received bytes of the TCP traffic, if this request is a TCP call. | | long |
| tcpInfo.sentBytes | The sent bytes of the TCP traffic, if this request is a TCP call. | | long |
73 74 75

### SCOPE `ServiceRelation`

W
Wing 已提交
76
This calculates the metrics data from each request between services.
77 78 79

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| sourceServiceName | The name of the source service. | | string |
| sourceServiceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| sourceServiceInstanceName | The name of the source service instance. | | string |
| destServiceName | The name of the destination service. | | string |
| destServiceNodeType | The type of node of to which the Service or Network address belongs. | | enum |
| destServiceInstanceName | The name of the destination service instance.| | string|
| endpoint | The endpoint used in this call. | | string
| componentId | The ID of component used in this call. | yes | string
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Where the relation is detected. The value may be client, server, or proxy. | yes | enum|
| tlsMode | The TLS mode between source and destination services, such as `service_relation_mtls_cpm = from(ServiceRelation.*).filter(tlsMode == "mTLS").cpm()` || string|
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
95 96
| tcpInfo.receivedBytes | The received bytes of the TCP traffic, if this request is a TCP call. | | long |
| tcpInfo.sentBytes | The sent bytes of the TCP traffic, if this request is a TCP call. | | long |
97 98 99

### SCOPE `ServiceInstanceRelation`

W
Wing 已提交
100
This calculates the metrics data from each request between service instances.
101 102 103

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
| sourceServiceName | The name of the source service. | | string |
| sourceServiceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| sourceServiceInstanceName | The name of the source service instance. | | string |
| destServiceName | The name of the destination service. | | |
| destServiceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | string |
| destServiceInstanceName | The name of the destination service instance. | | string |
| endpoint | The endpoint used in this call. | | string
| componentId | The ID of the component used in this call. | yes | string
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Where the relation is detected. The value may be client, server, or proxy. | yes | enum|
| tlsMode | The TLS mode between source and destination service instances, such as `service_instance_relation_mtls_cpm = from(ServiceInstanceRelation.*).filter(tlsMode == "mTLS").cpm()` || string|
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
119 120
| tcpInfo.receivedBytes | The received bytes of the TCP traffic, if this request is a TCP call. | | long |
| tcpInfo.sentBytes | The sent bytes of the TCP traffic, if this request is a TCP call. | | long |
121 122 123

### SCOPE `EndpointRelation`

W
Wing 已提交
124 125 126 127
This calculates the metrics data of the dependency between endpoints. 
This relation is hard to detect, and it depends on the tracing library to propagate the previous endpoint. 
Therefore, the `EndpointRelation` scope aggregation comes into effect only in services under tracing by SkyWalking native agents, 
including auto instrument agents (like Java and .NET), OpenCensus SkyWalking exporter implementation, or other tracing context propagation in SkyWalking specification.
128 129 130

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
131 132 133 134 135 136 137 138 139 140 141 142 143
| endpoint | The parent endpoint in the dependency.| | string|
| serviceName | The name of the service. | | string |
| serviceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | enum |
| childEndpoint| The endpoint used by the parent endpoint in row(1). | | string |
| childServiceName | The endpoint used by the parent service in row(1). | | string |
| childServiceNodeType | The type of node to which the Service or Network address belongs, such as Normal, Database, MQ, or Cache. | | string |
| childServiceInstanceName | The endpoint used by the parent service instance in row(1). | | string |
| rpcLatency | The latency of the RPC between the parent endpoint and childEndpoint, excluding the latency caused by the parent endpoint itself.
| componentId | The ID of the component used in this call. | yes | string
| status | Indicates the success or failure of the request.| | bool(true for success) |
| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Indicates where the relation is detected. The value may be client, server, or proxy. | yes | enum|
144 145 146 147


### SCOPE `BrowserAppTraffic`

W
Wing 已提交
148
This calculates the metrics data from each request of the browser application (browser only).
149 150 151

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
152 153 154 155
| name | The browser application name of each request. |  | string |
| count | The number of request, which is fixed at 1. |  | int |
| trafficCategory | The traffic category. The value may be NORMAL, FIRST_ERROR, or ERROR. | | enum |
| errorCategory | The error category. The value may be AJAX, RESOURCE, VUE, PROMISE, or UNKNOWN. | | enum |
156 157 158

### SCOPE `BrowserAppSingleVersionTraffic`

W
Wing 已提交
159
This calculates the metrics data from each request of a single version in the browser application (browser only).
160 161 162

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
163 164 165 166 167
| name | The single version name of each request. |  | string |
| serviceName | The name of the browser application. | | string |
| count | The number of request, which is fixed at 1. |  | int |
| trafficCategory | The traffic category. The value may be NORMAL, FIRST_ERROR, or ERROR. | | enum |
| errorCategory | The error category. The value may be AJAX, RESOURCE, VUE, PROMISE, or UNKNOWN. | | enum |
168 169 170

### SCOPE `BrowserAppPageTraffic`

W
Wing 已提交
171
This calculates the metrics data from each request of the page in the browser application (browser only).
172 173 174

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
175 176 177 178 179
| name | The page name of each request. |  | string |
| serviceName | The name of the browser application. | | string |
| count | The number of request, which is fixed at 1. |  | int |
| trafficCategory | The traffic category. The value may be NORMAL, FIRST_ERROR, or ERROR. | | enum |
| errorCategory | The error category. The value may be AJAX, RESOURCE, VUE, PROMISE, or UNKNOWN. | | enum |
180 181 182 183


### SCOPE `BrowserAppPagePerf`

W
Wing 已提交
184
This calculates the metrics data form each request of the page in the browser application (browser only).
185 186 187

| Name | Remarks | Group Key | Type | 
|---|---|---|---|
W
Wing 已提交
188 189 190 191 192
| name | The page name of each request. |  | string |
| serviceName | The name of the browser application. | | string |
| redirectTime | The time taken to redirect. |  | int(in ms) |
| dnsTime | The DNS query time. | | int(in ms) |
| ttfbTime | Time to first byte. | | int(in ms) |
193 194 195 196 197 198 199 200 201 202
| tcpTime | TCP connection time. | | int(in ms) |
| transTime | Content transfer time.  | | int(in ms) |
| domAnalysisTime | Dom parsing time. | | int(in ms) |
| fptTime | First paint time or blank screen time. | | int(in ms) |
| domReadyTime | Dom ready time. | | int(in ms) |
| loadPageTime | Page full load time. | | int(in ms) |
| resTime | Synchronous load resources in the page. | | int(in ms) |
| sslTime | Only valid for HTTPS. | | int(in ms) |
| ttlTime | Time to interact. | | int(in ms) |
| firstPackTime | First pack time. | | int(in ms) |
W
Wing 已提交
203
| fmpTime | First Meaningful Paint. | | int(in ms) |