Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented Feb 25, 2022

Change the metadata decorators to inject x-goog-user-project from the
current option span.

For the admin APIs, use the per-call options to configure a span in the
*Client class. For pubsub::Publisher and pubsub::Subscriber it is
less clear which call "triggers" an RPC, and far less clear how to merge
options from multiple RPCs. I have decided to use the per-connection
options in this case. We can always add more fine-grained options later,
but this takes care of the common case.

Part of the work for #8284 and will help with #3317


This change is Reviewable

Change the metadata decorators to inject `x-goog-user-project` from the
current option span.

For the admin APIs, use the per-call options to configure a span in the
`*Client` class.  For `pubsub::Publisher` and `pubsub::Subscriber` it is
less clear which call "triggers" an RPC, and far less clear how to merge
options from multiple RPCs.  I have decided to use the per-connection
options in this case. We can always add more fine-grained options later,
but this takes care of the common case.
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Feb 25, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: c264a37a9e11acb59478b8ebf7a1f5719b68ef65

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #8456 (4701781) into main (d8c41eb) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8456      +/-   ##
==========================================
+ Coverage   93.84%   93.87%   +0.02%     
==========================================
  Files        1444     1444              
  Lines      124227   124611     +384     
==========================================
+ Hits       116583   116974     +391     
+ Misses       7644     7637       -7     
Impacted Files Coverage Δ
google/cloud/pubsub/internal/default_batch_sink.cc 100.00% <100.00%> (ø)
google/cloud/pubsub/internal/default_batch_sink.h 100.00% <100.00%> (ø)
google/cloud/pubsub/internal/publisher_metadata.cc 100.00% <100.00%> (ø)
...e/cloud/pubsub/internal/publisher_metadata_test.cc 100.00% <100.00%> (ø)
google/cloud/pubsub/internal/schema_metadata.cc 100.00% <100.00%> (ø)
...ogle/cloud/pubsub/internal/schema_metadata_test.cc 100.00% <100.00%> (ø)
...ub/internal/streaming_subscription_batch_source.cc 97.81% <100.00%> (+0.05%) ⬆️
...sub/internal/streaming_subscription_batch_source.h 100.00% <100.00%> (ø)
...oogle/cloud/pubsub/internal/subscriber_metadata.cc 100.00% <100.00%> (ø)
.../cloud/pubsub/internal/subscriber_metadata_test.cc 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8c41eb...4701781. Read the comment docs.

@coryan coryan marked this pull request as ready for review February 25, 2022 21:14
@coryan coryan requested a review from a team as a code owner February 25, 2022 21:14
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 47017816a50a951f9a7fafedb3a73ad7571d0be2

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan enabled auto-merge (squash) February 25, 2022 22:54
@coryan coryan merged commit a528fcf into googleapis:main Feb 25, 2022
@coryan coryan deleted the feat-pubsub-support-x-goog-user-project branch February 25, 2022 23:11
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.

3 participants