Add pubsub.subscription to GCP pubsub pull subsciptions#7446
Add pubsub.subscription to GCP pubsub pull subsciptions#7446
pubsub.subscription to GCP pubsub pull subsciptions#7446Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7446 +/- ##
==========================================
- Coverage 80.33% 79.59% -0.75%
==========================================
Files 731 730 -1
Lines 31093 30983 -110
==========================================
- Hits 24980 24660 -320
- Misses 6113 6323 +210 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fa81c20dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const meta = { | ||
| 'gcloud.project_id': subscription.pubsub.projectId, | ||
| 'pubsub.topic': topic, | ||
| 'pubsub.message_id': message.messageId, |
There was a problem hiding this comment.
Use pull message id field instead of messageId
For pull subscriptions, the Pub/Sub Message object exposes the server-assigned ID as message.id (this was what the code used before). Switching the tag to message.messageId means the tag will be undefined for standard pull messages, so pubsub.message_id stops being recorded and downstream correlation/debugging based on message ID is lost. This regression only affects pull subscriptions where the Message instance does not include a messageId alias.
Useful? React with 👍 / 👎.
Overall package sizeSelf size: 4.58 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 813.08 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2026-02-06 22:46:09 Comparing candidate commit 085eaf6 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 229 metrics, 31 unstable metrics. |
| await publish(topic, { data: Buffer.from('hello') }) | ||
| return expectedSpanPromise | ||
| await expectedSpanPromise | ||
| await tagsVerificationPromise |
There was a problem hiding this comment.
| await publish(topic, { data: Buffer.from('hello') }) | |
| return expectedSpanPromise | |
| await expectedSpanPromise | |
| await tagsVerificationPromise | |
| await Promise.all([ | |
| publish(topic, { data: Buffer.from('hello') }), | |
| expectedSpanPromise, | |
| tagsVerificationPromise, | |
| ]) |
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
What does this PR do?
follow up to #6260 Add
pubsub.subscriptionto GCP pubsub pull subscriptions span tags for related resources tab in the serverless UI. This will allow pubsub metrics to be correlated to the Cloud Run services being triggered (as shown in org 2 here)Motivation
Additional Notes