diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 43a88d53f3a1..43a72ae20d46 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -78,6 +78,7 @@ original `Service,ServiceInstance,ServiceRelation,ServiceInstanceRelation`. * [**Breaking Change**] TCP-related source names are changed, fields of TCP-related sources are changed, please refer to the latest `oal/tcp.oal` file. * Do not log error logs when failed to create ElasticSearch index because the index is created already. +* Support Python runtime metrics analysis. * Support `sampledTrace` in LAL. * Support multiple rules with different names under the same layer of LAL script. @@ -115,6 +116,7 @@ * Fix configuration panel styles. * Remove a un-use icon. * Support labeled value on the service/instance/endpoint list widgets. +* Add Python runtime metrics and cpu/memory utilization panels to General-Instance and Fass-Instance dashboards #### Documentation diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index 48afe0dea046..751c0380451b 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,go-runtime} # Which files could be meter analyzed, files split by "," + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool,satellite,go-runtime, python-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/python-runtime.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/python-runtime.yaml new file mode 100644 index 000000000000..0e902a62056b --- /dev/null +++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/python-runtime.yaml @@ -0,0 +1,36 @@ +# 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_pvm_process_cpu_utilization + exp: instance_pvm_process_cpu_utilization + - name: instance_pvm_process_mem_utilization + exp: instance_pvm_process_mem_utilization + - name: instance_pvm_total_cpu_utilization + exp: instance_pvm_total_cpu_utilization + - name: instance_pvm_total_mem_utilization + exp: instance_pvm_total_mem_utilization + - name: instance_pvm_gc_g0 + exp: instance_pvm_gc_g0 + - name: instance_pvm_gc_g1 + exp: instance_pvm_gc_g1 + - name: instance_pvm_gc_g2 + exp: instance_pvm_gc_g2 + - name: instance_pvm_gc_time + exp: instance_pvm_gc_time.increase("PT1M") + - name: instance_pvm_thread_active_count + exp: instance_pvm_thread_active_count \ No newline at end of file diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/faas/faas-instance.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/faas/faas-instance.json index 13bafaa705da..9a5ad9c9b806 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/faas/faas-instance.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/faas/faas-instance.json @@ -392,6 +392,141 @@ "moved": false } ] + }, + { + "name": "PVM", + "children": [ + { + "x": 0, + "y": 0, + "w": 8, + "h": 13, + "i": "24", + "type": "Widget", + "widget": { + "title": "Host CPU Utilization / PVM CPU Utilization (%)" + }, + "graph": { + "type":"Area", + "opacity":0.4, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_total_cpu_utilization", + "meter_instance_pvm_process_cpu_utilization" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 8, + "y": 0, + "w": 8, + "h": 13, + "i": "16", + "type": "Widget", + "widget": { + "title": "PVM Thread Count" + }, + "graph": { + "type":"Line", + "step":false, + "smooth":false, + "showSymbol":false, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_thread_active_count" + ], + "metricTypes": [ + "readMetricsValues" + ], + "moved": false + }, + { + "x": 16, + "y": 0, + "w": 8, + "h": 13, + "i": "17", + "type": "Widget", + "widget": { + "title": "PVM GC Count" + }, + "graph": { + "type":"Bar", + "showBackground":true + }, + "metrics": [ + "meter_instance_pvm_gc_g0", + "meter_instance_pvm_gc_g1", + "meter_instance_pvm_gc_g2" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 0, + "y": 13, + "w": 8, + "h": 13, + "i": "18", + "type": "Widget", + "widget": { + "title": "Host Mem Utilization / PVM Mem Utilization (%)" + }, + "graph": { + "type":"Area", + "opacity":0.4, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_total_mem_utilization", + "meter_instance_pvm_process_mem_utilization" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 8, + "y": 13, + "w": 8, + "h": 13, + "i": "19", + "type": "Widget", + "widget": { + "title": "PVM GC Time (ms)" + }, + "graph": { + "type":"Line", + "step":false, + "smooth":false, + "showSymbol":false, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_gc_time" + ], + "metricTypes": [ + "readMetricsValues" + ], + "moved": false + } + ] } ] }, 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 87ba2d627ac0..33c2b1f137dc 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 @@ -1231,6 +1231,141 @@ "moved": false } ] + }, + { + "name": "PVM", + "children": [ + { + "x": 0, + "y": 0, + "w": 8, + "h": 13, + "i": "24", + "type": "Widget", + "widget": { + "title": "Host CPU Utilization / PVM CPU Utilization (%)" + }, + "graph": { + "type":"Area", + "opacity":0.4, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_total_cpu_utilization", + "meter_instance_pvm_process_cpu_utilization" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 8, + "y": 0, + "w": 8, + "h": 13, + "i": "16", + "type": "Widget", + "widget": { + "title": "PVM Thread Count" + }, + "graph": { + "type":"Line", + "step":false, + "smooth":false, + "showSymbol":false, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_thread_active_count" + ], + "metricTypes": [ + "readMetricsValues" + ], + "moved": false + }, + { + "x": 16, + "y": 0, + "w": 8, + "h": 13, + "i": "17", + "type": "Widget", + "widget": { + "title": "PVM GC Count" + }, + "graph": { + "type":"Bar", + "showBackground":true + }, + "metrics": [ + "meter_instance_pvm_gc_g0", + "meter_instance_pvm_gc_g1", + "meter_instance_pvm_gc_g2" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 0, + "y": 13, + "w": 8, + "h": 13, + "i": "18", + "type": "Widget", + "widget": { + "title": "Host Mem Utilization / PVM Mem Utilization (%)" + }, + "graph": { + "type":"Area", + "opacity":0.4, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_total_mem_utilization", + "meter_instance_pvm_process_mem_utilization" + ], + "metricTypes": [ + "readMetricsValues", + "readMetricsValues" + ], + "moved": false + }, + { + "x": 8, + "y": 13, + "w": 8, + "h": 13, + "i": "19", + "type": "Widget", + "widget": { + "title": "PVM GC Time (ms)" + }, + "graph": { + "type":"Line", + "step":false, + "smooth":false, + "showSymbol":false, + "showXAxis":true, + "showYAxis":true + }, + "metrics": [ + "meter_instance_pvm_gc_time" + ], + "metricTypes": [ + "readMetricsValues" + ], + "moved": false + } + ] } ] },