Closed Amiedeep closed 4 years ago
Thanks, this does make sense to add. Should there be a corresponding change in the README files?
I am considering adding a note section after the running instructions on the error span. It could be a separate section or skipped altogether. Thoughts?
I would add a sub-section Handling Errors
under Instrumenting the Client
, something like this:
Since we turned our single-binary program into a distributed application that makes remote calls, we need to handle errors that may occur during communications. It is a good practice to tag the span with the tag
error=true
if the operation represented by this span failed. We use one of the standard helpers defined in theext
package in the OpenTracing API for Go:
import "github.com/opentracing/opentracing-go/ext"
resp, err := xhttp.Do(req)
if err != nil {
ext.Error.Set(span, true)
panic(err.Error())
}
Code pushed for all the services except csharp
. I am facing few issues on csharp side and will need some help. @yurishkuro
When either publisher or formatter are not running - the examples doesn't report error span. Reporting error spans is a good feature of Jaeger and should be highlighted in the tutorial. I added error spans for go tutorial for now, if it looks good, I will go ahead and do same for other services, and will update readme as well.