opencensus-service icon indicating copy to clipboard operation
opencensus-service copied to clipboard

Status is dropped when translating spans to Jaeger TChannel spans

Open asutoshpalai opened this issue 6 years ago • 8 comments

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.

asutoshpalai avatar Jun 19 '19 21:06 asutoshpalai

Thanks for reporting @asutoshpalai. /cc @owais

pjanotti avatar Jun 19 '19 22:06 pjanotti

We should have a fix for this in a few days @asutoshpalai

owais avatar Jun 19 '19 22:06 owais

@owais Have you started working on this? If not, can I please pick this up?

asutoshpalai avatar Jun 26 '19 00:06 asutoshpalai

@asutoshpalai Yes, I'm almost done with it. Will submit a patch in a couple of days.

owais avatar Jun 26 '19 00:06 owais

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.

asutoshpalai avatar Jun 27 '19 22:06 asutoshpalai

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

pjanotti avatar Jun 27 '19 23:06 pjanotti

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.

owais avatar Jun 30 '19 09:06 owais

We've merged it to OT. Will try to backport here later this week.

owais avatar Jul 02 '19 22:07 owais