diff --git a/CHANGES.md b/CHANGES.md index da5dc91cf29b..c9597b178a7e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -46,6 +46,7 @@ Release Notes. * Add env variables `SW_CLUSTER_INTERNAL_COM_HOST` and `SW_CLUSTER_INTERNAL_COM_PORT` for cluster selectors `zookeeper`,`consul`,`etcd` and `nacos`. * Doc update: `configuration-vocabulary`,`backend-cluster` about env variables `SW_CLUSTER_INTERNAL_COM_HOST` and `SW_CLUSTER_INTERNAL_COM_PORT`. * Add Python MysqlClient component ID(7013) with mapping information. +* Support Java thread pool metrics analysis. #### UI diff --git a/docs/en/setup/backend/backend-meter.md b/docs/en/setup/backend/backend-meter.md index 119b36059888..e285002a1eb8 100644 --- a/docs/en/setup/backend/backend-meter.md +++ b/docs/en/setup/backend/backend-meter.md @@ -51,7 +51,7 @@ Note: `$name` is the original metric name. ## Configuration file The meter receiver is configured via a configuration file. The configuration file defines everything related to receiving from agents, as well as which rule files to load. - + The OAP can load the configuration at bootstrap. If the new configuration is not well-formed, the OAP may fail to start up. The files are located at `$CLASSPATH/meter-analyzer-config`. @@ -66,12 +66,16 @@ New meter-analyzer-config files is **NOT** enabled by default, you should make m Meter-analyzer-config file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional. -An example can be found [here](../../../../oap-server/server-starter/src/main/resources/meter-analyzer-config/spring-sleuth.yaml). -If you're using Spring Sleuth, see [Spring Sleuth Setup](spring-sleuth-setup.md). +All available meter analysis scripts could be found [here](../../../../oap-server/server-starter/src/main/resources/meter-analyzer-config/). | Rule Name | Description | Configuration File | Data Source | |-----|-----|-----|-----| |spring-sleuth| Metrics of Spring Sleuth Application | meter-analyzer-config/spring-sleuth.yaml | Sprign Sleuth Application --meter format--> SkyWalking OAP Server | +|satellite| Metrics of SkyWalking Satellite self-observability(so11y)| meter-analyzer-config/satellite.yaml| SkyWalking Satellite --meter format-->SkyWalking OAP Server| +|threadpool| Metrics of Thread Pool | meter-analyzer-config/threadpool.yaml | Thread Pool --meter format--> SkyWalking OAP Server | + +An example can be found [here](../../../../oap-server/server-starter/src/main/resources/meter-analyzer-config/spring-sleuth.yaml). +If you're using Spring Sleuth, see [Spring Sleuth Setup](spring-sleuth-setup.md). ### Meters configuration diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index f0855e40166e..aac3acaeaf46 100755 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -272,7 +272,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:} # Which files could be meter analyzed, files split by "," + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:threadpool} # Which files could be meter analyzed, files split by "," log-analyzer: selector: ${SW_LOG_ANALYZER:default} diff --git a/oap-server/server-starter/src/main/resources/meter-analyzer-config/threadpool.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/threadpool.yaml new file mode 100644 index 000000000000..861c48817717 --- /dev/null +++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/threadpool.yaml @@ -0,0 +1,20 @@ +# 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: thread_pool + exp: thread_pool.avg(['metric_type', 'pool_name', 'instance', 'service']) \ No newline at end of file diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml index 98be7f1f214a..1dd50a2bdf41 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apm.yml @@ -448,6 +448,17 @@ templates: "queryMetricType": "readMetricsValues", "chartType": "ChartArea" }, + { + "width": 3, + "title": "Thread Pool(Java Service)", + "height": "250", + "entityType": "ServiceInstance", + "independentSelector": false, + "metricType": "LABELED_VALUE", + "metricName": "meter_thread_pool", + "queryMetricType": "readLabeledMetricsValues", + "chartType": "ChartLine" + }, { "width": 3, "title": "CLR CPU (.NET Service)",