opencensus-service
opencensus-service copied to clipboard
Status is dropped when translating spans to Jaeger TChannel spans
The status field and its message is not added to the spans as tags while translating the spans from the OpenCensus span format to TChannel span format at translator/trace/jaeger/protospan_to_jaegerthrift.go#L148.
This is done correctly in protospan_to_jaegerproto.go and Jaeger exporter for OpenCensus.
Thanks for reporting @asutoshpalai. /cc @owais
We should have a fix for this in a few days @asutoshpalai
@owais Have you started working on this? If not, can I please pick this up?
@asutoshpalai Yes, I'm almost done with it. Will submit a patch in a couple of days.
I was going through the code of jaegerproto, it looks like they don't set error tag when the status is not OK. This is not consistent with the behavior of Jaeger exporter for OpenCensus which does that, census-ecosystem/opencensus-go-exporter-jaeger/blob/master/jaeger.go#L217.
Ref: census-instrumentation/opencensus-go#1041
I would really appreciate it if @owais can include that in his fix for thrift protocol too.
One important observation here: the behavior on opencensus-go is not the recommended one for OpenTracing (which Jaeger follows). The error tag should be explictly set by the caller code. I had mentioned this on the opencensus-go repo and this was recently changed on java client library. Relevant link:
https://github.com/census-instrumentation/opencensus-java/pull/1928#issuecomment-500670685
We have a PR for OT here: https://github.com/open-telemetry/opentelemetry-service/pull/70
Once it is accepted there, I'll back-port the fix to OC.
We've merged it to OT. Will try to backport here later this week.