背景
我有一个java服务器,它正在对go服务器进行RPC调用。java客户端和go rpc服务器使用lightstep进行检测。跟踪的所有内容看起来都很正常,除了lightstep中放置go rpc服务器跨度的位置之外。
java span有ts 1493929521325,在将请求发送到go服务器之前。go rpc服务器有两个时间戳: 1493929521326是接收请求并启动span时,1493929521336是响应并完成span之后。
问题
我希望UI在java span的右边具有水平的go span。相反,它离右很远。
我能想到的唯一可能原因是java代码使用的v0.10.1与go使用的v0.9.1之间不兼容。这有可能吗?你对可能的原因有什么想法吗?
go代码本质上是:
import (
lightstep "github.com/lightstep/lightstep-tracer-go"
opentracing "github.com/opentracing/opentracing-go"
)
tracer := lightstep.NewTracer(lightstep.Options{
AccessToken: ls.AccessToken,
Collector: lightstep.Endpoint{ls.Host, ls.Port, true},
Tags: map[string]interface{}{lightstep.ComponentNameKey: component},
})
spanContext, err := tracer.Extract(opentracing.TextMap, opentracing.TextMapCarrier(req.GetLightstepData()))
span = tracer.StartSpan(
endpoint,
opentracing.ChildOf(spanContext))
}
// handle the request
span.Finish()

发布于 2017-06-13 18:43:41
https://stackoverflow.com/questions/43796314
复制相似问题