Skip to content

Commit

Permalink
Create nack span even if there are no sampled subscribe span
Browse files Browse the repository at this point in the history
  • Loading branch information
mukund-ananthu committed Sep 24, 2024
1 parent 5dd8fb8 commit b4fdd40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/pubsub_v1/subscriber/_protocol/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def modify_ack_deadline(
)
subscribe_spans.append(subscribe_span)
nack_span: Optional[trace.Span] = None
if subscription_id and project_id and len(subscribe_links) > 0:
if subscription_id and project_id:
nack_span = start_nack_span(
subscription_id,
len(ack_reqs_dict),
Expand Down Expand Up @@ -588,7 +588,7 @@ def _retry_modacks(self, requests_to_retry):
)
subscribe_spans.append(subscribe_span)
nack_span = None
if subscription_id and project_id and len(subscribe_links) > 0:
if subscription_id and project_id:
nack_span = start_nack_span(
subscription_id,
len(ack_reqs_dict),
Expand Down

0 comments on commit b4fdd40

Please sign in to comment.