google-cloud-error_reporting 0.45.0 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2201078d06911124d3e59fd95dc8f8b323bffd8597b78cc3afc9e36852cf03eb
4
- data.tar.gz: 4e7816d1d0ff8d6ac44c1763a9cd1ad36a591444fb0564e0ed25389055b8173c
3
+ metadata.gz: 2d6dd0fd476822b1c166855b84d18b62d7b467809fbe8cdb3a11bdafa74439de
4
+ data.tar.gz: 75221540b9c57b93f7a6237744e757c24607dc420cabefa266bf2a45901abf2b
5
5
  SHA512:
6
- metadata.gz: 5beb6618f4d574d62969c0e1d5b2522d1e9975968d9890ab7b35698c531edb3cd8779886ae0eb07a60e62ba726e9d6157d0950b3d7e6c2a92acb140c3636e9a0
7
- data.tar.gz: 07dd4ad5152dc213be01025a3002d0ecd5b11a9b7ab7f44ca5398710ac9020be21df7541cb213a34751ed36e08186d57363c6281a0a63e41f9e36d215f5a63e5
6
+ metadata.gz: a59c70911221fe288dcae5e2b210ee99b22dd3a1eaea532ef2669eb5f1ae55d0c604f6a1f51f85930c85dd05e3b0d186b9e2d793e25f0852a558d88c491fd006
7
+ data.tar.gz: bfc7008abcf752bb87290852e154a08fd1f6fc2665ad721ebd7a1759699c83a770ca00fb1e9908c69411acf6d90a7bd8411cfa4e5718e9942f88e51766f3f90b
data/AUTHENTICATION.md CHANGED
@@ -96,20 +96,24 @@ client = Google::Cloud::ErrorReporting.new
96
96
 
97
97
  ### Configuration
98
98
 
99
- The **Project ID** and the path to the **Credentials JSON** file can be configured
99
+ The **Project ID**, **Quota Project**, and the path to the **Credentials JSON** file can be configured
100
100
  instead of placing them in environment variables or providing them as arguments.
101
101
 
102
102
  ```ruby
103
103
  require "google/cloud/error_reporting"
104
104
 
105
105
  Google::Cloud::ErrorReporting.configure do |config|
106
- config.project_id = "my-project-id"
107
- config.credentials = "path/to/keyfile.json"
106
+ config.project_id = "my-project-id" # The project where errors are reported
107
+ config.quota_project = "my-billing-project" # The project billed for quota/billing (optional)
108
+ config.credentials = "path/to/keyfile.json"
108
109
  end
109
110
 
110
111
  client = Google::Cloud::ErrorReporting.new
111
112
  ```
112
113
 
114
+ > [!NOTE]
115
+ > **Project ID** (where errors are sent) and **Quota Project** (which project is billed for the API call) are distinct. By default, the library bills the project associated with the credentials. Use `config.quota_project` if you need to bill a different project.
116
+
113
117
  ### Cloud SDK
114
118
 
115
119
  This option allows for an easy way to authenticate during development. If
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.45.1 (2026-06-17)
4
+
5
+ #### Bug Fixes
6
+
7
+ * respect quota_project configuration ([#34610](https://github.com/googleapis/google-cloud-ruby/issues/34610))
8
+
3
9
  ### 0.45.0 (2026-06-11)
4
10
 
5
11
  #### Features
@@ -122,8 +122,8 @@ module Google
122
122
  # error_event = error_reporting.error_event "Error with Backtrace"
123
123
  # error_reporting.report error_event
124
124
  #
125
- def report *args, &block
126
- service.report(*args, &block)
125
+ def report(*args, &)
126
+ service.report(*args, &)
127
127
  end
128
128
 
129
129
  ##
@@ -29,14 +29,17 @@ module Google
29
29
  attr_accessor :credentials
30
30
  attr_accessor :timeout
31
31
  attr_accessor :host
32
+ attr_accessor :quota_project
32
33
 
33
34
  ##
34
35
  # Creates a new Service instance.
35
- def initialize project, credentials, timeout: nil, host: nil
36
+ def initialize project, credentials, timeout: nil, host: nil, quota_project: nil
36
37
  @project = project
37
38
  @credentials = credentials
38
39
  @timeout = timeout
39
40
  @host = host
41
+ @quota_project = quota_project
42
+ @quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
40
43
  end
41
44
 
42
45
  def error_reporting
@@ -46,6 +49,7 @@ module Google
46
49
  config.credentials = credentials if credentials
47
50
  config.timeout = timeout if timeout
48
51
  config.endpoint = host if host
52
+ config.quota_project = quota_project if quota_project
49
53
  config.lib_name = "gccl"
50
54
  config.lib_version = Google::Cloud::ErrorReporting::VERSION
51
55
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module ErrorReporting
19
- VERSION = "0.45.0".freeze
19
+ VERSION = "0.45.1".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -93,7 +93,10 @@ module Google
93
93
  credentials = resolve_credentials credentials, scope
94
94
  project_id = resolve_project_id project_id, credentials
95
95
 
96
- service = ErrorReporting::Service.new project_id, credentials, host: endpoint, timeout: timeout
96
+ quota_project = configure.quota_project
97
+ service = ErrorReporting::Service.new project_id, credentials,
98
+ host: endpoint, timeout: timeout,
99
+ quota_project: quota_project
97
100
  ErrorReporting::Project.new service
98
101
  end
99
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-error_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.0
4
+ version: 0.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc