Hi!
I think it would be useful for the OpenTracing endpoint middleware (https://github.com/go-kit/kit/blob/master/tracing/opentracing/endpoint.go) to inspect the error returned by the next endpoint and set the error tag to true/false accordingly (it could also optionally set the error.object log field).
In addition to just inspecting the returned error it could also check if the response struct implements endpoint.Failer and apply the same logic.
If you think this would be useful I'd be happy to create a PR, just wanted to get your thoughts first.
Hi!
I think it would be useful for the OpenTracing endpoint middleware (https://github.com/go-kit/kit/blob/master/tracing/opentracing/endpoint.go) to inspect the
errorreturned by the next endpoint and set theerrortag to true/false accordingly (it could also optionally set theerror.objectlog field).In addition to just inspecting the returned
errorit could also check if theresponsestruct implementsendpoint.Failerand apply the same logic.If you think this would be useful I'd be happy to create a PR, just wanted to get your thoughts first.