From be942643e87f25f633235cff77fca155228c7aa5 Mon Sep 17 00:00:00 2001 From: Mickey Reiss Date: Wed, 7 Oct 2020 19:33:26 -0500 Subject: [PATCH] Address code style nits --- contrib/cloud.google.com/go/pubsub.v1/pubsub.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/contrib/cloud.google.com/go/pubsub.v1/pubsub.go b/contrib/cloud.google.com/go/pubsub.v1/pubsub.go index b03b0ee183..1e63aa0aa5 100644 --- a/contrib/cloud.google.com/go/pubsub.v1/pubsub.go +++ b/contrib/cloud.google.com/go/pubsub.v1/pubsub.go @@ -65,7 +65,6 @@ func (r *PublishResult) Get(ctx context.Context) (string, error) { } type config struct { - // If set, overrides the trace's service name tag. serviceName string } @@ -100,16 +99,10 @@ func WrapReceiveHandler(s *pubsub.Subscription, f func(context.Context, *pubsub. tracer.Tag("publish_time", msg.PublishTime.String()), tracer.ChildOf(parentSpanCtx), } - if cfg.serviceName != "" { opts = append(opts, tracer.ServiceName(cfg.serviceName)) } - - span, ctx := tracer.StartSpanFromContext( - ctx, - "pubsub.receive", - opts..., - ) + span, ctx := tracer.StartSpanFromContext(ctx, "pubsub.receive", opts...) if msg.DeliveryAttempt != nil { span.SetTag("delivery_attempt", *msg.DeliveryAttempt) }