4
如何记录并统计 API 的调用,异常,有没有免费的网关组件,求教
source link: https://www.v2ex.com/t/794352
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
最近我们竟让对接一些第三方的 API,但是这些 API 经常会出现问题,比如网络访问不可用,500 异常,请教下是否有开源免费的网关组件,可以记录,统计 API 的调用情况,最好能有个查看界面
4 条回复 • 2021-08-08 12:12:35 +08:00
0bit 8 小时 9 分钟前 1
简单版本是自己在调用时,包裹一层异常捕获,然后输出到 Sentry 或 Prometheus 之类的服务上( Prometheus 还得加 Grafana );
复杂的版本是用服务网格( Istio, Linkerd 2 ),然后捕获通信,再输出到 Prometheus;
一楼说的方法好像也很巧妙,写一个服务专门代理第三方请求,然后很方便的就能统计异常了。
复杂的版本是用服务网格( Istio, Linkerd 2 ),然后捕获通信,再输出到 Prometheus;
一楼说的方法好像也很巧妙,写一个服务专门代理第三方请求,然后很方便的就能统计异常了。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK