Skip to content

Commit 43f12dd

Browse files
committed
Add option to configure quota project ID
1 parent c00f094 commit 43f12dd

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

gcp-auth-extension/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ Here is a list of configurable options for the extension:
3636

3737
- `GOOGLE_CLOUD_PROJECT`: Environment variable that represents the Google Cloud Project ID to which the telemetry needs to be exported.
3838
- Can also be configured using `google.cloud.project` system property.
39-
- If this option is not configured, the extension would infer GCP Project ID from the application default credentials. For more information on application default credentials, see [here](https://cloud.google.com/docs/authentication/application-default-credentials).
39+
- This is a required option, the telemetry export to GCP will fail.
40+
- `GOOGLE_CLOUD_QUOTA_PROJECT`: Environment variable that represents the Google Cloud Quota Project ID which will be charged for the GCP API usage. To learn more about a *quota project*, see [here](https://cloud.google.com/docs/quotas/quota-project).
41+
- Can also be configured using `google.cloud.quota.project` system property.
42+
- If this option is not configured, the extension would infer GCP Quota Project ID from the application default credentials. For more information on application default credentials, see [here](https://cloud.google.com/docs/authentication/application-default-credentials).
4043

4144
## Usage
4245

gcp-auth-extension/src/main/java/io/opentelemetry/contrib/gcp/auth/ConfigurableOption.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@ public enum ConfigurableOption {
1818
* Represents the Google Cloud Project ID option. Can be configured using the environment variable
1919
* `GOOGLE_CLOUD_PROJECT` or the system property `google.cloud.project`.
2020
*/
21-
GOOGLE_CLOUD_PROJECT("Google Cloud Project ID");
21+
GOOGLE_CLOUD_PROJECT("Google Cloud Project ID"),
22+
23+
/**
24+
* Represents the Google Cloud Quota Project ID option. Can be configured using the environment
25+
* variable `GOOGLE_CLOUD_QUOTA_PROJECT` or the system property `google.cloud.quota.project`. The
26+
* quota project is the project that is used for quota management and billing for the API usage.
27+
*
28+
* <p>The environment variable name is selected to be consistent with the <a
29+
* href="https://cloud.google.com/docs/quotas/set-quota-project">official GCP client
30+
* libraries</a>.
31+
*/
32+
GOOGLE_CLOUD_QUOTA_PROJECT("Google Cloud Quota Project ID");
2233

2334
private final String userReadableName;
2435
private final String environmentVariableName;

0 commit comments

Comments
 (0)