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/02/11 08:27:31 UTC
[skywalking] branch master updated: [Feature] Support datasource metrics analysis (#8474)
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 3bc9337 [Feature] Support datasource metrics analysis (#8474)
3bc9337 is described below
commit 3bc933733fd2815b5317a81a32be04766debd51a
Author: xiaojianjun <28...@qq.com>
AuthorDate: Fri Feb 11 16:27:11 2022 +0800
[Feature] Support datasource metrics analysis (#8474)
* [Feature] Support collecting database connection pool metric,support MAL analyzer #8450
---
CHANGES.md | 3 +++
docs/en/setup/backend/backend-meter.md | 3 ++-
.../src/main/resources/application.yml | 2 +-
.../resources/meter-analyzer-config/datasource.yaml | 20 ++++++++++++++++++++
.../main/resources/ui-initialized-templates/apm.yml | 11 +++++++++++
5 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 595bd51..4d952d3 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -55,15 +55,18 @@ Release Notes.
* Add Guava EventBus component ID(123) of Java agent.
* Add OpenFunction component ID(5013).
* Expose configuration `responseTimeout` of ES client.
+* Support datasource metric analysis.
#### UI
* Remove unused jars (log4j-api.jar) in classpath.
* Bump up netty version to fix CVE.
+* add Database Connection pool metric.
#### Documentation
* update backend-alarm.md doc, support op "=" to "==".
+* update backend-meter.md doc .
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/112?closed=1)
diff --git a/docs/en/setup/backend/backend-meter.md b/docs/en/setup/backend/backend-meter.md
index e285002..032e41b 100644
--- a/docs/en/setup/backend/backend-meter.md
+++ b/docs/en/setup/backend/backend-meter.md
@@ -70,9 +70,10 @@ All available meter analysis scripts could be found [here](../../../../oap-serve
| 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 |
+|datasource| Metrics of DataSource metrics | meter-analyzer-config/datasource.yaml | Datasource --meter format--> SkyWalking OAP Server |
+|spring-sleuth| Metrics of Spring Sleuth Application | meter-analyzer-config/spring-sleuth.yaml | Sprign Sleuth Application --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).
diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml
index ff3a62f..51d324b 100755
--- a/oap-server/server-starter/src/main/resources/application.yml
+++ b/oap-server/server-starter/src/main/resources/application.yml
@@ -273,7 +273,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:threadpool} # Which files could be meter analyzed, files split by ","
+ meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,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/datasource.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/datasource.yaml
new file mode 100644
index 0000000..411279a
--- /dev/null
+++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/datasource.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: datasource
+ exp: datasource.sum(['service', 'instance', 'name', 'status'])
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 1dd50a2..6c08220 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
@@ -506,6 +506,17 @@ templates:
"queryMetricType": "readMetricsValues",
"chartType": "ChartLine",
"metricName": "instance_clr_available_completion_port_threads,instance_clr_available_worker_threads,instance_clr_max_completion_port_threads,instance_clr_max_worker_threads"
+ },
+ {
+ "width": "3",
+ "title": "Database Connection Pool",
+ "height": "250",
+ "entityType": "ServiceInstance",
+ "independentSelector": false,
+ "metricType": "LABELED_VALUE",
+ "metricName": "meter_datasource",
+ "queryMetricType": "readLabeledMetricsValues",
+ "chartType": "ChartLine"
}
]
},