-
Notifications
You must be signed in to change notification settings - Fork 1.5k
pubsub: panic when using tracing due to nil Span interface #14277
Copy link
Copy link
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
PubSub v2.4.0
Environment
Go v1.25.8
Code and Dependencies
Expected behavior
No panics in the pubsub library.
Actual behavior
Nil interface panic when the v2 subscriber calls
ccSpan.End().This started happening after the client had been running for a while.
This happens because
ccSpanis never assigned wheniter.activeSpans.Load(ackh.ackID)returns false.google-cloud-go/pubsub/v2/subscriber.go
Lines 406 to 428 in 2507934