Skip to content

Commit

Permalink
Address code style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickey Reiss committed Oct 8, 2020
1 parent f306fee commit be94264
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions contrib/cloud.google.com/go/pubsub.v1/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit be94264

Please sign in to comment.