go-zero
go-zero copied to clipboard
feat(prometheus): added and impl metrics pusher to push metrics to `prometheus pushgateway`
trafficstars
help me to code review, plz~ @kevwan
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.08%. Comparing base (
8690859) to head (b4641be). Report is 49 commits behind head on master.
Additional details and impacted files
What's the purpose of this PR?
What's the purpose of this PR?
- In some scenarios, it is not convenient for the app to directly connect with the Prometheus server.
- Some jobs have a short life cycle and do not have enough time to wait for Prometheus Server pull data. So you can push the data to Pushgateway first, and then let Prometheus Server pull it.