Kong / kong-plugin-prometheus

Prometheus plugin for Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Apache License 2.0
119 stars 57 forks source link

Enhancement: expose per-customer statuses, GET parameter value, url location #113

Closed samsk closed 3 years ago

samsk commented 3 years ago

Hello, first sorry, that this pull request cumulates more features, but they are all small, and we needed them before it was decided to upstream it.

New features:

All new features are off by default, so they should not affect existing systems until enabled. These new metrics make sense especially for people that don't want to setup/run/maintain additional log-collection/extraction system (like fluentd/splunk). With this they can still have at least basic insight about (per-consumer) usage of some services identified by URL param and/or URL location part. I've done basic tests, and performance degradation seems to be negligible, where maybe the most expensive part is the REGEXP extraction, but that is necessary to provide protection from metrics overpopulation.

I'll be happy to make any changes necessary to upstream this, if possible. Thank you ;-)

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

samsk commented 3 years ago

Ok, I'll split it, give me few days please. Yes, you might be right that something similar should be preferable done somewhere else, but everything else beyond this requires much much (much) more effort, either to implement tracing or do log analysis. This is cheap, plug&play solution, that can serve good for most of the use-cases.