Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Logging SDK not applying quota limits for project set using quotaProjectId #1125

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

losalex
Copy link
Contributor

@losalex losalex commented Oct 7, 2022

Customer uses google-cloud-logging SDK to fetch audit logs from their customers. Since they were facing lot of throttling error's because of the quota limitation's set at the service account, they decided to make use of the quotaProjectId field available while creating the Logging object (LoggingOptions Builder). But even after setting this field they see that quota is counted against the service account (Supplied via credentials) instead of the actual project for which call is being made.
The sample code used:

LoggingOptions.newBuilder()
    .setProjectId("project-id")
    .setCredentials()
    .setQuotaProjectId("quota-project-id")
    .build()
    .getService();

@losalex losalex requested review from a team as code owners October 7, 2022 18:22
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: logging Issues related to the googleapis/java-logging API. labels Oct 7, 2022
@losalex losalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 7, 2022
@losalex losalex merged commit 70fc6ee into main Oct 7, 2022
@losalex losalex deleted the losalex/fix-quota-pid branch October 7, 2022 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants