Open codefromthecrypt opened 7 years ago
I can confirm that currently there is no error added on an http error status. I think this issue is part of a bigger story to give more flexibility to users to override default behaviors without having to re-code part of the middleware.
I think this issue is part of a bigger story to give more flexibility to users to override default behaviors without having to re-code part of the middleware.
I'd suggest it isn't :) error code defaults help with dependency links as otherwise http 500 will not increment error count. Most in brave for example don't override this eventhough they can. making non-success error by default is a.. good default.
Separately, agree we can work on customization, but I'd suggest this is a good default regardless of that.
Sounds good to me !
Now that zipkin-dependencies adds errorCount, it might help to see what others are doing for "error". Notably, I think here we are already adding error on an exception. What might not be happening here is an error for http error status. Here's logic we use in Brave, which might be helpful to see if things are consistent or not.
Note: the above is just a default