Firstsawyou commented on a change in pull request #3494:
URL: https://github.com/apache/apisix/pull/3494#discussion_r568509007



##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana 
official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not 
match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not 
match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |

Review comment:
       Yes, the description here is inappropriate.

##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana 
official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not 
match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not 
match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |

Review comment:
       updated.

##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana 
official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not 
match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not 
match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If 
it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |
+
 * `Bandwidth`: Total Bandwidth (egress/ingress) flowing through apisix. This 
metric is available per service and as a sum across all services.
+
+    Attributes:
+
+    | Name         | Description |
+    | -------------| ------------- |
+    | type         | The type of bandwidth(egress/ingress). |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |

Review comment:
       updated.

##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana 
official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are 
available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not 
match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not 
match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If 
it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |
+
 * `Bandwidth`: Total Bandwidth (egress/ingress) flowing through apisix. This 
metric is available per service and as a sum across all services.
+
+    Attributes:
+
+    | Name         | Description |
+    | -------------| ------------- |
+    | type         | The type of bandwidth(egress/ingress). |
+    | route        | The route_id of the request to match the route. If it 
does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it 
does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If 
it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |

Review comment:
       updated.

##########
File path: doc/zh-cn/plugins/prometheus.md
##########
@@ -120,12 +120,49 @@ plugin_attr:
 
 ### 可有的指标
 
-* `Status codes`: upstream 服务返回的 HTTP 状态码,每个服务返回状态码的次数或者所有服务的状态码次数总和都可以统计到。
-* `Bandwidth`: 流经apisix的总带宽(可分出口带宽和入口带宽). 每个服务指标或者是所有服务指标的总和都可以统计到。
+* `Status`: upstream 服务返回的 HTTP 状态码,每个服务返回状态码的次数或者所有服务的状态码次数总和都可以统计到。具有的维度:
+
+    | 名称          |    描述             |
+    | -------------| --------------------|
+    | code         | upstream 服务返回的 HTTP 状态码。 |
+    | route        | 请求匹配的 route 的 `route_id`,未匹配,则默认为`""`。 |

Review comment:
       Yes, in the case of no matching route, the default value is an empty 
string.
   
   like this:
   
   ```
   
apisix_http_status{code="404",route="",matched_uri="",matched_host="",service="127.0.0.1",consumer="",node=""}
 1
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to