Closed surenraju-careem closed 3 months ago
hello @surenraju-careem , thank you for opening this issue.
I believe the behavior you describe is expected, some metrics are intentionally not incremented when no route/service is matched, including the http_requests_total
, which are intended to count requests by status code "returned by upstream services" as documented.
Changing this behavior would be considered a feature, which we may consider for implementation based on demand and availability. If you would like to open a pull request to support this we would be more than happy to review it.
Let me know if you have any doubts, thank you!
This issue is marked as stale because it has been open for 14 days with no activity.
Dear contributor,
We are automatically closing this issue because it has not seen any activity for three weeks. We're sorry that your issue could not be resolved. If any new information comes up that could help resolving it, please feel free to reopen it.
Your contribution is greatly appreciated!
Please have a look our pledge to the community for more information.
Sincerely, Your Kong Gateway team
Is there an existing issue for this?
Kong version (
$ kong version
)3.6.1
Current Behavior
When we enable the Prometheus plugin globally, and the proxy returns 404 response codes, the Prometheus plugin does not log the 404 status codes.
This gives us no way to monitor for 404 errors that could be caused by scenarios such as invalid configurations pushed to Kong, resulting in the Kong proxy rejecting all requests.
Expected Behavior
Prometheus metric endpoint records 404 response codes
Steps To Reproduce
Declarative config(
declarative/kong.yaml
):Docker Compose:
Generate some random traffic
http://localhost:8000/random
that makes kong return404
, the hithttp://localhost:8001/metrics
, you will see no404
reported by prometheus plugin.