Skip to content

Commit

Permalink
Update consumers/tracing/consumers.go
Browse files Browse the repository at this point in the history
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
  • Loading branch information
SammyOina and rodneyosodo committed May 2, 2023
1 parent 014e3d4 commit c34ea34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consumers/tracing/consumers.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (tm *tracingMiddlewareAsync) Errors() <-chan error {
func createMessageSpan(ctx context.Context, tracer opentracing.Tracer, topic, subTopic, publisher, operation string) opentracing.Span {
span, _ := opentracing.StartSpanFromContextWithTracer(ctx, tracer, operation)
span.SetTag("topic", topic)
span.SetTag("sub-topic", subTopic)
if subTopic != "" {
span.SetTag("sub-topic", subTopic)
}
span.SetTag("publisher", publisher)
return span
}

0 comments on commit c34ea34

Please sign in to comment.