diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 164c708a2227a220e5c10731b5224ae510d1f8f6..181c3d7f8317f9554a303554ff4a5e1823ed7c12 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 d05739d1c43a5a09d3e493b500679be1c2fda21d..9c4512cd0e095fe3401bf5e76686b2ff6aa1ec81 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 0000000000000000000000000000000000000000..b2b723225f1f0f8d7601c5de1c3f615487c6e9bc --- /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 d29f4aaaa94c2fe8f1085003c668106ad97a3d5e..71f11f661266abdb31fc9776900b94e13720d441 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 + } + ] } ] },