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/02/25 08:45:04 UTC

[GitHub] [apisix] dmsolr opened a new pull request #6450: WIP feat: support customizing additional labels of metrics

dmsolr opened a new pull request #6450:
URL: https://github.com/apache/apisix/pull/6450


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the PR manners:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. If you need to resolve merge conflicts after the PR is reviewed, please merge master but do not rebase
   6. Use "request review" to notify the reviewer once you have resolved the review
   7. Only reviewer can click "Resolve conversation" to mark the reviewer's review resolved
   -->
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   
   #4273 


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



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

Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on a change in pull request #6450:
URL: https://github.com/apache/apisix/pull/6450#discussion_r815720657



##########
File path: conf/config-default.yaml
##########
@@ -438,6 +438,9 @@ plugin_attr:
     export_addr:
       ip: 127.0.0.1
       port: 9091
+        #    labels:
+        #remote_addr: $remote_addr
+        #request_method: $request_method

Review comment:
       This function is useful for us. we add metrics too on our code as hard code way.
   Can you list lables or give a link which labels are support ? 




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



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

Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on a change in pull request #6450:
URL: https://github.com/apache/apisix/pull/6450#discussion_r815720657



##########
File path: conf/config-default.yaml
##########
@@ -438,6 +438,9 @@ plugin_attr:
     export_addr:
       ip: 127.0.0.1
       port: 9091
+        #    labels:
+        #remote_addr: $remote_addr
+        #request_method: $request_method

Review comment:
       This function is useful for us. we add metrics too on our code as hard code way.
   Can you list lables or give a link which labels are support on doc ? 




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



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

Posted by GitBox <gi...@apache.org>.
zhendongcmss commented on a change in pull request #6450:
URL: https://github.com/apache/apisix/pull/6450#discussion_r815720657



##########
File path: conf/config-default.yaml
##########
@@ -438,6 +438,9 @@ plugin_attr:
     export_addr:
       ip: 127.0.0.1
       port: 9091
+        #    labels:
+        #remote_addr: $remote_addr
+        #request_method: $request_method

Review comment:
       This function is userful for us. we add metrics too on our code as hard code way.
   Can you list ot give a link which labels are support ? 




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



[GitHub] [apisix] dmsolr closed pull request #6450: WIP feat: support customizing additional labels of metrics

Posted by GitBox <gi...@apache.org>.
dmsolr closed pull request #6450:
URL: https://github.com/apache/apisix/pull/6450


   


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



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

Posted by GitBox <gi...@apache.org>.
starsz commented on a change in pull request #6450:
URL: https://github.com/apache/apisix/pull/6450#discussion_r817708803



##########
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:
       亚马尔 ??
   Maybe `yaml" ?




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



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

Posted by GitBox <gi...@apache.org>.
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