census-instrumentation / opencensus-go

A stats collection and distributed tracing framework
http://opencensus.io
Apache License 2.0
2.06k stars 327 forks source link

exporter/jaeger: Links are missing LinkType #971

Open odeke-em opened 5 years ago

odeke-em commented 5 years ago

We need the ability to translate a span's LinkType to a jaeger RefType.

It currently is https://github.com/census-instrumentation/opencensus-go/blob/94fd1d08391b28f9c9f721b2a67fcf57bfd0a70e/exporter/jaeger/jaeger.go#L214-L220

But needs to translate *SpanData.Links[].Type i.e.

for _, link := range data.Links { 
    refs = append(refs, &gen.SpanRef{ 
        TraceIdHigh: bytesToInt64(link.TraceID[0:8]), 
        TraceIdLow:  bytesToInt64(link.TraceID[8:16]), 
        SpanId:      bytesToInt64(link.SpanID[:]), 
                 RefType: asJaegerLinkType(link.Type),
    }) 
 } 

func asJaegerLinkType(t LinkTypeChild) SpanRefType {
        if t == LinkTypeChild {
           return gen.SpanRefType_CHILD_OF
        }
        // Other OpenCensus LinkTypes don't map to Jaeger's LinkTypes
        // TODO: file an issue with Jaeger and ask about the various LinkTypes
        return gen.SpanRefType_FOLLOWS_FROM
} 
rajcspsg commented 4 years ago

@rghetia Shall I take up this issue?

rghetia commented 4 years ago

@rghetia Shall I take up this issue?

sure.

djui commented 4 years ago

Is this issue still of interest?

rajcspsg commented 4 years ago

@djui Yeah But I couldn't find the file jaeger.go in master branch. Any idea on this?

kaustubhmallik commented 2 years ago

Hi @rghetia is it still relevant and ready to be picked. If yes, I would love to take it up.

punya commented 2 years ago

@kaustubhmallik I would recommend getting involved in OpenTelemetry instead.