zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.42k stars 3.97k forks source link

feat(httpc): added `MetricsInterceptor` in `DoRequest` #4291

Open Suyghur opened 4 months ago

Suyghur commented 4 months ago

until now, MetricsInterceptor not used in httpc.

help to code review, plz~

@kevwan

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.11%. Comparing base (8690859) to head (f1d8a19). Report is 159 commits behind head on master.

Additional details and impacted files | [Files with missing lines](https://app.codecov.io/gh/zeromicro/go-zero/pull/4291?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro) | Coverage Δ | | |---|---|---| | [rest/httpc/requests.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4291?src=pr&el=tree&filepath=rest%2Fhttpc%2Frequests.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-cmVzdC9odHRwYy9yZXF1ZXN0cy5nbw==) | `100.00% <100.00%> (ø)` | | | [rest/httpc/service.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4291?src=pr&el=tree&filepath=rest%2Fhttpc%2Fservice.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-cmVzdC9odHRwYy9zZXJ2aWNlLmdv) | `100.00% <100.00%> (ø)` | | ... and [253 files with indirect coverage changes](https://app.codecov.io/gh/zeromicro/go-zero/pull/4291/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro)