kratos icon indicating copy to clipboard operation
kratos copied to clipboard

feat: add tracing handlerErrorFunc

Open eiixy opened this issue 2 years ago • 1 comments

Description (what this PR does / why we need it):

  1. 我们希望在链路追踪可以自定义 error 的处理流程,比如在我们的认知中只有 status_code >= 500 的请求才需要记录为错误请求,而目前记录了很多 401 的请求也被归到了错误请求中

eiixy avatar Jun 01 '22 07:06 eiixy

Codecov Report

Merging #2070 (d6777f1) into main (5de1f08) will increase coverage by 0.03%. The diff coverage is 64.28%.

:exclamation: Current head d6777f1 differs from pull request most recent head 801bba4. Consider uploading reports for the commit 801bba4 to get more accurate results

@@            Coverage Diff             @@
##             main    #2070      +/-   ##
==========================================
+ Coverage   79.10%   79.13%   +0.03%     
==========================================
  Files          82       82              
  Lines        3656     3662       +6     
==========================================
+ Hits         2892     2898       +6     
  Misses        554      554              
  Partials      210      210              
Impacted Files Coverage Δ
middleware/tracing/tracing.go 89.36% <54.54%> (-10.64%) :arrow_down:
middleware/tracing/tracer.go 78.78% <100.00%> (+10.36%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5de1f08...801bba4. Read the comment docs.

codecov-commenter avatar Jun 01 '22 09:06 codecov-commenter