zadig
zadig copied to clipboard
WIP: add prometheus metrics for services
This commit is a proof of concept, each service need to modify its own
Roter init function.
In NewRouter function, inits the ResponseTime for its
namespace(service).
These services will have /metrics
API for prometheus to pull metrics
from them, instead of push metrics to prometheus.
And this is not tested yet.
What this PR does / Why we need it:
Add Prometheus metrics for services. Fixes #issues/755
What is changed and how it works?
- +
/metrics
API for prometheus to pull metrics - WIP/POC: collect response time for APIs.
Does this PR introduce a user-facing change?
- [√] API change
- [-] database schema change
- [-] behavioral change
- [√] change in non-functional attributes such as efficiency or availability
- [√] fix of a previous issue
This commit is a proof of concept, each service need to modify its own Roter init function.
In NewRouter function, inits the ResponseTime for its namespace(service).
These services will have /metrics
API for prometheus to pull metrics from them, instead of push metrics to prometheus.
long time no response, closed it for new Pull request.