This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/master by this push:
new c421994155 add admin docs (#2430)
c421994155 is described below
commit c421994155aca39d562ba4223220c5cd71252e97
Author: Ken Liu <[email protected]>
AuthorDate: Thu Mar 16 17:16:02 2023 +0800
add admin docs (#2430)
* add admin docs
* update lint
* update admin docs
* update benchmark images link
* update links
---
content/zh-cn/overview/reference/admin/_index.md | 7 +
.../zh-cn/overview/reference/admin/architecture.md | 219 +++++++++++++++++++++
.../overview/reference/admin/documentation.md | 13 ++
content/zh-cn/overview/reference/admin/mock.md | 172 ++++++++++++++++
content/zh-cn/overview/reference/admin/search.md | 51 +++++
content/zh-cn/overview/reference/admin/test.md | 189 ++++++++++++++++++
.../zh-cn/overview/tasks/observability/admin.md | 6 +-
.../tasks/observability/tracing/skywalking.md | 46 +++--
.../overview/tasks/observability/tracing/zipkin.md | 76 +++----
.../zh-cn/overview/what/advantages/performance.md | 10 +-
static/imgs/architecture-old.png | 0
static/imgs/architecture.png | Bin 15546 -> 394225 bytes
.../admin/console/admin-search-application.png | Bin 0 -> 472084 bytes
.../v3/reference/admin/console/admin-search-ip.png | Bin 0 -> 423223 bytes
.../admin/console/admin-search-service-detail.png | Bin 0 -> 840260 bytes
.../admin/console/admin-search-service.png | Bin 0 -> 422605 bytes
.../admin/console/admin-search-service2.png | Bin 0 -> 470670 bytes
.../imgs/v3/reference/admin/console/dashboard.png | Bin 0 -> 819718 bytes
.../reference/admin/console/mock-architecture.png | Bin 0 -> 52097 bytes
.../admin/console/mock-rule-screenshot.png | Bin 0 -> 108102 bytes
.../v3/reference/admin/console/mock-workflow.png | Bin 0 -> 60818 bytes
.../tasks/observability/admin/2-service-test2.png | Bin 0 -> 86366 bytes
22 files changed, 717 insertions(+), 72 deletions(-)
diff --git a/content/zh-cn/overview/reference/admin/_index.md
b/content/zh-cn/overview/reference/admin/_index.md
new file mode 100644
index 0000000000..fa89e7bc1f
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/_index.md
@@ -0,0 +1,7 @@
+---
+description: ""
+linkTitle: Admin
+title: Admin 控制台操作手册
+type: docs
+weight: 1
+---
diff --git a/content/zh-cn/overview/reference/admin/architecture.md
b/content/zh-cn/overview/reference/admin/architecture.md
new file mode 100644
index 0000000000..1417d0c346
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/architecture.md
@@ -0,0 +1,219 @@
+---
+description: ""
+linkTitle: 架构与安装
+no_list: true
+title: Admin 整体架构与安装步骤
+type: docs
+weight: 1
+---
+
+回顾 [Dubbo 服务治理体系的总体架构](../../../what/overview/),Admin
是服务治理控制面中的一个核心组件,负责微服务集群的服务治理、可视化展示等。
+
+## Admin 部署架构
+
+
+
+总体上来说,Admin 部署架构分为以下几个部分:
+* Admin 主进程,包括服务发现元数据管理、可视化控制台、安全认证策略管控、其他定制化服务治理能力等组件。
+* 强依赖组件,包括 Mysql 数据库、注册/配置/元数据中心(可以是 Kubernetes、Nacos、Zookeeper 等)
+* 可选依赖组件,包括 Prometheus、Grafana、Zipkin 等
+
+## 安装 Admin
+
+### Dubboctl 安装
+#### Download
+下载 Dubbo Admin 发行版本
+```shell
+curl -L https://dubbo.apache.org/installer.sh | VERSION=0.1.0 sh -
+# Admin 要组织好发行版本
+```
+
+将 dubboctl 放入可执行路径
+```shell
+ln -s dubbo-admin-0.1.0/bin/dubboctl /usr/local/bin/dubboctl
+```
+#### Install
+安装过程会依次:
+
+1. 安装 Admin 自定义的一些资源
+2. 拉起 Admin、Nacos、Zookeeper 等不同的组件服务
+```shell
+dubboctl install # 使用默认 manifests 安装
+
+# or
+
+dubboctl manifests| kubectl apply -f -
+```
+
+```shell
+dubboctl install --set profile=minimal # 指定不同的 profile,即安装组件的组合
+```
+
+```shell
+dubboctl install --set admin.nacos.enabled=true, admin.nacos.namespace=test
+# 指定不同的覆盖参数
+```
+
+检查安装效果
+```shell
+kubectl get pod -n dubbo-system
+```
+
+#### 打开 Admin 控制台
+```shell
+kubectl port-forward svc/dubbo-admin -n dubbo-system 38080:38080
+```
+
+打开浏览器,访问: `http://127.0.0.1:38080/`
+### Helm 安装
+#### 前置条件
+
+- [Install the Helm client](https://helm.sh/docs/intro/install/), version 3.6
or above.
+- Kubernetes 集群
+- 配置 helm repository
+```shell
+$ helm repo add dubbo https://dubbo.apache.org/charts
+$ helm repo update
+```
+#### 安装步骤
+##### 安装方式一
+```shell
+helm install dubbo-admin dubbo/dubbo-stack -n dubbo-system
+
+helm install dubbo-admin-nacos dubbo/dubbo-stack -n dubbo-system
+
+helm install dubbo-admin-zookeeper dubbo/dubbo-stack -n dubbo-system
+```
+
+```shell
+helm install dubbo-admin-grafana dubbo/dubbo-stack -n dubbo-system
+
+helm install dubbo-admin-prometheus dubbo/dubbo-stack -n dubbo-system
+```
+##### 安装方式二
+```shell
+helm install dubbo-admin-all dubbo/dubbo-stack -n dubbo-system
+```
+
+> 引发的问题。需要明确哪些组件是保证生产可用的,哪些是仅作展示的,比如 nacos/zookeeper/admin
保障生产可用,prometheus/grafana 是仅作展示
+> 如果基于以上结论,则大部分情况下,dubbo-admin-all 是不推荐保生产安装的;更推荐使用类似 dubbo-admin-nacos
生产保障包,然后自己用 prometheus 社区的生产安装包
+
+
+检查安装状态
+```shell
+helm ls -n dubbo-system
+
+kubectl get deployments -n dubbo-system --output wide
+```
+
+### VM 安装
+#### Download
+下载 Dubbo Admin 发行版本
+```shell
+curl -L https://dubbo.apache.org/installer.sh | VERSION=0.1.0 sh -
+# Admin 要组织好发行版本
+```
+
+将 dubboctl 放入可执行路径
+```shell
+ln -s dubbo-admin-0.1.0/bin/dubbo-admin /usr/local/bin/dubbo-admin
+```
+#### Run
+```shell
+dubbo-admin run -f override-configuration.yml
+```
+## 配置手册 (Configuration)
+配置用于控制 dubbo-admin 的行为
+
+
+```yaml
+# Environment type. Available values are: "kubernetes" or "universal"
+environment: universal # ENV: DUBBO_ENVIRONMENT
+# Mode in which Dubbo CP is running. Available values are: "standalone",
"global", "zone"
+mode: standalone # ENV: DUBBO_MODE
+
+# Resource Store configuration
+store:
+ # Type of Store used in the Control Plane. Available values are:
"kubernetes", "postgres" or "memory"
+ type: memory # ENV: DUBBO_STORE_TYPE
+
+ # Kubernetes Store configuration (used when store.type=kubernetes)
+ kubernetes:
+ # Namespace where Control Plane is installed to.
+ systemNamespace: dubbo-system # ENV:
DUBBO_STORE_KUBERNETES_SYSTEM_NAMESPACE
+
+ # Postgres Store configuration (used when store.type=postgres)
+ mysql:
+ # Host of the Postgres DB
+ host: 127.0.0.1 # ENV: DUBBO_STORE_POSTGRES_HOST
+ # Port of the Postgres DB
+ port: 15432 # ENV: DUBBO_STORE_POSTGRES_PORT
+ # User of the Postgres DB
+ user: dubbo # ENV: DUBBO_STORE_POSTGRES_USER
+ # Password of the Postgres DB
+ password: dubbo # ENV: DUBBO_STORE_POSTGRES_PASSWORD
+ # Database name of the Postgres DB
+ dbName: dubbo # ENV: DUBBO_STORE_POSTGRES_DB_NAME
+ # Connection Timeout to the DB in seconds
+ connectionTimeout: 5 # ENV: DUBBO_STORE_POSTGRES_CONNECTION_TIMEOUT
+ # Maximum number of open connections to the database
+ # `0` value means number of open connections is unlimited
+ maxOpenConnections: 50 # ENV: DUBBO_STORE_POSTGRES_MAX_OPEN_CONNECTIONS
+ # Maximum number of connections in the idle connection pool
+ # <0 value means no idle connections and 0 means default max idle
connections
+ maxIdleConnections: 50 # ENV: DUBBO_STORE_POSTGRES_MAX_IDLE_CONNECTIONS
+ # TLS settings
+ tls:
+ # Mode of TLS connection. Available values are: "disable", "verifyNone",
"verifyCa", "verifyFull"
+ mode: disable # ENV: DUBBO_STORE_POSTGRES_TLS_MODE
+ # Path to TLS Certificate of the client. Used in verifyCa and verifyFull
modes
+ certPath: # ENV: DUBBO_STORE_POSTGRES_TLS_CERT_PATH
+ # Path to TLS Key of the client. Used in verifyCa and verifyFull modes
+ keyPath: # ENV: DUBBO_STORE_POSTGRES_TLS_KEY_PATH
+ # Path to the root certificate. Used in verifyCa and verifyFull modes.
+ caPath: # ENV: DUBBO_STORE_POSTGRES_TLS_ROOT_CERT_PATH
+ # MinReconnectInterval controls the duration to wait before trying to
+ # re-establish the database connection after connection loss. After each
+ # consecutive failure this interval is doubled, until MaxReconnectInterval
+ # is reached. Successfully completing the connection establishment
procedure
+ # resets the interval back to MinReconnectInterval.
+ minReconnectInterval: "10s" # ENV:
DUBBO_STORE_POSTGRES_MIN_RECONNECT_INTERVAL
+ # MaxReconnectInterval controls the maximum possible duration to wait
before trying
+ # to re-establish the database connection after connection loss.
+ maxReconnectInterval: "60s" # ENV:
DUBBO_STORE_POSTGRES_MAX_RECONNECT_INTERVAL
+server:
+ port: 38080
+registry:
+ address: xxx
+metadata-center:
+ address: xxx
+config-center:
+ address: xxx
+external-services:
+ prometheus:
+ # Prometheus service name is "metrics" and is in the "telemetry"
namespace
+ # http://prometheus.<dubbo_namespace_name>:9090
+ url: "http://metrics.telemetry:9090/"
+ tracing:
+ # Enabled by default. Kiali will anyway fallback to disabled if
+ # Jaeger is unreachable.
+ enabled: true
+ # Jaeger service name is "tracing" and is in the "telemetry" namespace.
+ # Make sure the URL you provide corresponds to the non-GRPC enabled
endpoint
+ # if you set "use_grpc" to false.
+ in_cluster_url: 'http://tracing.telemetry:16685/jaeger'
+ use_grpc: true
+ # Public facing URL of Jaeger
+ url: 'http://my-jaeger-host/jaeger'
+ grafana:
+ enabled: true
+ # Grafana service name is "grafana" and is in the "telemetry" namespace.
+ in_cluster_url: 'http://grafana.telemetry:3000/'
+ # Public facing URL of Grafana
+ url: 'http://my-ingress-host/grafana'
+
+# 更多配置
+```
+#### 打开 Admin 控制台
+
+打开浏览器,访问: `http://127.0.0.1:38080/`
\ No newline at end of file
diff --git a/content/zh-cn/overview/reference/admin/documentation.md
b/content/zh-cn/overview/reference/admin/documentation.md
new file mode 100644
index 0000000000..00f5077924
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/documentation.md
@@ -0,0 +1,13 @@
+---
+description: ""
+linkTitle: 文档管理
+no_list: true
+toc_hide: true
+title: Admin 文档管理功能介绍
+type: docs
+weight: 6
+---
+
+// TBD
+
+
diff --git a/content/zh-cn/overview/reference/admin/mock.md
b/content/zh-cn/overview/reference/admin/mock.md
new file mode 100644
index 0000000000..eeeb7cf71a
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/mock.md
@@ -0,0 +1,172 @@
+---
+description: ""
+linkTitle: 服务Mock
+no_list: true
+title: Admin 服务 Mock 功能简介
+type: docs
+weight: 4
+---
+
+Mock 功能是设计用来提升微服务研发与测试效率的,它可以短路 Consumer 侧发起的远程调用,提前返回预先设定好的 Mock 值,这样即使在没有
Provider 可用的情况下,消费端也能正常的推进开发、测试进程。除此之外,mock 也可用于快速模拟负责返回值的测试数据、模拟服务端异常等场景
+
+需要注意的是,Mock 能力仅限用于测试环境,应避免将其用于生产环境。
+
+# 设计背景
+在跨团队或是多应用开发时,在前期开发中往往会出现依赖的服务还未开发完成的情况,这样就会导致流程的阻塞,影响研发效率。基于这种情况,Dubbo Admin
提供了 mock 能力来解耦 Consumer 与 Provider 之间的依赖,以确保在 Provider 未就绪的情况下 Consumer
仍能正常开展测试,提高研发效率。
+
+Dubbo 框架本身设计有服务降级(有时也称为 mock)能力,通过配置 `org.apache.dubbo.config.ReferenceConfig`
的 mock
字段(可设置为true或是对应接口的Mock实现)或动态配置规则,此时就可以启动服务降级能力。这种服务降级能力是为生产环境的限流降级准备的,虽然也可以用于本地开发测试场景,但灵活度并不高,基于提升开发效率的根本诉求,我们设计了基于
Admin 的服务降级能力。
+
+Dubbo Admin 服务 mock 是一种更为轻量和便捷实现方式,主要用于开发测试阶段的,目标是提升微服务场景下的整体研发效率。需求详见:[Dubbo
Admin Mock需求](https://github.com/apache/dubbo-admin/issues/757)。
+
+## 架构设计
+
+
+
+**实现 Mock 能力,Dubbo 框架与 Admin 侧要支持的能力**
+
+* Dubbo Admin
+ * 规则管理
+ * 规则新增
+ * 规则查询
+ * 规则修改
+ * 规则删除
+ * 请求历史记录
+ * Mock 请求数据查询
+ * MockService Provider
+ * 根据规则生成 Mock 数据
+ * 响应 Consumer Mock 请求
+ * 保存请求和返回数据
+* Dubbo
+ * 根据 mock 开关配置,转发请求到 Admin 注册的 MockService
+ * 处理 mock 返回值并转换为匹配方法签名的强类型数据
+
+**Mock 请求原理时序图**
+
+
+
+## 使用方式
+
+1. 在 Consumer 应用中添加依赖
+
+ 开启 Mock 前,请确保在消费端应用中引入以下依赖:
+
+ ```xml
+ <denpendency>
+ <groupId>org.apache.dubbo.extensions</groupId>
+ <artifactId>dubbo-mock-admin</artifactId>
+ <version>${version}</version>
+ </denpendency>
+ ```
+
+ > 查看 [dubbo-mock-admin 的可用版本](/zh-cn/download/spi-extensions/)
+
+2. 配置 `-Denable.dubbo.admin.mock=true` 参数开启 Mock 并重启进程
+3. 打开 Admin 配置 Mock 规则
+
+ 用户可以通过在控制台上指定需要被 mock 的消费端IP、服务名和方法和具体的 mock 行为,实现对调用结果的 mock。
+
+ 
+
+ 一些支持的规则类型与示例
+
+ ```
+ 数字类型:123
+
+ 字符串:"hello, world!"
+
+ 数组、列表:[1, 2, 3]
+
+ 枚举:"ENUM_TYPE"
+
+ Map、对象:
+ {
+ "prop1": "value1",
+ "prop2": ["a", "b", "c"]
+ }
+
+ null: null
+ ```
+
+4. 此时,消费端再次发起远程调用,就会得到预期 Mock 返回值。
+
+ > 注意事项
+ > 1. Mock 仅限用于测试开发环境,因此为了确保核心依赖的稳定性,社区没有将 mock
组件打包在核心框架包中,用户可以自行决策是否将其作为应用的默认依赖在公司内推广
+ > 2. 即使添加了 mock 二进制依赖,mock 功能也不会默认开启,需要设置 `-Denable.dubbo.admin.mock=true`
后才能开启。
+
+## 实现原理
+
+Consumer 调用发起的调用会被本地的 MockServiceFilter 拦截,如果 mock 开关开启,则 MockServiceFilter
将请求转发到 MockService (由 Dubbo Admin 发布的服务),MockService 根据请求的服务、方法等查询用户预先配置的 mock
规则,如果查询到则返回规则中的 mock 值,Consumer 收到 mock 值后调用成功返回。
+
+### Mock 返回值如何定义?
+
+当前 Admin 支持录入 JSON 或者基本类型数据,如:
+
+* 返回数字值 (当方法签名返回值是数字类型)
+
+```
+123
+```
+
+* 返回字符串 (当方法签名返回值是字符串类型)
+```
+"hello, world!"
+```
+
+* 返回 JSON (当方法签名返回值是 Map 或对象类型)
+```
+{
+ "prop1": "value1",
+ "prop2": ["a", "b", "c"]
+}
+```
+
+* 返回数组 (当方法签名返回值是数组或列表)
+```
+[1, 2, 3]
+```
+
+### 消费端如何发起 MockService 调用?
+
+`dubbo-mock-admin` 将为消费端引入 MockServiceFilter 请求拦截器,如果用户打开 mock 开关,那么 Filter
会将请求转发到 Admin MockService 服务。
+
+### Mock 值如何转换为原始类型值?
+
+MockService 支持返回标准 JSON 格式或者基本类型数据,消费端会基于 Dubbo 内置类型转换器将 JSON 等值转为原始对象类型。
+
+### 未来优化点
+* 保存 Mock 开关到配置中心,用户可以通过 Admin 动态控制开关。
+* 开启 Mysql 数据库链接池
+
+### 表结构设计
+Admin 依赖 Mysql 数据库存储用户配置的 mock 规则,具体的表结构设计如下。
+
+#### Mock Rule
+
+```sql
+CREATE TABLE `mock_rule` (
+ `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `service_name` varchar(255) DEFAULT NULL COMMENT '服务名',
+ `method_name` varchar(255) DEFAULT NULL COMMENT '方法名',
+ `rule` text NULL DEFAULT COMMENT '规则',
+ `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP COMMENT '更新时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='服务mock方法表';
+```
+#### Mock Log
+
+```sql
+CREATE TABLE `mock_log` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
+ `method_id` int(11) DEFAULT NULL COMMENT '规则id',
+ `request` text COMMENT '请求数据',
+ `response` text COMMENT '返回值',
+ `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
COMMENT '更新时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='mock请求记录表';
+```
+
+
+
+
diff --git a/content/zh-cn/overview/reference/admin/search.md
b/content/zh-cn/overview/reference/admin/search.md
new file mode 100644
index 0000000000..9888f72088
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/search.md
@@ -0,0 +1,51 @@
+---
+description: ""
+linkTitle: 文档查询
+title: Admin 服务查询
+type: docs
+weight: 2
+---
+
+Admin 支持可视化的展示 Dubbo 微服务集群的状态,方便用户从全局掌握集群的应用、服务和实例分布,Admin
还可以通过查询的方式了解某一个服务更详细的信息:
+* 首页集群大盘,展示集群应用、服务、示例的总体分布,集群总体流量情况等
+* 支持根据应用名、服务名(可包含版本&分组)、实例 IP 查询详细信息
+* 支持服务名/应用名的自动补全
+* 支持查看单条服务实例的详情
+
+## 首页大盘
+
+
+
+## 根据 Dubbo 服务名查询
+
+精确输入`接口名:版本` 查询服务
+
+
+
+通过 `*` 通配符模糊查询服务
+
+
+
+## 根据应用名查询
+
+输入应用名查询某应用关联的所有服务(包含提供和消费的服务)
+
+
+
+## 根据实例 IP 名查询
+
+输入实例 IP 查询某实例关联的所有服务(包含提供和消费的服务)
+
+
+
+> 支持基于端口过滤服务
+
+## 查看服务实例详情
+
+在服务列表点击 `详情` 查看服务详细情况
+
+
+
+
+
+
diff --git a/content/zh-cn/overview/reference/admin/test.md
b/content/zh-cn/overview/reference/admin/test.md
new file mode 100644
index 0000000000..1c426f72d7
--- /dev/null
+++ b/content/zh-cn/overview/reference/admin/test.md
@@ -0,0 +1,189 @@
+---
+description: ""
+linkTitle: 服务测试
+no_list: true
+title: Admin 服务测试功能简介
+type: docs
+weight: 3
+---
+
+服务测试功能通常提供给 Dubbo 服务的开发者使用,用来对自己发布的服务进行自测。通过在 Admin
控制台上模拟真实的消费端进程,对服务提供者发起调用,并验证调用结果是否符合预期。
+
+## 使用方式
+
+### 准备用例
+1. 启动用例
+
+ 可以参考 [快速开始](../../../quickstart/java/) 启动一个简单的 Dubbo 服务,对于服务测试来说,只需要启动
provider 即可。
+
+2. 查询服务
+
+ 完成服务端部署后,可以到 Admin 的 `服务测试` 页面查询对应的服务:
+
+ 
+
+ 这里的信息和元数据类似,包含方法名,参数类型和返回值信息,点击右边的标签就可以进入服务测试页面
+
+### 执行服务测试
+
+服务测试页面包含了两个 json 编辑器,参数类型的信息都是以 json 格式保存。
+
+如以下示例所示,在左侧编辑器中填入对应的参数值(本例中数类型是 `String` ),填写完成后点击 `执行`
即可对服务端发起调用,调用结果展示在右边的编辑器中。
+
+
+
+如果调用失败,会显示详细的失败原因,下面来看一下调用失败的例子:
+
+
+
+本例中,先关掉 Dubbo
服务提供者的进程,再执行服务测试,可以看到返回的结果是`找不到服务提供者`的异常。和普通调用一样,业务和框架的异常都会返回在结果中,方便业务排查。
+
+### 复合类型参数的填写
+
+考虑 `UserService` 中的以下方法和类型:
+
+```java
+//org.apache.dubbo.demo.api.UserService
+Result getUser(String name, UserInfoDO userInfoDO);
+```
+```java
+public class UserInfoDO {
+ private int id;
+ private LocationDO locationDO;
+ private DepartmentDO departmentDO;
+
+ @Override
+ public String toString() {
+ return "UserInfoDO{" +
+ "id=" + id +
+ ", locationDO=" + locationDO.toString() +
+ ", departmentDO=" + departmentDO.toString() +
+ '}';
+ }
+}
+```
+
+```java
+public class DepartmentDO {
+
+ private String departName;
+ private LocationDO departLocation;
+
+ @Override
+ public String toString() {
+ return "DepartmentDO{" +
+ "departName='" + departName + '\'' +
+ ", departLocation=" + departLocation.toString() +
+ '}';
+ }
+}
+```
+
+```java
+public class LocationDO {
+ private String address;
+ private int postNum;
+
+ @Override
+ public String toString() {
+ return "LocationDO{" +
+ "address='" + address + '\'' +
+ ", postNum=" + postNum +
+ '}';
+ }
+}
+```
+参数是比较复杂的符合类型参数,服务测试的时候,会逐层展开填写每一个field的值,如下图所示:
+
+同样可以调用成功并且返回结果
+
+## 原理
+
+### 数据来源
+
+服务测试中,最重要的就是完整的方法签名信息,和参数的类型信息,有了这些信息才能够一步步填入每个参数的值,拼装出完整的服务消费者。因此,使用服务测试的前提是在
Dubbo 中开启元数据中心(默认开启,Zookeeper、Nacos、Redis 等默认以注册中心做为元数据中心),Dubbo Admin
的方法签名和参数类型信息就是元数据中心来的:
+
+
+
+如图所示,服务端在运行的时候会将服务的元数据信息注册到元数据中心,格式如下:
+
+```json
+{
+ ...
+ "methods": [
+ {
+ "name": "sayHello",
+ "parameterTypes": [
+ "org.apache.dubbo.demo.model.User"
+ ],
+ "returnType": "org.apache.dubbo.demo.model.Result"
+ },
+ ...
+ ],
+ "types": [
+ {
+ "type": "char"
+ },
+ {
+ "type": "long"
+ },
+ {
+ "type": "org.apache.dubbo.demo.model.Result",
+ "properties": {
+ "msg": {
+ "type": "java.lang.String",
+ "properties": {
+ "value": {
+ "type": "char[]"
+ },
+ "hash": {
+ "type": "int"
+ }
+ }
+ },
+ "userName": {
+ "type": "java.lang.String",
+ "properties": {
+ "value": {
+ "type": "char[]"
+ },
+ "hash": {
+ "type": "int"
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "org.apache.dubbo.demo.model.User",
+ "properties": {
+ "id": {
+ "type": "java.lang.Long",
+ "properties": {
+ "value": {
+ "type": "long"
+ }
+ }
+ },
+ "username": {
+ "type": "java.lang.Sring",
+ "properties": {
+ "value": {
+ "type": "char[]"
+ },
+ "hash": {
+ "type": "int"
+ }
+ }
+ }
+ }
+ },
+ ...
+ ]
+}
+```
+与服务测试相关的就是`methods`和`types`所包含的方法和类型信息,Dubbo Admin根据这些信息,将参数渲染到服务测试页面的Json
Editor中,由用户来输入每个参数,每个成员变量的值。
+
+### 泛化调用
+
+有了参数类型,下一个问题就是怎么能够调用到服务端,在传统的Dubbo RPC调用中,客户端需要依赖服务端的API jar包 (参考 [Quick
Start](https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-spring-boot/dubbo-samples-spring-boot-consumer)
中的消费端示例,这对于 Dubbo Admin 来说不太可能,因为服务的上下线是动态的,Dubbo Admin 无法动态增加 jar 包依赖,因此需要用到
Dubbo
中的[**泛化调用**](../../../mannual/java-sdk/advanced-features-and-usage/service/generic-reference/),指的是在没有服务端API接口的情况下,客户端直接通过
`GenericService` 接口来发起服务调用,返回值中的数据对象都用Map来表示。泛化调用在服务端不需要做特殊处理,只需要客户端发起即可。
\ No newline at end of file
diff --git a/content/zh-cn/overview/tasks/observability/admin.md
b/content/zh-cn/overview/tasks/observability/admin.md
index 8b4433e30f..2d875f41a6 100644
--- a/content/zh-cn/overview/tasks/observability/admin.md
+++ b/content/zh-cn/overview/tasks/observability/admin.md
@@ -9,8 +9,6 @@ type: docs
weight: 10
---
-
-
前面章节我们提到 Dubbo 框架提供了丰富的服务治理功能如流量控制、动态配置、服务 Mock、服务测试等,而 Dubbo Admin
控制台的一部分重要作用在于将 dubbo 框架提供的服务治理能力提供一个开箱即用的可视化平台。本文将介绍 Dubbo Admin
控制台所提供的功能,让大家快速了解和使用 Admin 并对 Dubbo 所提供的服务治理能力有个更直观的了解。
> Dubbo Admin 已经升级为 Dubbo 服务治理统一入口,涵盖的范围非常广泛,本文讲解的只是 Admin 可视化控制台部分。
@@ -45,7 +43,9 @@ Admin 控制台提供了从开发、测试到流量治理等不同层面的丰
#### 服务测试
服务测试相,主要用于模拟服务消费方,验证 Dubbo 服务的使用方式与正确性。
-
+
+
+
#### 服务 Mock
服务Mock通过无代码嵌入的方式将Consumer对Provider的请求进行拦截,动态的对Consumer的请求进行放行或返回用户自定义的Mock数据。从而解决在前期开发过程中,Consumer所依赖的Provider未准备就绪时,造成Consumer开发方的阻塞问题。
diff --git a/content/zh-cn/overview/tasks/observability/tracing/skywalking.md
b/content/zh-cn/overview/tasks/observability/tracing/skywalking.md
index 3ba14934e0..dee8e4c676 100644
--- a/content/zh-cn/overview/tasks/observability/tracing/skywalking.md
+++ b/content/zh-cn/overview/tasks/observability/tracing/skywalking.md
@@ -9,16 +9,11 @@ type: docs
weight: 20
---
+本文演示如何将 Dubbo 接入 Skywalking 全链路监控体系,依赖的 Skywalking Agent 版本为 [skywalking
micrometer-1.10
api](https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/application-toolkit-micrometer-1.10/).
+## 1. 添加 Micrometer Observation 依赖到你的项目
+为了能够将 Micrometer 及相关 Metrics 依赖添加到 classpath,需要增加 `dubbo-metrics-api` 依赖,如下所示:
-# Overview
-Apache Dubbo has inbuilt tracing through [Micrometer
Observations](https://micrometer.io/)
-and [Micrometer Tracing](https://github.com/micrometer-metrics/tracing).
-And the micrometer can integrate with skywalking by [skywalking
micrometer-1.10
api](https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/application-toolkit-micrometer-1.10/).
-
-## 1. Adding Micrometer Observation To Your Project
-In order to add Micrometer to the classpath and add metrics for Dubbo you need
to add the `dubbo-metrics-api` dependency
-as shown below:
```xml
<dependency>
@@ -27,8 +22,10 @@ as shown below:
</dependency>
```
-## 2. Add Skywalking Micrometer-1.10 Api To Your Project
-To integrate the dubbo's micrometer tracing data to skywalking, you should add
this toolkit dependency.
+## 2. 添加 Skywalking Micrometer-1.10 Api 到项目
+
+为了将 Dubbo Micrometer tracing 数据集成到 Skywalking,需要添加以下依赖。
+
```xml
<dependency>
<groupId>org.apache.skywalking</groupId>
@@ -36,7 +33,8 @@ To integrate the dubbo's micrometer tracing data to
skywalking, you should add t
</dependency>
```
-## 3. Configuration ObservationRegistry
+## 3. 配置 ObservationRegistry
+
```java
@Configuration
public class ObservationConfiguration {
@@ -53,25 +51,31 @@ public class ObservationConfiguration {
}
}
```
-## 4. Start the Skywalking OAP
-[skywalking oap
setup](https://skywalking.apache.org/docs/main/v9.3.0/en/setup/backend/backend-setup/)
+## 4. 启 Skywalking OAP
+请参考这里了解如何 [设置 Skywalking
OAP](https://skywalking.apache.org/docs/main/v9.3.0/en/setup/backend/backend-setup/)
+
```shell
bash startup.sh
```
-## 5. Start Provider and Application With Skywalking Agent
-After starting the registration center, we start provider and Consumer with
skywalking agent, so skywalking can report trace data.
-And because skywalking java agent have instrumented the dubbo and spring
framework, to verify dubbo integrates with skywalking by micrometer,
-**we should delete plugin jars in "plugins" directory**.
-To connect the skywalking oap, we should config the backend address in
/path/to/skywalking-agent/agent.config.
-The relevant field is **collector.backend_service**.
+
+## 5. 启动示例 Demo (skywalking-agent)
+首先,我们假设你已经有一个注册中心来协调地址发现,具体可参见示例里指向的注册中心配置。
+
+之后,启动 Provider 和 Consumer 并确保 skywalking-agent 参数被正确设置,skywalking-agent
确保数据可以被正确的上报到后台系统。
+
+* 考虑到 skywalking-agent 本身也有内置的 Dubbo 拦截器,为了确保示例能使用 Dubbo 自带的 Micrometer
集成,我么你需要删除 skywalking-agent 自带的拦截器,直接将 `plugins` 目录删除即可
+* 配置 Skywalking OAP 服务器地址,在以下文件中配置 OAP 地址
`/path/to/skywalking-agent/agent.config`,对应的参数项为 `collector.backend_service`。
+
```shell
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar
dubbo-samples-spring-boot-tracing-skwalking-provider-1.0-SNAPSHOT.jar
```
+
```shell
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar
dubbo-samples-spring-boot-tracing-skwalking-consumer-1.0-SNAPSHOT.jar
```
-## 6. Result
-Open `[skywalking-webapp](http://localhost:8080/)` in browser.
+
+## 6. 示例效果
+在浏览器中打开 `[skywalking-webapp](http://localhost:8080/)` 查看效果


diff --git a/content/zh-cn/overview/tasks/observability/tracing/zipkin.md
b/content/zh-cn/overview/tasks/observability/tracing/zipkin.md
index fa4e61c518..1fa3782796 100644
--- a/content/zh-cn/overview/tasks/observability/tracing/zipkin.md
+++ b/content/zh-cn/overview/tasks/observability/tracing/zipkin.md
@@ -9,56 +9,51 @@ type: docs
weight: 10
---
+这个示例演示了 Dubbo 集成 Zipkin 全链路追踪的基础示例,此示例共包含三部分内容:
+* dubbo-samples-spring-boot3-tracing-provider
+* dubbo-samples-spring-boot3-tracing-consumer
+* dubbo-samples-spring-boot3-tracing-interface
-# Overview
+## 快速开始
-This example demonstrates the basic usage of tracing in Dubbo application and
report tracing information to zipkin. This
-example contains three parts, `dubbo-samples-spring-boot3-tracing-provider`
-, `dubbo-samples-spring-boot3-tracing-consumer` and
`dubbo-samples-spring-boot3-tracing-interface`.
+### 安装 & 启动 Zipkin
-Apache Dubbo has inbuilt tracing through [Micrometer
Observations](https://micrometer.io/) and [Micrometer
Tracing](https://github.com/micrometer-metrics/tracing).
+参考 [Zipkin's quick start](https://zipkin.io/pages/quickstart.html) 安装 Zipkin。
-## Quick Start
-
-### Install & Start Zipkin
-
-Follow [Zipkin's quick start](https://zipkin.io/pages/quickstart.html) to
install zipkin.
-
-Here we use docker to quickly start a zipkin server.
+这里我们使用 Docker 来掩饰如何快速的启动 Zipkin 服务。
```bash
docker run -d -p 9411:9411 --name zipkin openzipkin/zipkin
```
-Then you can verify zipkin server works by access
`[http://localhost:9411](http://localhost:9411)`
+紧接着,你可以通过如下链接确认 Zipkin 正常工作 `[http://localhost:9411](http://localhost:9411)`

-### Install & Start Nacos
+### 安装 & 启动 Nacos
-Follow [Nacos's quick
start](https://nacos.io/zh-cn/docs/v2/quickstart/quick-start.html) to install
and start nacos.
+跟随 [Nacos's quick
start](https://nacos.io/zh-cn/docs/v2/quickstart/quick-start.html) 快速安装并启动
Nacos。
-### Start Provider
+### 启动示例 Provider
-Start `org.apache.dubbo.springboot.demo.provider.ProviderApplication` directly
from IDE.
+在 IDE 中直接运行 `org.apache.dubbo.springboot.demo.provider.ProviderApplication`。
-### Start Consumer
+### 启动示例 Consumer
-Start `org.apache.dubbo.springboot.demo.consumer.ConsumerApplication` directly
from IDE.
+在 IDE 中直接运行 `org.apache.dubbo.springboot.demo.consumer.ConsumerApplication`。
-### Check Result
+### 检查监控效果
-Open `[http://localhost:9411/zipkin/](http://localhost:9411/zipkin/)` in
browser.
+在浏览器中打开 `[http://localhost:9411/zipkin/](http://localhost:9411/zipkin/)` 查看效果。

-## How To Use Dubbo Tracing In Your Project
+## 如何在项目中使用 Dubbo Tracing
-### 1. Adding Micrometer Observation To Your Project
+### 1. 添加 Micrometer Observation 依赖
-In order to add Micrometer to the classpath and add metrics for Dubbo you need
to add the `dubbo-metrics-api` dependency
-as shown below:
+首先需要添加 `dubbo-metrics-api` 依赖将 Micrometer 和 Dubbo Metrics 引入项目中:
```xml
<dependency>
@@ -67,18 +62,15 @@ as shown below:
</dependency>
```
-Thanks to the usage of [Micrometer Observations](https://micrometer.io/) Dubbo
got instrumented once, but depending on
-the setup will allow emission of metrics, tracer or other signals via custom
`ObservationHandlers`. Please read
-the [documentation under docs/observation](https://micrometer.io) for more
information.
+通过集成 [Micrometer Observations](https://micrometer.io/) Dubbo
可以在只被拦截一次的情况下,导出多种不同类型的监控指标如 Metrics、Tracer、其他一些信号等,这具体取决于你对
`ObservationHandlers` 的配置。 可以参考以下链接 [documentation under
docs/observation](https://micrometer.io) 了解更多内容。
-### 2. Adding Micrometer Tracing Bridge To Your Project
+### 2. 配置 Micrometer Tracing Bridge
-In order to start creating spans for Dubbo based projects a `bridge` between
Micrometer Tracing and an actual Tracer is
-required.
+为了启用 Dubbo 全链路追踪统计,需要为 Micrometer Tracing 和实际的 Tracer(本示例中的 Zipkin)间配置
`bridge`。
-> NOTE: Tracer is a library that handles lifecycle of spans (e.g. it can
create, start, stop, sample, report spans).
+> 注意:Tracer 是一个管控 span 生命周期的二进制包,比如 span 的 创建、终止、采样、上报等。
-Micrometer Tracing supports
[OpenTelemetry](https://github.com/open-telemetry/opentelemetry-java) and
[Brave](https://github.com/openzipkin/brave) as Tracers. Dubbo recommends using
OpenTelemetry as the protocol of tracing, you can add dependency as shown below:
+Micrometer Tracing 支持
[OpenTelemetry](https://github.com/open-telemetry/opentelemetry-java) and
[Brave](https://github.com/openzipkin/brave) 格式的 Tracer。Dubbo 推荐使 OpenTelemetry
作为标准的 tracing 协议,`bridge` 的具体配置如下:
```xml
<!-- OpenTelemetry Tracer -->
@@ -88,13 +80,9 @@ Micrometer Tracing supports
[OpenTelemetry](https://github.com/open-telemetry/o
</dependency>
```
-### 3. Adding Micrometer Tracing Exporter To Your Project
-
-After having added the Tracer, an exporter (also known as a reporter) is
required. It's a component that will export the
-finished span and send it to a reporting system. Micrometer Tracer natively
supports Tanzu Observability by Wavefront
-and Zipkin. Let's take zipkin as an example as shown below:
+### 3. 添加 Micrometer Tracing Exporter
-OpenZipkin Zipkin with OpenTelemetry
+添加 Tracer 后,需要继续配置 exporter(也称为 reporter)。exporter 负责导出完成 span 并将其发送到后端
reporter 系统。Micrometer Tracer 原生支持 Tanzu Observability by Wavefront 和 Zipkin。以
Zipkin 为例:
```xml
<dependency>
@@ -103,9 +91,9 @@ OpenZipkin Zipkin with OpenTelemetry
</dependency>
```
-You can read more about tracing setup [this documentation, under
docs/tracing](https://micrometer.io/).
+你可以在此阅读更多关于 Tracing 的配置信息 [this documentation, under
docs/tracing](https://micrometer.io/).
-### 4. Configuration ObservationRegistry
+### 4. 配置 ObservationRegistry
```java
@Configuration
@@ -127,7 +115,7 @@ public class ObservationConfiguration {
}
```
-### 5. Customizing Observation Filters
+### 5. 定制 Observation Filters
To customize the tags present in metrics (low cardinality tags) and in spans
(low and high cardinality tags) you should
create your own versions of `DubboServerObservationConvention` (server side)
and `DubboClientObservationConvention` (
@@ -139,7 +127,7 @@ side).
## Extension
-### Other Micrometer Tracing Bridge
+### 其他 Micrometer Tracing Bridge
```xml
<!-- Brave Tracer -->
@@ -151,7 +139,7 @@ side).
-### Other Micrometer Tracing Exporter
+### 其他 Micrometer Tracing Exporter
Tanzu Observability by Wavefront
diff --git a/content/zh-cn/overview/what/advantages/performance.md
b/content/zh-cn/overview/what/advantages/performance.md
index 284acc6725..f4b1a07f16 100644
--- a/content/zh-cn/overview/what/advantages/performance.md
+++ b/content/zh-cn/overview/what/advantages/performance.md
@@ -16,15 +16,17 @@ Dubbo 内置支持 Dubbo2、Triple 两款高性能通信协议。其中
* Dubbo2 是基于 TCP 传输协议之上构建的二进制私有 RPC 通信协议,是一款非常简单、紧凑、高效的通信协议。
* Triple 是基于 HTTP/2 的新一代 RPC 通信协议,在网关穿透性、通用性以及 Streaming 通信上具备优势,Triple 完全兼容
gRPC 协议。
-Dubbo2 benchmark 性能指标
+Dubbo TCP Protocol benchmark 性能指标
-
+
Triple benchmark 性能指标
-
+
-了解 [更多通信协议](../../../core-features/protocols)。
+了解更多
+* [通信协议](../../../core-features/protocols)
+* [Benchmark
指标](../../../mannual/java-sdk/reference-manual/performance/rpc-benchmarking)
## 流式通信
diff --git a/static/imgs/architecture-old.png b/static/imgs/architecture-old.png
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/static/imgs/architecture.png b/static/imgs/architecture.png
index 530fd53ff5..981e20948c 100644
Binary files a/static/imgs/architecture.png and b/static/imgs/architecture.png
differ
diff --git
a/static/imgs/v3/reference/admin/console/admin-search-application.png
b/static/imgs/v3/reference/admin/console/admin-search-application.png
new file mode 100644
index 0000000000..5762f6e510
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/admin-search-application.png differ
diff --git a/static/imgs/v3/reference/admin/console/admin-search-ip.png
b/static/imgs/v3/reference/admin/console/admin-search-ip.png
new file mode 100644
index 0000000000..ca1e8eebf9
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/admin-search-ip.png differ
diff --git
a/static/imgs/v3/reference/admin/console/admin-search-service-detail.png
b/static/imgs/v3/reference/admin/console/admin-search-service-detail.png
new file mode 100644
index 0000000000..ffb417d9cc
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/admin-search-service-detail.png differ
diff --git a/static/imgs/v3/reference/admin/console/admin-search-service.png
b/static/imgs/v3/reference/admin/console/admin-search-service.png
new file mode 100644
index 0000000000..03f49effdf
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/admin-search-service.png differ
diff --git a/static/imgs/v3/reference/admin/console/admin-search-service2.png
b/static/imgs/v3/reference/admin/console/admin-search-service2.png
new file mode 100644
index 0000000000..07ba3805e1
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/admin-search-service2.png differ
diff --git a/static/imgs/v3/reference/admin/console/dashboard.png
b/static/imgs/v3/reference/admin/console/dashboard.png
new file mode 100644
index 0000000000..1fe07e50d7
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/dashboard.png differ
diff --git a/static/imgs/v3/reference/admin/console/mock-architecture.png
b/static/imgs/v3/reference/admin/console/mock-architecture.png
new file mode 100644
index 0000000000..81c4aa6e88
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/mock-architecture.png differ
diff --git a/static/imgs/v3/reference/admin/console/mock-rule-screenshot.png
b/static/imgs/v3/reference/admin/console/mock-rule-screenshot.png
new file mode 100644
index 0000000000..77f0296f69
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/mock-rule-screenshot.png differ
diff --git a/static/imgs/v3/reference/admin/console/mock-workflow.png
b/static/imgs/v3/reference/admin/console/mock-workflow.png
new file mode 100644
index 0000000000..a2e8c9ddf5
Binary files /dev/null and
b/static/imgs/v3/reference/admin/console/mock-workflow.png differ
diff --git a/static/imgs/v3/tasks/observability/admin/2-service-test2.png
b/static/imgs/v3/tasks/observability/admin/2-service-test2.png
new file mode 100644
index 0000000000..9ffb7b7a6b
Binary files /dev/null and
b/static/imgs/v3/tasks/observability/admin/2-service-test2.png differ