You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/03 01:28:04 UTC

[GitHub] [apisix] leslie-tsang commented on a change in pull request #6450: WIP feat: support customizing additional labels of metrics

leslie-tsang commented on a change in pull request #6450:
URL: https://github.com/apache/apisix/pull/6450#discussion_r818238870



##########
File path: docs/en/latest/plugins/prometheus.md
##########
@@ -129,10 +129,28 @@ Here is an example:
 
 ```yaml
 plugin_attr:
-  prometheus:
+prometheus:
     export_uri: /apisix/metrics
 ```
 
+## How to custom additional labels
+
+The plugin is supported to custom labels for metrics, `Status codes` and `Latency`, in the `plugin_attr` section of `conf/config.yaml`
+
+| Name       | Type   | Default | Description                       |
+| ---------- | ------ | ------- | --------------------------------- |
+| labels     | array  |         | custom labels from [Nginx variables](http://nginx.org/en/docs/varindex.html) |

Review comment:
       Better include the references to APISIX build-in variables  as well

##########
File path: docs/en/latest/plugins/prometheus.md
##########
@@ -129,10 +129,28 @@ Here is an example:
 
 ```yaml
 plugin_attr:
-  prometheus:
+prometheus:

Review comment:
       ```suggestion
     prometheus:
   ```
   There seems to be a mistake here.

##########
File path: docs/zh/latest/plugins/prometheus.md
##########
@@ -132,6 +132,24 @@ plugin_attr:
     export_uri: /apisix/metrics
 ```
 
+## 如何自定义附加标签
+
+该插件支持在`conf/config`的`plugin_attr`部分自定义度量标签`Status codes`和`Latency`。亚马尔`
+
+| 名称       | 类型   | 默认值   | 描述                       
+| --------- | ----- | -------- | ------------------------- |
+| labels    | array |          | 使用 [Nginx 变量](http://nginx.org/en/docs/varindex.html)作为自定义标签 |

Review comment:
       Ditto

##########
File path: docs/zh/latest/plugins/prometheus.md
##########
@@ -132,6 +132,24 @@ plugin_attr:
     export_uri: /apisix/metrics
 ```
 
+## 如何自定义附加标签
+
+该插件支持在`conf/config`的`plugin_attr`部分自定义度量标签`Status codes`和`Latency`。亚马尔`

Review comment:
       ```suggestion
   该插件支持在 `conf/config` 的 `plugin_attr` 部分自定义度量标签 `Status codes` 和 `Latency`。
   ```




-- 
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-unsubscribe@apisix.apache.org

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