Skip to content

fix(pubsub/v2): fix span linking and add missing attributes#14326

Merged
hongalex merged 3 commits intogoogleapis:mainfrom
hongalex:fix-pubsub-v2-trace-attributes
Apr 13, 2026
Merged

fix(pubsub/v2): fix span linking and add missing attributes#14326
hongalex merged 3 commits intogoogleapis:mainfrom
hongalex:fix-pubsub-v2-trace-attributes

Conversation

@hongalex
Copy link
Copy Markdown
Member

@hongalex hongalex commented Apr 1, 2026

This PR addresses the following

  1. the subscribe span kind should be INTERNAL
  2. the process span kind should be CONSUMER
  3. Add gcp.resource.name to spans

@hongalex hongalex requested review from a team as code owners April 1, 2026 18:39
@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors OpenTelemetry tracing in the Pub/Sub v2 client to include full resource names in span attributes and adjust span kinds for better compliance with messaging conventions. Key changes include updating attribute helper functions to handle resource names and enhancing the subscriber's process span. A review comment points out that getProcessSpanAttributes should explicitly set the span kind to CONSUMER to align with the PR's objectives and the updated test cases.

Comment thread pubsub/v2/trace.go
@hongalex hongalex merged commit ec20708 into googleapis:main Apr 13, 2026
11 checks passed
@hongalex hongalex deleted the fix-pubsub-v2-trace-attributes branch April 13, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants