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/10/10 00:00:01 UTC
[skywalking] branch master updated: (Summer 2022)Feat add golang runtime metrics (#9711)
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 001a2ec454 (Summer 2022)Feat add golang runtime metrics (#9711)
001a2ec454 is described below
commit 001a2ec45424716dc8ff0c94a82d8865e0a1e11a
Author: Eason Yi <yi...@qq.com>
AuthorDate: Mon Oct 10 07:59:44 2022 +0800
(Summer 2022)Feat add golang runtime metrics (#9711)
---
docs/en/changes/changes.md | 2 +
.../src/main/resources/application.yml | 2 +-
.../meter-analyzer-config/go-runtime.yaml | 34 ++++
.../general/general-instance.json | 220 +++++++++++++++++++++
4 files changed, 257 insertions(+), 1 deletion(-)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 164c708a22..181c3d7f83 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -42,6 +42,7 @@
(explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
(explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
```
+* Support Golang runtime metrics analysis.
* Add APISIX metrics monitoring
* Support skywalking-client-js report empty `service version` and `page path` , set default version as `latest` and
default page path as `/`(root). Fix the
@@ -71,6 +72,7 @@
* Remove All from the endpoints selector.
* Enhance menu configurations to make it easier to change.
* Update PostgreSQL dashboard to visualize collected slow SQLs.
+* Add Golang runtime metrics and cpu/memory used rate panels in General-Instance dashboard
* Add gateway apisix menu
* Query logs with the specific service ID
* Bump d3-color from 3.0.1 to 3.1.0
diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml
index d05739d1c4..9c4512cd0e 100644
--- a/oap-server/server-starter/src/main/resources/application.yml
+++ b/oap-server/server-starter/src/main/resources/application.yml
@@ -248,7 +248,7 @@ agent-analyzer:
# Nginx and Envoy agents can't get the real remote address.
# Exit spans with the component in the list would not generate the client-side instance relation metrics.
noUpstreamRealAddressAgents: ${SW_NO_UPSTREAM_REAL_ADDRESS:6000,9000}
- meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool,satellite} # Which files could be meter analyzed, files split by ","
+ meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool,satellite,go-runtime} # Which files could be meter analyzed, files split by ","
slowCacheReadThreshold: ${SW_SLOW_CACHE_SLOW_READ_THRESHOLD:default:20,redis:10} # The slow cache write operation thresholds. Unit ms.
slowCacheWriteThreshold: ${SW_SLOW_CACHE_SLOW_WRITE_THRESHOLD:default:20,redis:10} # The slow cache write operation thresholds. Unit ms.
diff --git a/oap-server/server-starter/src/main/resources/meter-analyzer-config/go-runtime.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/go-runtime.yaml
new file mode 100644
index 0000000000..b2b723225f
--- /dev/null
+++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/go-runtime.yaml
@@ -0,0 +1,34 @@
+# 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.
+
+expSuffix: instance(['service'], ['instance'], Layer.GENERAL)
+metricPrefix: meter
+metricsRules:
+ - name: instance_golang_heap_alloc
+ exp: instance_golang_heap_alloc
+ - name: instance_golang_stack_used
+ exp: instance_golang_stack_used
+ - name: instance_golang_gc_pause_time
+ exp: instance_golang_gc_pause_time.increase('PT1M')
+ - name: instance_golang_gc_count
+ exp: instance_golang_gc_count.increase('PT1M')
+ - name: instance_golang_os_threads_num
+ exp: instance_golang_os_threads_num
+ - name: instance_golang_live_goroutines_num
+ exp: instance_golang_live_goroutines_num
+ - name: instance_host_cpu_used_rate
+ exp: instance_host_cpu_used_rate
+ - name: instance_host_mem_used_rate
+ exp: instance_host_mem_used_rate
\ No newline at end of file
diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json
index d29f4aaaa9..71f11f6612 100644
--- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json
+++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json
@@ -1012,6 +1012,226 @@
}
}
]
+ },
+ {
+ "name": "Golang",
+ "children": [
+ {
+ "x": 0,
+ "y": 0,
+ "w": 8,
+ "h": 13,
+ "i": "24",
+ "type": "Widget",
+ "widget": {
+ "title": "Heap Alloc (MB)"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_golang_heap_alloc"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "metricConfig": [
+ {
+ "calculation": "byteToMB"
+ }
+ ],
+ "moved": false
+ },
+ {
+ "x": 8,
+ "y": 0,
+ "w": 8,
+ "h": 13,
+ "i": "16",
+ "type": "Widget",
+ "widget": {
+ "title": "Stack Used (MB)"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_golang_stack_used"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "metricConfig": [
+ {
+ "calculation": "byteToMB"
+ }
+ ],
+ "moved": false
+ },
+ {
+ "x": 16,
+ "y": 0,
+ "w": 8,
+ "h": 13,
+ "i": "17",
+ "type": "Widget",
+ "widget": {
+ "title": "Golang GC Pause Time Per Minute (ms)"
+ },
+ "graph": {
+ "type": "Bar",
+ "showBackground": true
+ },
+ "metrics": [
+ "meter_instance_golang_gc_pause_time"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "metricConfig": [
+ {
+ "calculation": "nanosecondToMillisecond"
+ }
+ ],
+ "moved": false
+ },
+ {
+ "x": 0,
+ "y": 13,
+ "w": 8,
+ "h": 13,
+ "i": "18",
+ "type": "Widget",
+ "widget": {
+ "title": "Golang GC Count Per Minute"
+ },
+ "graph": {
+ "type": "Bar",
+ "showBackground": true
+ },
+ "metrics": [
+ "meter_instance_golang_gc_count"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "moved": false
+ },
+ {
+ "x": 8,
+ "y": 13,
+ "w": 8,
+ "h": 13,
+ "i": "19",
+ "type": "Widget",
+ "widget": {
+ "title": "Live Goroutines Num"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_golang_live_goroutines_num"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "moved": false
+ },
+ {
+ "x": 16,
+ "y": 13,
+ "w": 8,
+ "h": 13,
+ "i": "20",
+ "type": "Widget",
+ "widget": {
+ "title": "Golang OS Threads Num"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_golang_os_threads_num"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "moved": false
+ },
+ {
+ "x": 0,
+ "y": 26,
+ "w": 8,
+ "h": 13,
+ "i": "21",
+ "type": "Widget",
+ "widget": {
+ "title": "Host CPU Used Rate (%)"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_host_cpu_used_rate"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "moved": false
+ },
+ {
+ "x": 8,
+ "y": 26,
+ "w": 8,
+ "h": 13,
+ "i": "22",
+ "type": "Widget",
+ "widget": {
+ "title": "Host Memory Used Rate (%)"
+ },
+ "graph": {
+ "type": "Line",
+ "step": false,
+ "smooth": false,
+ "showSymbol": false,
+ "showXAxis": true,
+ "showYAxis": true
+ },
+ "metrics": [
+ "meter_instance_host_mem_used_rate"
+ ],
+ "metricTypes": [
+ "readMetricsValues"
+ ],
+ "moved": false
+ }
+ ]
}
]
},