You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Garry24 (via GitHub)" <gi...@apache.org> on 2023/04/18 06:06:05 UTC

[GitHub] [apisix] Garry24 opened a new issue, #9324: how to export uri in prometheus metrics when there is not matched route (404 route not found)?

Garry24 opened a new issue, #9324:
URL: https://github.com/apache/apisix/issues/9324

   ### Description
   
   When making a request to apisix, if the requested URI matches a route, the `matched_uri` can be seen in the `apisix_http_status ` metric exposed by Prometheus.  e.g.
   >"apisix_http_status{code="200", container="apisix", instance="xxxxx:9091", matched_uri="/foo/bar", namespace="apisix", node="xxxx", pod="apisix-server-smw5t", route="foo-bar-route", service="foo-bar-service"}"
   
   
   However, when the request does not match any route and results in a 404 error, the requested URI causing the error will not be recorded in the `apisix_http_status` metric.
   
   How can I get 404 uri from prometheus metrics?
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.15.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.

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

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


[GitHub] [apisix] Garry24 commented on issue #9324: how to export uri in prometheus metrics when there is not matched route (404 route not found)?

Posted by "Garry24 (via GitHub)" <gi...@apache.org>.
Garry24 commented on issue #9324:
URL: https://github.com/apache/apisix/issues/9324#issuecomment-1517586524

   sorry, I just got empty `matched_uri` value when has 404 eror.
   
   
   https://github.com/apache/apisix/blob/0b848acd5a10dfabe9227ff555f8578297f29e5d/apisix/plugins/prometheus/exporter.lua#L205


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


Re: [I] how to export uri in prometheus metrics when there is not matched route (404 route not found)? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9324: how to export uri in prometheus metrics when there is not matched route (404 route not found)?
URL: https://github.com/apache/apisix/issues/9324


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


Re: [I] how to export uri in prometheus metrics when there is not matched route (404 route not found)? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9324:
URL: https://github.com/apache/apisix/issues/9324#issuecomment-2067625345

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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] tao12345666333 commented on issue #9324: how to export uri in prometheus metrics when there is not matched route (404 route not found)?

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on issue #9324:
URL: https://github.com/apache/apisix/issues/9324#issuecomment-1514041819

   It's already included.
   
   FYI
   
   https://github.com/apache/apisix/blob/abcb49e019e7bbd5ceb7cba2c71ef4c4119bdc45/t/plugin/prometheus2.t#L285-L289


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


Re: [I] how to export uri in prometheus metrics when there is not matched route (404 route not found)? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9324:
URL: https://github.com/apache/apisix/issues/9324#issuecomment-2041036892

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


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