Determine the project used to export GCS+gRPC metrics #14112
Labels
api: storage
Issues related to the Cloud Storage API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
storage::ProjectIdOption
is set and not empty, use that.If theignore this, C++ does not work in GAEGAE_PROJECT
environment variable is set, use that.project_id
field from that file (if applicable).- https://google.aip.dev/auth/4112 for service account key files
- The field may exist in user credentials, and does not exist for external accounts
The Google Cloud SDK project IDignore for now. This is really difficult in C++, and only useful with user credentials, which are not expected to need metrics that often.computeMetadata/v1/project/project-id
from the VM metadataWe may be able to use the resource detector. OTOH, we need to add this functionality to the REST credentials. This will all require converting GUACs to REST credentials, performing one query and then discarding the infrastructure created to make the query.
The text was updated successfully, but these errors were encountered: