This is an automated email from the ASF dual-hosted git repository.
linghengqian 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 928df56b34b Modifie docs to bring sharding-sphere-agent to same level
as sharding-sphere-jdbc (#37751)
928df56b34b is described below
commit 928df56b34b5483dfb4aaf8f9466631757983439
Author: Manas Agarwal <[email protected]>
AuthorDate: Fri Jan 16 18:05:27 2026 +0530
Modifie docs to bring sharding-sphere-agent to same level as
sharding-sphere-jdbc (#37751)
modified docs to bring sharding-sphere-agent to same level as
sharding-sphere-jdbc
added line at end and corrected heading level
added line at end
removed unnecessary heading and checked type issue
---
.../user-manual/shardingsphere-agent/_index.cn.md | 47 +++++
.../user-manual/shardingsphere-agent/_index.en.md | 49 +++++
.../configuration/_index.cn.md | 29 +++
.../configuration/_index.en.md | 30 +++
.../shardingsphere-agent/metrics/_index.cn.md | 19 ++
.../shardingsphere-agent/metrics/_index.en.md | 19 ++
.../shardingsphere-agent/plugins/_index.cn.md | 37 ++++
.../shardingsphere-agent/plugins/_index.en.md | 37 ++++
.../shardingsphere-agent/usage/_index.cn.md | 15 ++
.../shardingsphere-agent/usage/_index.en.md | 15 ++
.../shardingsphere-agent/usage/docker/_index.cn.md | 95 +++++++++
.../shardingsphere-agent/usage/docker/_index.en.md | 95 +++++++++
.../shardingsphere-jdbc/observability/_index.cn.md | 217 --------------------
.../shardingsphere-jdbc/observability/_index.en.md | 219 ---------------------
14 files changed, 487 insertions(+), 436 deletions(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/_index.cn.md
new file mode 100644
index 00000000000..2edbd3c06b9
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-agent/_index.cn.md
@@ -0,0 +1,47 @@
++++
+pre = "<b>4.6. </b>"
+title = "ShardingSphere-Agent"
+weight = 6
+chapter = true
++++
+
+
+
+该代理程序有助于收集可观测性指标,提供日志记录支持,并与流行的跟踪和监控解决方案集成,例如 JVM 指标、Prometheus 和
OpenTelemetry。
+
+## 源码编译
+
+从 Github 下载 Apache ShardingSphere 源码,对源码进行编译,操作命令如下。
+
+```shell
+git clone --depth 1 https://github.com/apache/shardingsphere.git
+cd shardingsphere
+mvn clean install -DskipITs -DskipTests -P-dev,release,all
+```
+Agent 制品
`distribution/agent/target/apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz`
+
+## 目录说明
+
+创建 agent 目录,解压 agent 二进制包到 agent 目录。
+
+```shell
+mkdir agent
+tar -zxvf
apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz
-C agent
+cd agent
+tree
+├── LICENSE
+├── NOTICE
+├── conf
+│ └── agent.yaml
+├── plugins
+│ ├── lib
+│ │ ├── shardingsphere-agent-metrics-core-${latest.release.version}.jar
+│ │ └── shardingsphere-agent-plugin-core-${latest.release.version}.jar
+│ ├── logging
+│ │ └── shardingsphere-agent-logging-file-${latest.release.version}.jar
+│ ├── metrics
+│ │ └──
shardingsphere-agent-metrics-prometheus-${latest.release.version}.jar
+│ └── tracing
+│ ├──
shardingsphere-agent-tracing-opentelemetry-${latest.release.version}.jar
+└── shardingsphere-agent-${latest.release.version}.jar
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/_index.en.md
new file mode 100644
index 00000000000..d70fae349cd
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-agent/_index.en.md
@@ -0,0 +1,49 @@
++++
+pre = "<b>4.6. </b>"
+title = "ShardingSphere-Agent"
+weight = 6
+chapter = true
++++
+
+
+
+The agent helps collect observability metrics, provides support for logging,
and integrates with popular tracing and monitoring solutions like JVM metrics,
Prometheus, and OpenTelemetry.
+
+
+## Compile source code
+
+Download Apache ShardingSphere from GitHub, then compile.
+
+```shell
+git clone --depth 1 https://github.com/apache/shardingsphere.git
+cd shardingsphere
+mvn clean install -DskipITs -DskipTests -P-dev,release,all
+```
+
+Agent artifact is
`distribution/agent/target/apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz`
+
+## Directory structure
+
+Create agent directory, and unzip agent distribution package to the directory.
+
+```shell
+mkdir agent
+tar -zxvf
apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz
-C agent
+cd agent
+tree
+├── LICENSE
+├── NOTICE
+├── conf
+│ └── agent.yaml
+├── plugins
+│ ├── lib
+│ │ ├── shardingsphere-agent-metrics-core-${latest.release.version}.jar
+│ │ └── shardingsphere-agent-plugin-core-${latest.release.version}.jar
+│ ├── logging
+│ │ └── shardingsphere-agent-logging-file-${latest.release.version}.jar
+│ ├── metrics
+│ │ └──
shardingsphere-agent-metrics-prometheus-${latest.release.version}.jar
+│ └── tracing
+│ ├──
shardingsphere-agent-tracing-opentelemetry-${latest.release.version}.jar
+└── shardingsphere-agent-${latest.release.version}.jar
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.cn.md
new file mode 100644
index 00000000000..ec3ffcf688e
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.cn.md
@@ -0,0 +1,29 @@
++++
+title = "配置说明"
+weight = 2
++++
+
+
+
+`conf/agent.yaml` 用于管理 agent 配置。内置插件包括 File、Prometheus、OpenTelemetry。
+
+```yaml
+plugins:
+# logging:
+# File:
+# props:
+# level: "INFO"
+# metrics:
+# Prometheus:
+# host: "localhost"
+# port: 9090
+# props:
+# jvm-information-collector-enabled: "true"
+# tracing:
+# OpenTelemetry:
+# props:
+# otel.service.name: "shardingsphere"
+# otel.traces.exporter: "jaeger"
+# otel.exporter.otlp.traces.endpoint: "http://localhost:14250"
+# otel.traces.sampler: "always_on"
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.en.md
new file mode 100644
index 00000000000..f2003a8f0b7
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/configuration/_index.en.md
@@ -0,0 +1,30 @@
++++
+title = "Configuration"
+weight = 2
++++
+
+
+
+`conf/agent.yaml` is used to manage agent configuration.
+Built-in plugins include File, Prometheus, OpenTelemetry.
+
+```yaml
+plugins:
+# logging:
+# File:
+# props:
+# level: "INFO"
+# metrics:
+# Prometheus:
+# host: "localhost"
+# port: 9090
+# props:
+# jvm-information-collector-enabled: "true"
+# tracing:
+# OpenTelemetry:
+# props:
+# otel.service.name: "shardingsphere"
+# otel.traces.exporter: "jaeger"
+# otel.exporter.otlp.traces.endpoint: "http://localhost:14250"
+# otel.traces.sampler: "always_on"
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.cn.md
new file mode 100644
index 00000000000..23e287a7d10
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.cn.md
@@ -0,0 +1,19 @@
++++
+title = "Metrics"
+weight = 3
++++
+
+
+
+| 指标名称 | 指标类型 | 指标描述
|
+|:----------------------------------------|:----------|:----------------------------------------------------------------------------------------------|
+| build_info | GAUGE | 构建信息
|
+| parsed_sql_total | COUNTER |
按类型(INSERT、UPDATE、DELETE、SELECT、DDL、DCL、DAL、TCL、RQL、RDL、RAL、RUL)分类的解析总数 |
+| routed_sql_total | COUNTER |
按类型(INSERT、UPDATE、DELETE、SELECT)分类的路由总数
|
+| routed_result_total | COUNTER | 路由结果总数(数据源路由结果、表路由结果)
|
+| jdbc_state | GAUGE | ShardingSphere-JDBC
状态信息。0 表示正常状态;1 表示熔断状态;2 锁定状态 |
+| jdbc_meta_data_info | GAUGE | ShardingSphere-JDBC
元数据信息 |
+| jdbc_statement_execute_total | COUNTER | 语句执行总数
|
+| jdbc_statement_execute_errors_total | COUNTER | 语句执行错误总数
|
+| jdbc_statement_execute_latency_millis | HISTOGRAM | 语句执行耗时
|
+| jdbc_transactions_total | COUNTER | 事务总数,按 commit,rollback
分类 |
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.en.md
new file mode 100644
index 00000000000..884b31c0242
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/metrics/_index.en.md
@@ -0,0 +1,19 @@
++++
+title = "Metrics"
+weight = 3
++++
+
+
+
+| Name | Type | Description
|
+|:--------------------------------------|:----------|:-------------------------------------------------------------------------------------------------------|
+| build_info | GAUGE | Build information
|
+| parsed_sql_total | COUNTER | Total count of parsed by
type (INSERT, UPDATE, DELETE, SELECT, DDL, DCL, DAL, TCL, RQL, RDL, RAL, RUL) |
+| routed_sql_total | COUNTER | Total count of routed by
type (INSERT, UPDATE, DELETE, SELECT) |
+| routed_result_total | COUNTER | Total count of routed
result (data source routed, table routed)
|
+| jdbc_state | GAUGE | Status information of
ShardingSphere-JDBC. 0 is OK; 1 is CIRCUIT BREAK; 2 is LOCK
|
+| jdbc_meta_data_info | GAUGE | Meta data information of
ShardingSphere-JDBC |
+| jdbc_statement_execute_total | GAUGE | Total number of
statements executed
|
+| jdbc_statement_execute_errors_total | GAUGE | Total number of
statement execution errors
|
+| jdbc_statement_execute_latency_millis | HISTOGRAM | Statement execution
latency
|
+| jdbc_transactions_total | GAUGE | Total number of
transactions, classify by commit and rollback
|
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.cn.md
new file mode 100644
index 00000000000..a946b7aa330
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.cn.md
@@ -0,0 +1,37 @@
++++
+title = "插件"
+weight = 4
++++
+
+
+
+## File
+
+目前 File 插件只有构建元数据耗时日志输出,暂无其他日志输出。
+
+## Prometheus
+
+用于暴露监控指标
+
+* 参数说明
+
+| 名称 | 说明 |
+|-----------------------------------|---------------------|
+| host | 主机 |
+| port | 端口 |
+| jvm-information-collector-enabled | 是否采集 JVM 指标信息 |
+
+## OpenTelemetry
+
+OpenTelemetry 可以导出 tracing 数据到 Jaeger,Zipkin。
+
+* 参数说明
+
+| 名称 | 说明 |
+|-------------------------------------|----------------------|
+| otel.service.name | 服务名称 |
+| otel.traces.exporter | traces exporter |
+| otel.exporter.otlp.traces.endpoint | traces endpoint |
+| otel.traces.sampler | traces sampler |
+
+参数参考 [OpenTelemetry SDK
Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure)
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.en.md
new file mode 100644
index 00000000000..1a4c8099cbb
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/plugins/_index.en.md
@@ -0,0 +1,37 @@
++++
+title = "Plugins"
+weight = 4
++++
+
+
+
+## File
+
+Currently, the File plugin only outputs the time-consuming log output of
building metadata, and has no other log output for the time being.
+
+## Prometheus
+
+Used for exposure monitoring metrics.
+
+* Parameter description
+
+| Name | Description
|
+|-----------------------------------|----------------------------------------------|
+| host | host IP
|
+| port | port
|
+| jvm-information-collector-enabled | whether to collect JVM indicator
information |
+
+## OpenTelemetry
+
+OpenTelemetry can export tracing data to Jaeger, Zipkin.
+
+* Parameter description
+
+| Name | Description |
+|------------------------------------|-----------------|
+| otel.service.name | service name |
+| otel.traces.exporter | traces exporter |
+| otel.exporter.otlp.traces.endpoint | traces endpoint |
+| otel.traces.sampler | traces sampler |
+
+Parameter reference [OpenTelemetry SDK
Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure)
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/usage/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/usage/_index.cn.md
new file mode 100644
index 00000000000..28d2d1e6f50
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-agent/usage/_index.cn.md
@@ -0,0 +1,15 @@
++++
+title = "使用方式"
+weight = 1
+chapter = true
++++
+
+
+
++ 1 准备好已集成 `ShardingSphere-JDBC` 的 `SpringBoot` 项目,test-project.jar
++ 2 启动项目
+```shell
+java -javaagent:/agent/shardingsphere-agent-${latest.release.version}.jar -jar
test-project.jar
+```
++ 3 访问启动的服务
++ 4 查看对应的插件是否生效
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/usage/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/usage/_index.en.md
new file mode 100644
index 00000000000..ec05f7c3c69
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-agent/usage/_index.en.md
@@ -0,0 +1,15 @@
++++
+title = "Usage"
+weight = 1
+chapter = true
++++
+
+
+
++ 1 The `SpringBoot` project ready to integrate `ShardingSphere-JDBC`,
test-project.jar
++ 2 Startup project
+```shell
+java -javaagent:/agent/shardingsphere-agent-${latest.release.version}.jar -jar
test-project.jar
+```
++ 3 Access to started service
++ 4 Check whether the corresponding plug-in is effective
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.cn.md
new file mode 100644
index 00000000000..1778d084ed3
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.cn.md
@@ -0,0 +1,95 @@
++++
+title = "Docker"
+weight = 5
++++
+
+
+
+## 本地构建
+
+ShardingSphere Agent 存在可用的 `Dockerfile` 用于方便分发。可执行如下命令以构建 Docker Image,
+
+```shell
+git clone [email protected]:apache/shardingsphere.git
+cd ./shardingsphere/
+./mvnw -am -pl distribution/agent -P-dev,release,all,docker -T1C -DskipTests
clean package
+```
+
+此后若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
+```
+
+## 社区构建
+
+自 ShardingSphere 5.5.2 开始,ShardingSphere Agent 在
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
发布社区构建。
+此 Docker Image 不属于 ASF 分发产物之一,只是为了方便而提供。
+
+若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:5.5.2 /usr/agent/
/shardingsphere-agent/
+```
+
+## 夜间构建
+
+ShardingSphere Agent 在
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
存在夜间构建的 Docker Image。
+
+若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
+```
+
+## 通过 Dockerfile 使用
+
+引入一个典型场景,
+
+1. 假设通过如下的 Bash 命令部署了 Jaeger All in One 的 Docker Container,
+
+```shell
+docker network create example-net
+docker run --rm -d \
+ --name jaeger \
+ -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
+ --network example-net \
+ jaegertracing/all-in-one:1.62.0
+```
+
+2. 假设 `./custom-agent.yaml` 包含 ShardingSphere Agent 的配置,内容可能如下,
+
+```yaml
+plugins:
+ tracing:
+ OpenTelemetry:
+ props:
+ otel.service.name: "example"
+ otel.exporter.otlp.traces.endpoint: "http://jaeger:4318"
+```
+
+3. 假设`./target/example.jar` 是一个即将使用 ShardingSphere Agent 的 Spring Boot 的 Uber
JAR,
+ 可通过类似如下的 `Dockerfile` 来为类似 `example.jar` 的 JAR 使用夜间构建的 Docker Image 中的
ShardingSphere Agent。
+
+```dockerfile
+FROM ghcr.io/apache/shardingsphere-agent:latest
+COPY ./target/example.jar /app.jar
+COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
+ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
+```
+
+如果是通过本地构建 `ghcr.io/apache/shardingsphere-agent:latest` 的 Docker
Image,`Dockerfile` 可能如下,
+
+```dockerfile
+FROM ghcr.io/apache/shardingsphere-agent:latest
+COPY ./target/example.jar /app.jar
+COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
+ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
+```
+
+4. 享受它,
+
+```shell
+docker build -t example/gs-spring-boot-docker:latest .
+docker run --network example-net example/gs-spring-boot-docker:latest
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.en.md
b/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.en.md
new file mode 100644
index 00000000000..7771f9b307a
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-agent/usage/docker/_index.en.md
@@ -0,0 +1,95 @@
++++
+title = "Docker"
+weight = 5
++++
+
+
+
+## Local Build
+
+ShardingSphere Agent has a `Dockerfile` available for easy distribution. You
can execute the following command to build a Docker Image,
+
+```shell
+git clone [email protected]:apache/shardingsphere.git
+cd ./shardingsphere/
+./mvnw -am -pl distribution/agent -P-dev,release,all,docker -T1C -DskipTests
clean package
+```
+
+If you add the following statement in your custom `Dockerfile`, it will copy
the ShardingSphere Agent directory to `/shardingsphere-agent/`.
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
+```
+
+## Community Build
+
+Since ShardingSphere 5.5.2, ShardingSphere Agent has released community builds
at https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
.
+This Docker Image is not part of the ASF distribution, but is provided for
convenience.
+
+If you add the following statement in a custom `Dockerfile`, it will copy the
ShardingSphere Agent directory to `/shardingsphere-agent/`.
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:5.5.2 /usr/agent/
/shardingsphere-agent/
+```
+
+## Nightly Build
+
+ShardingSphere Agent has a nightly built Docker Image at
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent .
+
+If you add the following statement in your custom `Dockerfile`, it will copy
the ShardingSphere Agent directory to `/shardingsphere-agent/`.
+
+```dockerfile
+COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
+```
+
+## Using Dockerfile
+
+Introduce a typical scenario,
+
+1. Assume that the Jaeger All in One Docker Container is deployed through the
following Bash command,
+
+```shell
+docker network create example-net
+docker run --rm -d \
+ --name jaeger \
+ -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
+ --network example-net \
+ jaegertracing/all-in-one:1.62.0
+```
+
+2. Assume `./custom-agent.yaml` contains the configuration of ShardingSphere
Agent, and the content may be as follows,
+
+```yaml
+plugins:
+ tracing:
+ OpenTelemetry:
+ props:
+ otel.service.name: "example"
+ otel.exporter.otlp.traces.endpoint: "http://jaeger:4318"
+```
+
+3. Assuming `./target/example.jar` is an Uber JAR of Spring Boot that will use
ShardingSphere Agent,
+ you can use the ShardingSphere Agent in the nightly built Docker Image for
a JAR like `example.jar` through a `Dockerfile` like the following.
+
+```dockerfile
+FROM ghcr.io/apache/shardingsphere-agent:latest
+COPY ./target/example.jar /app.jar
+COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
+ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
+```
+
+If you build the Docker Image of `ghcr.io/apache/shardingsphere-agent:latest`
locally, the `Dockerfile` may be as follows,
+
+```dockerfile
+FROM ghcr.io/apache/shardingsphere-agent:latest
+COPY ./target/example.jar /app.jar
+COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
+ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
+```
+
+4. Enjoy it,
+
+```shell
+docker build -t example/gs-spring-boot-docker:latest .
+docker run --network example-net example/gs-spring-boot-docker:latest
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.cn.md
deleted file mode 100644
index 700c5301be4..00000000000
---
a/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.cn.md
+++ /dev/null
@@ -1,217 +0,0 @@
-+++
-title = "可观察性"
-weight = 7
-+++
-
-## Agent
-
-### 源码编译
-
-从 Github 下载 Apache ShardingSphere 源码,对源码进行编译,操作命令如下。
-
-```shell
-git clone --depth 1 https://github.com/apache/shardingsphere.git
-cd shardingsphere
-mvn clean install -DskipITs -DskipTests -P-dev,release,all
-```
-Agent 制品
`distribution/agent/target/apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz`
-
-### 目录说明
-
-创建 agent 目录,解压 agent 二进制包到 agent 目录。
-
-```shell
-mkdir agent
-tar -zxvf
apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz
-C agent
-cd agent
-tree
-├── LICENSE
-├── NOTICE
-├── conf
-│ └── agent.yaml
-├── plugins
-│ ├── lib
-│ │ ├── shardingsphere-agent-metrics-core-${latest.release.version}.jar
-│ │ └── shardingsphere-agent-plugin-core-${latest.release.version}.jar
-│ ├── logging
-│ │ └── shardingsphere-agent-logging-file-${latest.release.version}.jar
-│ ├── metrics
-│ │ └──
shardingsphere-agent-metrics-prometheus-${latest.release.version}.jar
-│ └── tracing
-│ ├──
shardingsphere-agent-tracing-opentelemetry-${latest.release.version}.jar
-└── shardingsphere-agent-${latest.release.version}.jar
-```
-
-### 配置说明
-
-`conf/agent.yaml` 用于管理 agent 配置。内置插件包括 File、Prometheus、OpenTelemetry。
-
-```yaml
-plugins:
-# logging:
-# File:
-# props:
-# level: "INFO"
-# metrics:
-# Prometheus:
-# host: "localhost"
-# port: 9090
-# props:
-# jvm-information-collector-enabled: "true"
-# tracing:
-# OpenTelemetry:
-# props:
-# otel.service.name: "shardingsphere"
-# otel.traces.exporter: "jaeger"
-# otel.exporter.otlp.traces.endpoint: "http://localhost:14250"
-# otel.traces.sampler: "always_on"
-```
-
-### 插件说明
-
-#### File
-
-目前 File 插件只有构建元数据耗时日志输出,暂无其他日志输出。
-
-#### Prometheus
-
-用于暴露监控指标
-
-* 参数说明
-
-| 名称 | 说明 |
-|-----------------------------------|---------------------|
-| host | 主机 |
-| port | 端口 |
-| jvm-information-collector-enabled | 是否采集 JVM 指标信息 |
-
-#### OpenTelemetry
-
-OpenTelemetry 可以导出 tracing 数据到 Jaeger,Zipkin。
-
-* 参数说明
-
-| 名称 | 说明 |
-|-------------------------------------|----------------------|
-| otel.service.name | 服务名称 |
-| otel.traces.exporter | traces exporter |
-| otel.exporter.otlp.traces.endpoint | traces endpoint |
-| otel.traces.sampler | traces sampler |
-
-参数参考 [OpenTelemetry SDK
Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure)
-
-## 使用方式
-
-+ 1 准备好已集成 `ShardingSphere-JDBC` 的 `SpringBoot` 项目,test-project.jar
-+ 2 启动项目
-```shell
-java -javaagent:/agent/shardingsphere-agent-${latest.release.version}.jar -jar
test-project.jar
-```
-+ 3 访问启动的服务
-+ 4 查看对应的插件是否生效
-
-### Docker
-
-#### 本地构建
-
-ShardingSphere Agent 存在可用的 `Dockerfile` 用于方便分发。可执行如下命令以构建 Docker Image,
-
-```shell
-git clone [email protected]:apache/shardingsphere.git
-cd ./shardingsphere/
-./mvnw -am -pl distribution/agent -P-dev,release,all,docker -T1C -DskipTests
clean package
-```
-
-此后若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
-```
-
-#### 社区构建
-
-自 ShardingSphere 5.5.2 开始,ShardingSphere Agent 在
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
发布社区构建。
-此 Docker Image 不属于 ASF 分发产物之一,只是为了方便而提供。
-
-若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:5.5.2 /usr/agent/
/shardingsphere-agent/
-```
-
-#### 夜间构建
-
-ShardingSphere Agent 在
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
存在夜间构建的 Docker Image。
-
-若在自定义 `Dockerfile` 中添加以下语句,这会将 ShardingSphere Agent 的目录复制到
`/shardingsphere-agent/` 。
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
-```
-
-#### 通过 Dockerfile 使用
-
-引入一个典型场景,
-
-1. 假设通过如下的 Bash 命令部署了 Jaeger All in One 的 Docker Container,
-
-```shell
-docker network create example-net
-docker run --rm -d \
- --name jaeger \
- -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
- --network example-net \
- jaegertracing/all-in-one:1.62.0
-```
-
-2. 假设 `./custom-agent.yaml` 包含 ShardingSphere Agent 的配置,内容可能如下,
-
-```yaml
-plugins:
- tracing:
- OpenTelemetry:
- props:
- otel.service.name: "example"
- otel.exporter.otlp.traces.endpoint: "http://jaeger:4318"
-```
-
-3. 假设`./target/example.jar` 是一个即将使用 ShardingSphere Agent 的 Spring Boot 的 Uber
JAR,
-可通过类似如下的 `Dockerfile` 来为类似 `example.jar` 的 JAR 使用夜间构建的 Docker Image 中的
ShardingSphere Agent。
-
-```dockerfile
-FROM ghcr.io/apache/shardingsphere-agent:latest
-COPY ./target/example.jar /app.jar
-COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
-ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
-```
-
-如果是通过本地构建 `ghcr.io/apache/shardingsphere-agent:latest` 的 Docker
Image,`Dockerfile` 可能如下,
-
-```dockerfile
-FROM ghcr.io/apache/shardingsphere-agent:latest
-COPY ./target/example.jar /app.jar
-COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
-ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
-```
-
-4. 享受它,
-
-```shell
-docker build -t example/gs-spring-boot-docker:latest .
-docker run --network example-net example/gs-spring-boot-docker:latest
-```
-
-## Metrics
-
-| 指标名称 | 指标类型 | 指标描述
|
-|:----------------------------------------|:----------|:----------------------------------------------------------------------------------------------|
-| build_info | GAUGE | 构建信息
|
-| parsed_sql_total | COUNTER |
按类型(INSERT、UPDATE、DELETE、SELECT、DDL、DCL、DAL、TCL、RQL、RDL、RAL、RUL)分类的解析总数 |
-| routed_sql_total | COUNTER |
按类型(INSERT、UPDATE、DELETE、SELECT)分类的路由总数
|
-| routed_result_total | COUNTER | 路由结果总数(数据源路由结果、表路由结果)
|
-| jdbc_state | GAUGE | ShardingSphere-JDBC
状态信息。0 表示正常状态;1 表示熔断状态;2 锁定状态 |
-| jdbc_meta_data_info | GAUGE | ShardingSphere-JDBC
元数据信息 |
-| jdbc_statement_execute_total | COUNTER | 语句执行总数
|
-| jdbc_statement_execute_errors_total | COUNTER | 语句执行错误总数
|
-| jdbc_statement_execute_latency_millis | HISTOGRAM | 语句执行耗时
|
-| jdbc_transactions_total | COUNTER | 事务总数,按 commit,rollback
分类 |
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.en.md
deleted file mode 100644
index e62794c47f5..00000000000
---
a/docs/document/content/user-manual/shardingsphere-jdbc/observability/_index.en.md
+++ /dev/null
@@ -1,219 +0,0 @@
-+++
-title = "Observability"
-weight = 7
-+++
-
-## Agent
-
-### Compile source code
-
-Download Apache ShardingSphere from GitHub,Then compile.
-
-```shell
-git clone --depth 1 https://github.com/apache/shardingsphere.git
-cd shardingsphere
-mvn clean install -DskipITs -DskipTests -P-dev,release,all
-```
-
-Agent artifact is
`distribution/agent/target/apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz`
-
-### Directory structure
-
-Create agent directory, and unzip agent distribution package to the directory.
-
-```shell
-mkdir agent
-tar -zxvf
apache-shardingsphere-${latest.release.version}-shardingsphere-agent-bin.tar.gz
-C agent
-cd agent
-tree
-├── LICENSE
-├── NOTICE
-├── conf
-│ └── agent.yaml
-├── plugins
-│ ├── lib
-│ │ ├── shardingsphere-agent-metrics-core-${latest.release.version}.jar
-│ │ └── shardingsphere-agent-plugin-core-${latest.release.version}.jar
-│ ├── logging
-│ │ └── shardingsphere-agent-logging-file-${latest.release.version}.jar
-│ ├── metrics
-│ │ └──
shardingsphere-agent-metrics-prometheus-${latest.release.version}.jar
-│ └── tracing
-│ ├──
shardingsphere-agent-tracing-opentelemetry-${latest.release.version}.jar
-└── shardingsphere-agent-${latest.release.version}.jar
-```
-
-### Configuration
-
-`conf/agent.yaml` is used to manage agent configuration.
-Built-in plugins include File, Prometheus, OpenTelemetry.
-
-```yaml
-plugins:
-# logging:
-# File:
-# props:
-# level: "INFO"
-# metrics:
-# Prometheus:
-# host: "localhost"
-# port: 9090
-# props:
-# jvm-information-collector-enabled: "true"
-# tracing:
-# OpenTelemetry:
-# props:
-# otel.service.name: "shardingsphere"
-# otel.traces.exporter: "jaeger"
-# otel.exporter.otlp.traces.endpoint: "http://localhost:14250"
-# otel.traces.sampler: "always_on"
-```
-
-### Plugin description
-
-#### File
-
-Currently, the File plugin only outputs the time-consuming log output of
building metadata, and has no other log output for the time being.
-
-#### Prometheus
-
-Used for exposure monitoring metrics.
-
-* Parameter description
-
-| Name | Description
|
-|-----------------------------------|----------------------------------------------|
-| host | host IP
|
-| port | port
|
-| jvm-information-collector-enabled | whether to collect JVM indicator
information |
-
-#### OpenTelemetry
-
-OpenTelemetry can export tracing data to Jaeger, Zipkin.
-
-* Parameter description
-
-| Name | Description |
-|------------------------------------|-----------------|
-| otel.service.name | service name |
-| otel.traces.exporter | traces exporter |
-| otel.exporter.otlp.traces.endpoint | traces endpoint |
-| otel.traces.sampler | traces sampler |
-
-Parameter reference [OpenTelemetry SDK
Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure)
-
-## Usage
-
-+ 1 The `SpringBoot` project ready to integrate `ShardingSphere-JDBC`,
test-project.jar
-+ 2 Startup project
-```shell
-java -javaagent:/agent/shardingsphere-agent-${latest.release.version}.jar -jar
test-project.jar
-```
-+ 3 Access to started service
-+ 4 Check whether the corresponding plug-in is effective
-
-### Docker
-
-#### Local Build
-
-ShardingSphere Agent has a `Dockerfile` available for easy distribution. You
can execute the following command to build a Docker Image,
-
-```shell
-git clone [email protected]:apache/shardingsphere.git
-cd ./shardingsphere/
-./mvnw -am -pl distribution/agent -P-dev,release,all,docker -T1C -DskipTests
clean package
-```
-
-If you add the following statement in your custom `Dockerfile`, it will copy
the ShardingSphere Agent directory to `/shardingsphere-agent/`.
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
-```
-
-#### Community Build
-
-Since ShardingSphere 5.5.2, ShardingSphere Agent has released community builds
at https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent
.
-This Docker Image is not part of the ASF distribution, but is provided for
convenience.
-
-If you add the following statement in a custom `Dockerfile`, it will copy the
ShardingSphere Agent directory to `/shardingsphere-agent/`.
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:5.5.2 /usr/agent/
/shardingsphere-agent/
-```
-
-#### Nightly Build
-
-ShardingSphere Agent has a nightly built Docker Image at
https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-agent .
-
-If you add the following statement in your custom `Dockerfile`, it will copy
the ShardingSphere Agent directory to `/shardingsphere-agent/`.
-
-```dockerfile
-COPY --from=ghcr.io/apache/shardingsphere-agent:latest /usr/agent/
/shardingsphere-agent/
-```
-
-#### Using Dockerfile
-
-Introduce a typical scenario,
-
-1. Assume that the Jaeger All in One Docker Container is deployed through the
following Bash command,
-
-```shell
-docker network create example-net
-docker run --rm -d \
- --name jaeger \
- -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
- --network example-net \
- jaegertracing/all-in-one:1.62.0
-```
-
-2. Assume `./custom-agent.yaml` contains the configuration of ShardingSphere
Agent, and the content may be as follows,
-
-```yaml
-plugins:
- tracing:
- OpenTelemetry:
- props:
- otel.service.name: "example"
- otel.exporter.otlp.traces.endpoint: "http://jaeger:4318"
-```
-
-3. Assuming `./target/example.jar` is an Uber JAR of Spring Boot that will use
ShardingSphere Agent,
-you can use the ShardingSphere Agent in the nightly built Docker Image for a
JAR like `example.jar` through a `Dockerfile` like the following.
-
-```dockerfile
-FROM ghcr.io/apache/shardingsphere-agent:latest
-COPY ./target/example.jar /app.jar
-COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
-ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
-```
-
-If you build the Docker Image of `ghcr.io/apache/shardingsphere-agent:latest`
locally, the `Dockerfile` may be as follows,
-
-```dockerfile
-FROM ghcr.io/apache/shardingsphere-agent:latest
-COPY ./target/example.jar /app.jar
-COPY ./custom-agent.yaml /usr/agent/conf/agent.yaml
-ENTRYPOINT
["java","-javaagent:/usr/agent/shardingsphere-agent.jar","-jar","/app.jar"]
-```
-
-4. Enjoy it,
-
-```shell
-docker build -t example/gs-spring-boot-docker:latest .
-docker run --network example-net example/gs-spring-boot-docker:latest
-```
-
-## Metrics
-
-| Name | Type | Description
|
-|:--------------------------------------|:----------|:-------------------------------------------------------------------------------------------------------|
-| build_info | GAUGE | Build information
|
-| parsed_sql_total | COUNTER | Total count of parsed by
type (INSERT, UPDATE, DELETE, SELECT, DDL, DCL, DAL, TCL, RQL, RDL, RAL, RUL) |
-| routed_sql_total | COUNTER | Total count of routed by
type (INSERT, UPDATE, DELETE, SELECT) |
-| routed_result_total | COUNTER | Total count of routed
result (data source routed, table routed)
|
-| jdbc_state | GAUGE | Status information of
ShardingSphere-JDBC. 0 is OK; 1 is CIRCUIT BREAK; 2 is LOCK
|
-| jdbc_meta_data_info | GAUGE | Meta data information of
ShardingSphere-JDBC |
-| jdbc_statement_execute_total | GAUGE | Total number of
statements executed
|
-| jdbc_statement_execute_errors_total | GAUGE | Total number of
statement execution errors
|
-| jdbc_statement_execute_latency_millis | HISTOGRAM | Statement execution
latency
|
-| jdbc_transactions_total | GAUGE | Total number of
transactions, classify by commit and rollback
|