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 2020/10/19 08:42:54 UTC

[GitHub] [apisix] imjoey opened a new pull request #2469: feat(prometheus): Add consumer metric data support

imjoey opened a new pull request #2469:
URL: https://github.com/apache/apisix/pull/2469


   Signed-off-by: imjoey <ma...@gmail.com>
   
   ### What this PR does / why we need it:
   
   Fixes #2445 .
   
   This PR is going to add `consumer` label for metric items. Based on this, we could trigger/send notifications to specified consumer when http status is unexpected, as well as get the estimated data about different consumers for several metrics.
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [] Have you modified the corresponding document?
   * [x] Is this PR backward compatible?
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] liuxiran merged pull request #2469: feat(prometheus): Add consumer metric data support

Posted by GitBox <gi...@apache.org>.
liuxiran merged pull request #2469:
URL: https://github.com/apache/apisix/pull/2469


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] imjoey commented on a change in pull request #2469: feat(prometheus): Add consumer metric data support

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



##########
File path: apisix/plugins/prometheus/exporter.lua
##########
@@ -95,23 +95,23 @@ function _M.init()
             "Etcd modify index for APISIX keys",
             {"key"})
 
-    -- per service
+    -- per service and consumer
     metrics.status = prometheus:counter("http_status",
             "HTTP status codes per service in APISIX",
-            {"code", "route", "service", "node"})
+            {"code", "route", "service", "consumer", "node"})

Review comment:
       @liuxiran more detailed comment is added, thanks for your suggestions.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] liuxiran commented on a change in pull request #2469: feat(prometheus): Add consumer metric data support

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



##########
File path: apisix/plugins/prometheus/exporter.lua
##########
@@ -95,23 +95,23 @@ function _M.init()
             "Etcd modify index for APISIX keys",
             {"key"})
 
-    -- per service
+    -- per service and consumer
     metrics.status = prometheus:counter("http_status",
             "HTTP status codes per service in APISIX",
-            {"code", "route", "service", "node"})
+            {"code", "route", "service", "consumer", "node"})

Review comment:
       Perhaps more code comments are better for new comer just like me to understand codes :)




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] imjoey commented on pull request #2469: feat(prometheus): Add consumer metric data support

Posted by GitBox <gi...@apache.org>.
imjoey commented on pull request #2469:
URL: https://github.com/apache/apisix/pull/2469#issuecomment-712104842


   ping @membphis @nic-chen @liuxiran for reviewing. Many thanks.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] liuxiran commented on pull request #2469: feat(prometheus): Add consumer metric data support

Posted by GitBox <gi...@apache.org>.
liuxiran commented on pull request #2469:
URL: https://github.com/apache/apisix/pull/2469#issuecomment-713235011


   Merge it now :)


----------------------------------------------------------------
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:
users@infra.apache.org