Skip to content

fix: support quota_project in ErrorReporting client#34610

Open
torreypayne wants to merge 7 commits into
mainfrom
fix-error-reporting-quota-project
Open

fix: support quota_project in ErrorReporting client#34610
torreypayne wants to merge 7 commits into
mainfrom
fix-error-reporting-quota-project

Conversation

@torreypayne

@torreypayne torreypayne commented Jun 11, 2026

Copy link
Copy Markdown
Member

Allows configuring quota_project explicitly in Google::Cloud::ErrorReporting.new and via configuration. This resolves issues where the default quota project from credentials is used but has the Error Reporting API disabled.

closes: #25862

====

manual testing logs:

irb(main):011> Google::Cloud::ErrorReporting.configure { |cfg| cfg.quota_project = 'global-billing-project' }
Key :pretty_print does not exist. Returning nil. at /usr/local/google/home/torreypayne/.gem/ruby/4.0.0/gems/pp-0.6.3/lib/pp.rb:212:in 'block (2 levels) in PP::PPMethods#pp'
=>
irb(main):012> er = Google::Cloud::ErrorReporting.new(project_id: "your-target-project")
=>
#<Google::Cloud::ErrorReporting::Project:0x00007f970b587d80
...
irb(main):013> # Verify it picked up the global configuration
irb(main):014> puts "Service Quota Project: #{er.service.quota_project}"
irb(main):015> puts "GRPC Quota Project: #{er.service.error_reporting.configure.quota_project}"
Service Quota Project: global-billing-project
GRPC Quota Project: global-billing-project
=> nil
irb(main):016> er = Google::Cloud::ErrorReporting.new(project_id: "your-target-project", quota_project: "your-billing-project")
=>
#<Google::Cloud::ErrorReporting::Project:0x00007f97083d6778
...
irb(main):017> # Verify it picked up the global configuration
irb(main):018> puts "Service Quota Project: #{er.service.quota_project}"
irb(main):019> puts "GRPC Quota Project: #{er.service.error_reporting.configure.quota_project}"
Service Quota Project: your-billing-project
GRPC Quota Project: your-billing-project
=> nil
irb(main):020> er = Google::Cloud::ErrorReporting.new(project_id: "your-target-project")
=>
#<Google::Cloud::ErrorReporting::Project:0x00007f9708442018
...
irb(main):021> # Verify it picked up the global configuration
irb(main):022> puts "Service Quota Project: #{er.service.quota_project}"
irb(main):023> puts "GRPC Quota Project: #{er.service.error_reporting.configure.quota_project}"
Service Quota Project: global-billing-project
GRPC Quota Project: global-billing-project

Torrey Payne added 2 commits June 11, 2026 18:10
Allows configuring quota_project explicitly in Google::Cloud::ErrorReporting.new
and via configuration. This resolves issues where the default quota project
from credentials is used but has the Error Reporting API disabled.
@torreypayne torreypayne marked this pull request as ready for review June 12, 2026 20:13
@torreypayne torreypayne requested review from a team and yoshi-approver as code owners June 12, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The project_id option of Google::Cloud::ErrorReporting.new does not work

1 participant