Skip to content

Commit f0d3d9b

Browse files
authored
Service and TCPService source support analyze TLS mode. (#13559)
1 parent 5afbc29 commit f0d3d9b

File tree

6 files changed

+27
-18
lines changed

6 files changed

+27
-18
lines changed

docs/en/changes/changes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
* Make MAL percentile align with OAL percentile calculation.
113113
* Update Grafana dashboards for OAP observability.
114114
* BanyanDB: fix query `getInstance` by instance ID.
115-
* Support the go agent(0.7.0 release) bundled pprof profiling feature.
115+
* Support the go agent(0.7.0 release) bundled pprof profiling feature.
116+
* Service and TCPService source support analyze TLS mode.
116117
* Library-pprof-parser: feat: add PprofSegmentParser.
117118
* Storage: feat: add languageType column to ProfileThreadSnapshotRecord.
118119
* Feat: add go profile analyzer

docs/en/concepts-and-designs/scope-definitions.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ Using the Aggregation Function, the requests will be grouped by time and **Group
66

77
This calculates the metrics data from each request of the service.
88

9-
| Name | Remarks | Group Key | Type |
10-
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------|
11-
| name | The name of the service. | | string |
12-
| layer | Layer represents an abstract framework in the computer science, such as operation system(OS_LINUX layer), Kubernetes(k8s layer) | | enum |
13-
| serviceInstanceName | The name of the service instance ID. | | string |
14-
| endpointName | The name of the endpoint, such as a full path of HTTP URI. | | string |
15-
| latency | The time taken by each request. | | int |
16-
| status | Indicates the success or failure of the request. | | bool(true for success) |
17-
| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302 | | int |
18-
| rpcStatusCode | The string value of the rpc response code. | | string |
19-
| type | The type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum |
20-
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
21-
| tag | The key-value pair of span tags in the segment. | | `Map<String, String>` |
22-
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string |
9+
| Name | Remarks | Group Key | Type |
10+
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------|
11+
| name | The name of the service. | | string |
12+
| layer | Layer represents an abstract framework in the computer science, such as operation system(OS_LINUX layer), Kubernetes(k8s layer) | | enum |
13+
| serviceInstanceName | The name of the service instance ID. | | string |
14+
| endpointName | The name of the endpoint, such as a full path of HTTP URI. | | string |
15+
| latency | The time taken by each request. | | int |
16+
| status | Indicates the success or failure of the request. | | bool(true for success) |
17+
| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302 | | int |
18+
| rpcStatusCode | The string value of the rpc response code. | | string |
19+
| type | The type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum |
20+
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
21+
| tag | The key-value pair of span tags in the segment. | | `Map<String, String>` |
22+
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string |
23+
| tlsMode | The TLS mode of the service. | | string |
2324

2425
### SCOPE `TCPService`
2526

@@ -35,6 +36,7 @@ This calculates the metrics data from each request of the TCP service.
3536
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string |
3637
| receivedBytes | The received bytes of the TCP traffic. | | long |
3738
| sentBytes | The sent bytes of the TCP traffic. | | long |
39+
| tlsMode | The TLS mode of the service. | | string |
3840

3941
### SCOPE `ServiceInstance`
4042

oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ public String getEntityId() {
8686
private SideCar sideCar = new SideCar();
8787
@Getter
8888
@Setter
89+
private String tlsMode;
90+
@Getter
91+
@Setter
8992
@ScopeDefaultColumn.DefinedByField(columnName = "attr0", isAttribute = true)
9093
private String attr0;
9194
@Getter

oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/TCPService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ public String getEntityId() {
6464
@Getter
6565
@Setter
6666
private SideCar sideCar = new SideCar();
67-
6867
@Getter
6968
@Setter
7069
private long receivedBytes;
71-
7270
@Getter
7371
@Setter
7472
private long sentBytes;
73+
@Getter
74+
@Setter
75+
private String tlsMode;
7576

7677
public String getTag(String key) {
7778
return originalTags.get(key);

oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/TelemetryDataDispatcher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ private static void toService(HTTPServiceMeshMetric.Builder metrics, long minute
226226
service.getSideCar().setInternalErrorCode(metrics.getInternalErrorCode());
227227
service.getSideCar().setInternalRequestLatencyNanos(metrics.getInternalRequestLatencyNanos());
228228
service.getSideCar().setInternalResponseLatencyNanos(metrics.getInternalResponseLatencyNanos());
229+
service.setTlsMode(metrics.getTlsMode());
229230

230231
SOURCE_RECEIVER.receive(service);
231232
}
@@ -241,6 +242,7 @@ private static void toTCPService(TCPServiceMeshMetric.Builder metrics, long minu
241242
service.getSideCar().setInternalResponseLatencyNanos(metrics.getInternalResponseLatencyNanos());
242243
service.setReceivedBytes(metrics.getReceivedBytes());
243244
service.setSentBytes(metrics.getSentBytes());
245+
service.setTlsMode(metrics.getTlsMode());
244246

245247
SOURCE_RECEIVER.receive(service);
246248
}

test/e2e-v2/cases/kong/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ setup:
3030

3131
verify:
3232
retry:
33-
count: 20
33+
count: 60
3434
interval: 3s
3535
cases:
3636
- includes:

0 commit comments

Comments
 (0)