juzhiyuan commented on code in PR #7275:
URL: https://github.com/apache/apisix/pull/7275#discussion_r901199518


##########
docs/zh/latest/plugins/prometheus.md:
##########
@@ -23,50 +29,71 @@ title: prometheus
 
 ## 描述
 
-此插件是提供符合 prometheus 数据格式的监控指标数据。
+`prometheus` 插件以 
[Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/#exposition-formats)
 规定的格式上报指标到 Prometheus 中。
 
 ## 属性
 
-| 名称         | 类型   | 必选项 | 默认值  | 有效值       | 描述                              
                    |
-| ------------ | ------ | ------ | ------ | ------------ | 
----------------------------------------------------- |
-| prefer_name  | boolean | 可选 | false   |             | 设置为`true`时,Prometheus 
指标中将使用路由和服务的 `name` 而不是 `id`。 |
+| 名称         | 类型     | 必选项 | 默认值 |  描述                                        
          |
+| ------------ | --------| ------ | ------ | 
----------------------------------------------------- |
+| prefer_name  | boolean | 是     | false  | 当设置为 `true` 时,将使用路由或服务的 `name` 
标识请求所命中的路由或服务,否则使用其 `id`。 |
 
-## 接口
+:::note
 
-插件会增加 `/apisix/prometheus/metrics` 这个接口。
+多个路由或服务可以设置为相同的名称,所以当设置 `prefer_name` 为 `true` 时,请规范命名路由和服务,否则容易引起误解。

Review Comment:
   ```suggestion
   多个路由或服务可以设置为相同的名称,所以当设置 `prefer_name` 为 `true` 时,请规范路由和服务的命名,否则容易引起误解。
   ```



##########
docs/zh/latest/plugins/prometheus.md:
##########
@@ -23,50 +29,71 @@ title: prometheus
 
 ## 描述
 
-此插件是提供符合 prometheus 数据格式的监控指标数据。
+`prometheus` 插件以 
[Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/#exposition-formats)
 规定的格式上报指标到 Prometheus 中。
 
 ## 属性
 
-| 名称         | 类型   | 必选项 | 默认值  | 有效值       | 描述                              
                    |
-| ------------ | ------ | ------ | ------ | ------------ | 
----------------------------------------------------- |
-| prefer_name  | boolean | 可选 | false   |             | 设置为`true`时,Prometheus 
指标中将使用路由和服务的 `name` 而不是 `id`。 |
+| 名称         | 类型     | 必选项 | 默认值 |  描述                                        
          |
+| ------------ | --------| ------ | ------ | 
----------------------------------------------------- |
+| prefer_name  | boolean | 是     | false  | 当设置为 `true` 时,将使用路由或服务的 `name` 
标识请求所命中的路由或服务,否则使用其 `id`。 |

Review Comment:
   Hi @hf400159, could you please check if `prefer_name` is required?



##########
docs/zh/latest/plugins/prometheus.md:
##########
@@ -152,46 +161,51 @@ plugin_attr:
 
 ## 可用的 HTTP 指标
 
-* `Status codes`: upstream 服务返回的 HTTP 状态码,可以统计到每个服务或所有服务的响应状态码的次数总和。具有的维度:
+`prometheus` 插件可以导出以下指标:
+
+- Status codes: 上游服务返回的 HTTP 状态码,可以统计到每个服务或所有服务的响应状态码的次数总和。属性如下所示:
 
-    | 名称          |    描述             |
-    | -------------| --------------------|
-    | code         | upstream 服务返回的 HTTP 状态码。 |
-    | route        | 请求匹配的 route 的 `route_id`,未匹配,则默认为空字符串。 |
-    | matched_uri  | 请求匹配的 route 的 `uri`,未匹配,则默认为空字符串。 |
-    | matched_host | 请求匹配的 route 的 `host`,未匹配,则默认为空字符串。 |
-    | service      | 与请求匹配的 route 的 `service_id`。当路由缺少 service_id 时,则默认为 
`$host`。 |
-    | consumer     | 与请求匹配的 consumer 的 `consumer_name`。未匹配,则默认为空字符串。 |
-    | node         | 命中的 upstream 节点 `ip`。|
+    | 名称          |    描述                                                      
                 |
+    | -------------| 
----------------------------------------------------------------------------- |
+    | code         | 上游服务返回的 HTTP 状态码。                                         
           |
+    | route        | 与请求匹配的路由 的 `route_id`,如果未匹配,则默认为空字符串。                     
|

Review Comment:
   ```suggestion
       | route        | 与请求匹配的路由的 `route_id`,如果未匹配,则默认为空字符串。                    
 |
   ```



##########
docs/zh/latest/plugins/prometheus.md:
##########
@@ -23,50 +29,71 @@ title: prometheus
 
 ## 描述
 
-此插件是提供符合 prometheus 数据格式的监控指标数据。
+`prometheus` 插件以 
[Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/#exposition-formats)
 规定的格式上报指标到 Prometheus 中。

Review Comment:
   ```suggestion
   该插件以 [Prometheus 
文档](https://prometheus.io/docs/instrumenting/exposition_formats/#exposition-formats)
 规定的格式上报指标到 Prometheus 中。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to