alibaba / sentinel-golang

Sentinel Go enables reliability and resiliency for Go microservices
https://sentinelguard.io/
Apache License 2.0
2.77k stars 437 forks source link

feat: add biz-defined error counter #495

Closed ansiz closed 1 year ago

ansiz commented 1 year ago

Describe what this PR does / why we need it

原来的MetricEvent中包含了MetricEventError用于记录错误,我们之前也一直用这个Metric记录所有的错误,但现在业务希望将一些自定义错误和RPC调用错误区别开,例如RPC请求成功了但是返回了特定的响应值或者RT超过特定阈值定义为业务错误,而RPC调用失败/超时等定义为RPC错误。

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews