Go 通过队列发送哨兵追踪

Go 通过队列发送哨兵追踪,go,trace,sentry,distributed-tracing,Go,Trace,Sentry,Distributed Tracing,有两个服务是用Go编写的。第一个将一些事件写入兔子队列,第二个从该队列读取并处理消息。 我想追踪哨兵中每条信息的生命周期。在第一次服务方面,这是基本完成的。但是我如何通过队列? 如果使用开放式跟踪解决相同的问题,那么一切都很简单: span:=tracer.StartSpan(“第一个”) 载体:=opentracing.TextMapCarrier{} span.Tracer().Inject(span.Context(),opentracing.TextMap,carrier) 第二个(运营

有两个服务是用Go编写的。第一个将一些事件写入兔子队列,第二个从该队列读取并处理消息。
我想追踪哨兵中每条信息的生命周期。在第一次服务方面,这是基本完成的。但是我如何通过队列?
如果使用开放式跟踪解决相同的问题,那么一切都很简单:

span:=tracer.StartSpan(“第一个”)
载体:=opentracing.TextMapCarrier{}
span.Tracer().Inject(span.Context(),opentracing.TextMap,carrier)
第二个(运营商[“uber跟踪id”])
func秒(令牌字符串){
载体:=opentracing.TextMapCarrier{}
carrier.Set(“uber跟踪id”,令牌)
ctx,:=opentracing.GlobalTracer().Extract(opentracing.TextMap,carrier)
span:=opentracing.StartSpan(“第二个”,opentracing.FollowsFrom(ctx))
span.Tracer().Inject(span.Context(),opentracing.TextMap,carrier)
但我不明白在使用sentry的情况下,如何创建在第二个服务中继承的对象