There are two services written in Go. The first writes some events to the rabbit queue, the second reads from this queue and does some work on the messages.
I want to trace the life cycle of each message in sentry. On the side of the first service, this is done elementary. But how do I pass span through the queue?
If you solve the same problem using open tracing, then again everything is simple:
span := tracer.StartSpan("first")
carrier := opentracing.TextMapCarrier{}
span.Tracer().Inject(span.Context(), opentracing.TextMap, carrier)
second(carrier["uber-trace-id"])
func second(token string) {
carrier := opentracing.TextMapCarrier{}
carrier.Set("uber-trace-id", token)
ctx, _ := opentracing.GlobalTracer().Extract(opentracing.TextMap, carrier)
span := opentracing.StartSpan("second", opentracing.FollowsFrom(ctx))
span.Tracer().Inject(span.Context(), opentracing.TextMap, carrier)
But I can’t understand how you can create an object inherited in the second service in the case of using sentry