You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/03/31 10:40:21 UTC
[skywalking] branch master updated: Add the Self Observability template of SkyWalking Satellite (#8776)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 72e4b12 Add the Self Observability template of SkyWalking Satellite (#8776)
72e4b12 is described below
commit 72e4b12dc3f05d697e9edfcce3f18483ef16c7c7
Author: mrproliu <74...@qq.com>
AuthorDate: Thu Mar 31 18:39:59 2022 +0800
Add the Self Observability template of SkyWalking Satellite (#8776)
---
CHANGES.md | 1 +
.../ui/template/UITemplateInitializer.java | 1 +
.../resources/meter-analyzer-config/satellite.yaml | 2 +-
.../so11y_satellite/so11y-root.json | 255 +++++++++++++++++++++
.../cases/so11y/expected/satellite-service.yml | 6 +-
test/e2e-v2/cases/so11y/satellite-cases.yaml | 4 +-
6 files changed, 263 insertions(+), 6 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 409cdf3..dfd1fb1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -162,6 +162,7 @@ NOTICE, this sharding concept is NOT just for splitting data into different data
* Add Database Connection pool metric.
* Re-implement UI template initialization for Booster UI.
* Add environment variable `SW_ENABLE_UPDATE_UI_TEMPLATE` to control user edit UI template.
+* Add the Self Observability template of the SkyWalking Satellite.
#### Documentation
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/management/ui/template/UITemplateInitializer.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/management/ui/template/UITemplateInitializer.java
index 7765968..6101308 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/management/ui/template/UITemplateInitializer.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/management/ui/template/UITemplateInitializer.java
@@ -51,6 +51,7 @@ public class UITemplateInitializer {
Layer.SO11Y_OAP.name(),
Layer.VIRTUAL_DATABASE.name(),
Layer.K8S_SERVICE.name(),
+ Layer.SO11Y_SATELLITE.name(),
"custom"
};
private final UITemplateManagementService uiTemplateManagementService;
diff --git a/oap-server/server-starter/src/main/resources/meter-analyzer-config/satellite.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/satellite.yaml
index f706d2b..15f84ad 100644
--- a/oap-server/server-starter/src/main/resources/meter-analyzer-config/satellite.yaml
+++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/satellite.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-expSuffix: tag({tags -> tags.service = 'satellite::' + tags.service}).service(['service'], Layer.SO11Y_SATELLITE)
+expSuffix: service(['service'], Layer.SO11Y_SATELLITE)
metricPrefix: satellite
metricsRules:
- name: service_receive_event_count
diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_satellite/so11y-root.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_satellite/so11y-root.json
new file mode 100644
index 0000000..d08c203
--- /dev/null
+++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_satellite/so11y-root.json
@@ -0,0 +1,255 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+[
+ {
+ "id":"Self-Observability-Satellite-Root",
+ "configuration":{
+ "children":[
+ {
+ "x":8,
+ "y":2,
+ "w":8,
+ "h":14,
+ "i":"1",
+ "type":"Widget",
+ "widget":{
+ "title":"Connection Count"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_grpc_connect_count"
+ ],
+ "metricTypes":[
+ "readMetricsValues"
+ ],
+ "moved":false
+ },
+ {
+ "x":0,
+ "y":2,
+ "w":8,
+ "h":14,
+ "i":"0",
+ "type":"Widget",
+ "widget":{
+ "title":"CPU (%)"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_server_cpu_utilization"
+ ],
+ "metricTypes":[
+ "readMetricsValues"
+ ],
+ "moved":false
+ },
+ {
+ "x":16,
+ "y":2,
+ "w":8,
+ "h":14,
+ "i":"2",
+ "type":"Widget",
+ "widget":{
+ "title":"Queue Used Count",
+ "tips":"The used count of queue of pipeline"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_queue_used_count"
+ ],
+ "metricTypes":[
+ "readLabeledMetricsValues"
+ ],
+ "metricConfig":[
+
+ ],
+ "moved":false
+ },
+ {
+ "x":0,
+ "y":16,
+ "w":12,
+ "h":14,
+ "i":"3",
+ "type":"Widget",
+ "widget":{
+ "title":"Receive Event Count",
+ "tips":"Receive count of event from downstream"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_receive_event_count"
+ ],
+ "metricTypes":[
+ "readLabeledMetricsValues"
+ ],
+ "metricConfig":[
+
+ ],
+ "moved":false
+ },
+ {
+ "x":12,
+ "y":16,
+ "w":12,
+ "h":14,
+ "i":"4",
+ "type":"Widget",
+ "widget":{
+ "title":"Fetch Event Count",
+ "tips":"Fetch count of event from downstream"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_fetch_event_count"
+ ],
+ "metricTypes":[
+ "readLabeledMetricsValues"
+ ],
+ "metricConfig":[
+
+ ],
+ "moved":false
+ },
+ {
+ "x":0,
+ "y":30,
+ "w":12,
+ "h":15,
+ "i":"5",
+ "type":"Widget",
+ "widget":{
+ "title":"Queue Input Count",
+ "tips":"The event count of push to the queue"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_queue_input_count"
+ ],
+ "metricTypes":[
+ "readLabeledMetricsValues"
+ ],
+ "metricConfig":[
+
+ ],
+ "moved":false
+ },
+ {
+ "x":12,
+ "y":30,
+ "w":12,
+ "h":15,
+ "i":"6",
+ "type":"Widget",
+ "widget":{
+ "title":"Queue Output Count",
+ "tips":"The event count of push data to the upstream"
+ },
+ "graph":{
+ "type":"Line",
+ "step":false,
+ "smooth":false,
+ "showSymbol":false,
+ "showXAxis":true,
+ "showYAxis":true
+ },
+ "metrics":[
+ "satellite_service_send_event_count"
+ ],
+ "metricTypes":[
+ "readLabeledMetricsValues"
+ ],
+ "metricConfig":[
+
+ ],
+ "moved":false
+ },
+ {
+ "x":0,
+ "y":0,
+ "w":24,
+ "h":2,
+ "i":"8",
+ "type":"Text",
+ "metricTypes":[
+ ""
+ ],
+ "metrics":[
+ ""
+ ],
+ "graph":{
+ "fontColor":"black",
+ "backgroundColor":"white",
+ "content":"Satellite: an open-source agent designed for the cloud-native infrastructures, which provides a low-cost, high-efficient, and more secure way to collect telemetry data. It is the recommended load balancer for telemetry collecting.",
+ "fontSize":14,
+ "textAlign":"left",
+ "url":"https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-load-balancer/"
+ },
+ "moved":false
+ }
+ ],
+ "layer":"SO11Y_SATELLITE",
+ "entity":"Service",
+ "name":"Self-Observability-Satellite-Root",
+ "isRoot":true
+ }
+ }
+]
\ No newline at end of file
diff --git a/test/e2e-v2/cases/so11y/expected/satellite-service.yml b/test/e2e-v2/cases/so11y/expected/satellite-service.yml
index 85e35b3..4865949 100644
--- a/test/e2e-v2/cases/so11y/expected/satellite-service.yml
+++ b/test/e2e-v2/cases/so11y/expected/satellite-service.yml
@@ -14,9 +14,9 @@
# limitations under the License.
{{- contains . }}
-- id: {{ b64enc "satellite::satellite-service" }}.1
- name: satellite::satellite-service
- group: satellite
+- id: {{ b64enc "satellite-service" }}.1
+ name: satellite-service
+ group: ""
shortname: satellite-service
normal: true
layers:
diff --git a/test/e2e-v2/cases/so11y/satellite-cases.yaml b/test/e2e-v2/cases/so11y/satellite-cases.yaml
index 25562bd..bbf403e 100644
--- a/test/e2e-v2/cases/so11y/satellite-cases.yaml
+++ b/test/e2e-v2/cases/so11y/satellite-cases.yaml
@@ -18,7 +18,7 @@
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service layer SO11Y_SATELLITE
expected: expected/satellite-service.yml
# service metrics
- - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=satellite_service_server_cpu_utilization --service-name=satellite::satellite-service |yq e 'to_entries' -
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=satellite_service_server_cpu_utilization --service-name=satellite-service |yq e 'to_entries' -
expected: expected/metrics-has-value.yml
- - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=satellite_service_grpc_connect_count --service-name=satellite::satellite-service |yq e 'to_entries' -
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=satellite_service_grpc_connect_count --service-name=satellite-service |yq e 'to_entries' -
expected: expected/metrics-has-value.yml