diff options
author | Alex Hong <9397363+hongalex@users.noreply.github.com> | 2021-10-25 11:55:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 11:55:35 -0700 |
commit | cdf958864e278bb394cc548cb5f15ad08859f347 (patch) | |
tree | 22dbdd44fd4369637be56690543fdf3a17f8cabe | |
parent | 080edd168e7c269e0d5cbc0c206c67614e144a37 (diff) | |
download | google-cloud-go-cdf958864e278bb394cc548cb5f15ad08859f347.tar.gz |
fix(pubsub): tag ctx in iterator with subscription for opencensus (#5011)
-rw-r--r-- | pubsub/iterator.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pubsub/iterator.go b/pubsub/iterator.go index 0ad217184..a93eb3272 100644 --- a/pubsub/iterator.go +++ b/pubsub/iterator.go @@ -92,6 +92,7 @@ func newMessageIterator(subc *vkit.SubscriberClient, subName string, po *pullOpt nackTicker := time.NewTicker(100 * time.Millisecond) pingTicker := time.NewTicker(30 * time.Second) cctx, cancel := context.WithCancel(context.Background()) + cctx = withSubscriptionKey(cctx, subName) it := &messageIterator{ ctx: cctx, cancel: cancel, |