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) }