You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2020/07/09 07:12:59 UTC
[shardingsphere] branch master updated: fix metric config and doc
This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 726dbd9 fix metric config and doc
new 630ac43 Merge pull request #6304 from yu199195/fix-metrics-doc
726dbd9 is described below
commit 726dbd9ce38e2ed005e0fedd1b4d0dc8c0ba5e39
Author: yu199195 <54...@qq.com>
AuthorDate: Thu Jul 9 14:49:15 2020 +0800
fix metric config and doc
---
.../content/features/governance/observability/metrics.cn.md | 3 +--
.../content/features/governance/observability/metrics.en.md | 9 ++++-----
.../user-manual/shardingsphere-proxy/configuration/props.cn.md | 1 -
.../user-manual/shardingsphere-proxy/configuration/props.en.md | 1 -
.../src/main/resources/conf/server.yaml | 1 -
.../src/main/resources/conf/server.yaml | 1 -
.../src/main/resources/conf/server.yaml | 1 -
.../infra/config/properties/ConfigurationPropertyKey.java | 5 -----
.../src/main/resources/conf/server.yaml | 1 -
9 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/docs/document/content/features/governance/observability/metrics.cn.md b/docs/document/content/features/governance/observability/metrics.cn.md
index 7400fa0..cb4d99c 100644
--- a/docs/document/content/features/governance/observability/metrics.cn.md
+++ b/docs/document/content/features/governance/observability/metrics.cn.md
@@ -46,8 +46,7 @@ metrics:
name: prometheus # 指定类型为prometheus.
host: 127.0.0.1 # 指定host,如果为空,则获取默认
port: 9190 # 指定prometheus服务端抓取metrics端口
-props:
- proxy.metrics.enabled: ture # 设置为true代表开启,设置为false 代表关闭
+ enable : true # 配置为true代表开启,设置为false代表关闭 ,此字段不配置时候,默认开启.
```
用户自己搭建`Prometheus` 服务,在 prometheus.yml 文件中新增如下配置:
diff --git a/docs/document/content/features/governance/observability/metrics.en.md b/docs/document/content/features/governance/observability/metrics.en.md
index 5bdc362..af798f7 100644
--- a/docs/document/content/features/governance/observability/metrics.en.md
+++ b/docs/document/content/features/governance/observability/metrics.en.md
@@ -47,11 +47,10 @@ Four types of metrics are currently defined.
```yaml
metrics:
- name: prometheus # The specified type is Prometheus..
- host: 127.0.0.1 # Specify host and, if empty, get the default of ShardingSphere-Proxy
- port: 9190 # Specify the Prometheus server fetching metrics port
- props:
- proxy.metrics.enabled: ture # true for on and false for off
+ name: prometheus # The specified type is Prometheus.
+ host: 127.0.0.1 # Specify host and, if empty, get the default of ShardingSphere-Proxy.
+ port: 9190 # Specify the Prometheus server fetching metrics port.
+ enable : true # true for on and false for off ,if not config this, default value is true.
```
Users set up the Prometheus service by themselves, adding the following configuration in the prometheus.yml file:
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.cn.md
index d47bcb7..ebfde66 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.cn.md
@@ -23,5 +23,4 @@ Apache ShardingSphere 提供属性配置的方式配置系统级配置。
| proxy.transaction.type (?) | String | ShardingSphere-Proxy 中使用的默认事务类型。包括:LOCAL、XA 和 BASE。 | LOCAL |
| proxy.opentracing.enabled (?) | boolean | 是否允许在 ShardingSphere-Proxy 中使用 OpenTracing。 | false |
| proxy.hint.enabled (?) | boolean | 是否允许在 ShardingSphere-Proxy 中使用 Hint。使用 Hint 会将 Proxy 的线程处理模型由 IO 多路复用变更为每个请求一个独立的线程,会降低 Proxy 的吞吐量。 | false |
-| proxy.metrics.enabled (?) | boolean | 是否允许在 ShardingSphere-Proxy 中使用 Metrics。 | false |
| proxy.cluster.enabled (?) | boolean | 是否允许在 ShardingSphere-Proxy 中使用心跳检测。 | false |
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
index a93d47c..b6a346d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
@@ -23,5 +23,4 @@ Apache ShardingSphere provides the way of property configuration to configure sy
| proxy.transaction.type (?) | String | Default transaction type of ShardingSphere-Proxy. Include: LOCAL, XA and BASE. | LOCAL |
| proxy.opentracing.enabled (?) | boolean | Whether enable opentracing for ShardingSphere-Proxy. | false |
| proxy.hint.enabled (?) | boolean | Whether enable hint for ShardingSphere-Proxy. Using Hint will switch proxy thread mode from IO multiplexing to per connection per thread, which will reduce system throughput. | false |
-| proxy.metrics.enabled (?) | boolean | Whether enable Metrics for ShardingSphere-Proxy. | false |
| proxy.cluster.enabled (?) | boolean | Whether enable Heartbeat Detection for ShardingSphere-Proxy. | false |
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
index a9c8bbd..e5da260 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf/server.yaml
@@ -57,7 +57,6 @@ props:
# BASE: Proxy will run with B.A.S.E transaction.
proxy.transaction.type: LOCAL
proxy.opentracing.enabled: false
- proxy.metrics.enabled: false
proxy.hint.enabled: false
query.with.cipher.column: true
sql.show: false
diff --git a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
index e9b0d74..f6c4e4d 100644
--- a/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
+++ b/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf/server.yaml
@@ -54,7 +54,6 @@ props:
# BASE: Proxy will run with B.A.S.E transaction.
proxy.transaction.type: LOCAL
proxy.opentracing.enabled: false
- proxy.metrics.enabled: false
proxy.hint.enabled: false
query.with.cipher.column: true
sql.show: false
diff --git a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml
index c856b48..d8270d2 100644
--- a/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml
+++ b/shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml
@@ -66,7 +66,6 @@
# # BASE: Proxy will run with B.A.S.E transaction.
# proxy.transaction.type: LOCAL
# proxy.opentracing.enabled: false
-# proxy.metrics.enabled: false
# proxy.cluster.enabled: false
# proxy.hint.enabled: false
# query.with.cipher.column: true
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/properties/ConfigurationPropertyKey.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/properties/ConfigurationPropertyKey.java
index 3269a62..1679b8c 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/properties/ConfigurationPropertyKey.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/properties/ConfigurationPropertyKey.java
@@ -94,11 +94,6 @@ public enum ConfigurationPropertyKey implements TypedPropertyKey {
PROXY_OPENTRACING_ENABLED("proxy.opentracing.enabled", String.valueOf(Boolean.FALSE), boolean.class),
/**
- * Enable metrics for ShardingSphere-Proxy.
- */
- PROXY_METRICS_ENABLED("proxy.metrics.enabled", String.valueOf(Boolean.FALSE), boolean.class),
-
- /**
* Whether enable hint for ShardingSphere-Proxy.
*/
PROXY_HINT_ENABLED("proxy.hint.enabled", String.valueOf(Boolean.FALSE), boolean.class),
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/server.yaml b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/server.yaml
index 865e682..cc8a1d7 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/server.yaml
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/server.yaml
@@ -66,7 +66,6 @@
# # BASE: Proxy will run with B.A.S.E transaction.
# proxy.transaction.type: LOCAL
# proxy.opentracing.enabled: false
-# proxy.metrics.enabled: false
# proxy.cluster.enabled: false
# proxy.hint.enabled: false
# query.with.cipher.column: true