google-cloud-error_reporting 0.45.1 → 0.46.0

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: 2d6dd0fd476822b1c166855b84d18b62d7b467809fbe8cdb3a11bdafa74439de
4
- data.tar.gz: 75221540b9c57b93f7a6237744e757c24607dc420cabefa266bf2a45901abf2b
3
+ metadata.gz: 863df897f1f4cbe468cce6bdcd99b3944c094b412f122138599b83df980f0334
4
+ data.tar.gz: 65731effeaca9476265e65c717a01d0632def972be553b4af730327cb440f23f
5
5
  SHA512:
6
- metadata.gz: a59c70911221fe288dcae5e2b210ee99b22dd3a1eaea532ef2669eb5f1ae55d0c604f6a1f51f85930c85dd05e3b0d186b9e2d793e25f0852a558d88c491fd006
7
- data.tar.gz: bfc7008abcf752bb87290852e154a08fd1f6fc2665ad721ebd7a1759699c83a770ca00fb1e9908c69411acf6d90a7bd8411cfa4e5718e9942f88e51766f3f90b
6
+ metadata.gz: 9c644e3af397932d68345e959c7e23e69948756fa87853417f7dbde9751686f78980502d8d051c0f539a7853aa4e206a6bf27380ecdcbd624e3f54121fb71d58
7
+ data.tar.gz: 4aac4a505724274a441c9310641d2c060814c4e261a66c5f214c2e28afefd21a300719edba842969c36fb71915b77e3cbb80087cf293fc2a096e3961a55701de
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 0.46.0 (2026-12-02)
4
+
5
+ #### Features
6
+
7
+ * Support universe domain ([#36740](https://github.com/googleapis/google-cloud-ruby/issues/36740))
8
+
9
+ ### 0.45.2 (2026-10-29)
10
+
11
+ #### Documentation
12
+
13
+ * link to the published Ruby version support policy ([#36660](https://github.com/googleapis/google-cloud-ruby/issues/36660))
14
+
3
15
  ### 0.45.1 (2026-06-17)
4
16
 
5
17
  #### Bug Fixes
@@ -57,7 +57,9 @@ module Google
57
57
  ErrorReporting.default_reporter do
58
58
  ErrorReporting::AsyncErrorReporter.new(
59
59
  ErrorReporting.new(project: configuration.project_id,
60
- credentials: configuration.credentials)
60
+ credentials: configuration.credentials,
61
+ endpoint: configuration.endpoint,
62
+ universe_domain: configuration.universe_domain)
61
63
  )
62
64
  end
63
65
  end
@@ -165,14 +167,10 @@ module Google
165
167
  creds = kwargs[:credentials] || kwargs[:keyfile]
166
168
  configuration.credentials = creds unless creds.nil?
167
169
 
168
- service_name = kwargs[:service_name]
169
- configuration.service_name = service_name unless service_name.nil?
170
-
171
- service_vers = kwargs[:service_version]
172
- configuration.service_version = service_vers unless service_vers.nil?
173
-
174
- ignores = kwargs[:ignore_classes]
175
- configuration.ignore_classes = ignores unless ignores.nil?
170
+ [:service_name, :service_version, :ignore_classes, :endpoint, :universe_domain].each do |key|
171
+ value = kwargs[key]
172
+ configuration[key] = value unless value.nil?
173
+ end
176
174
 
177
175
  init_default_config
178
176
  end
@@ -110,6 +110,15 @@ module Google
110
110
  end
111
111
  alias project project_id
112
112
 
113
+ ##
114
+ # The universe domain the client is connected to.
115
+ #
116
+ # @return [String]
117
+ #
118
+ def universe_domain
119
+ service.universe_domain
120
+ end
121
+
113
122
  ##
114
123
  # Report a {Google::Cloud::ErrorReporting::ErrorEvent} to
115
124
  # Error Reporting service.
@@ -119,6 +119,8 @@ module Google
119
119
  config.credentials ||= config.keyfile
120
120
  config.credentials ||= er_config.credentials || er_config.keyfile
121
121
  config.credentials ||= gcp_config.credentials || gcp_config.keyfile
122
+ config.endpoint ||= er_config.endpoint
123
+ config.universe_domain ||= er_config.universe_domain || gcp_config.universe_domain
122
124
  config.service_name ||= \
123
125
  (er_config.service_name || gcp_config.service_name)
124
126
  config.service_version ||= \
@@ -33,13 +33,24 @@ module Google
33
33
 
34
34
  ##
35
35
  # Creates a new Service instance.
36
- def initialize project, credentials, timeout: nil, host: nil, quota_project: nil
36
+ def initialize project, credentials, timeout: nil, host: nil,
37
+ quota_project: nil, universe_domain: nil
37
38
  @project = project
38
39
  @credentials = credentials
39
40
  @timeout = timeout
40
41
  @host = host
41
42
  @quota_project = quota_project
42
43
  @quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
44
+ @universe_domain = universe_domain
45
+ end
46
+
47
+ def universe_domain
48
+ @error_reporting&.universe_domain ||
49
+ @universe_domain ||
50
+ V1beta1::ReportErrorsService::Client.configure.universe_domain ||
51
+ configured_universe_domain ||
52
+ ENV["GOOGLE_CLOUD_UNIVERSE_DOMAIN"] ||
53
+ "googleapis.com"
43
54
  end
44
55
 
45
56
  def error_reporting
@@ -50,6 +61,8 @@ module Google
50
61
  config.timeout = timeout if timeout
51
62
  config.endpoint = host if host
52
63
  config.quota_project = quota_project if quota_project
64
+ effective_universe = @universe_domain || config.universe_domain || configured_universe_domain
65
+ config.universe_domain = effective_universe if effective_universe
53
66
  config.lib_name = "gccl"
54
67
  config.lib_version = Google::Cloud::ErrorReporting::VERSION
55
68
  end
@@ -91,6 +104,14 @@ module Google
91
104
  def project_path
92
105
  V1beta1::ReportErrorsService::Paths.project_path project: project
93
106
  end
107
+
108
+ def configured_universe_domain
109
+ return unless Google::Cloud.respond_to?(:configure) &&
110
+ Google::Cloud.configure.subconfig?(:error_reporting)
111
+
112
+ er_config = Google::Cloud.configure.error_reporting
113
+ er_config.universe_domain if er_config.respond_to? :universe_domain
114
+ end
94
115
  end
95
116
  end
96
117
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module ErrorReporting
19
- VERSION = "0.45.1".freeze
19
+ VERSION = "0.46.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -64,6 +64,9 @@ module Google
64
64
  # @param [Integer] timeout Default timeout to use in requests. Optional.
65
65
  # @param [String] endpoint Override of the endpoint host name. Optional.
66
66
  # If the param is nil, uses the default endpoint.
67
+ # @param [String] universe_domain Override of the universe domain. Optional.
68
+ # If the param is nil, uses the configured `universe_domain`,
69
+ # `ENV["GOOGLE_CLOUD_UNIVERSE_DOMAIN"]`, or `"googleapis.com"`.
67
70
  # @param [String] project Alias for the `project_id` argument. Deprecated.
68
71
  # @param [String] keyfile Alias for the `credentials` argument.
69
72
  # Deprecated.
@@ -81,14 +84,16 @@ module Google
81
84
  scope: nil,
82
85
  timeout: nil,
83
86
  endpoint: nil,
87
+ universe_domain: nil,
84
88
  project: nil,
85
89
  keyfile: nil
86
- project_id ||= project
87
- project_id ||= ErrorReporting::Project.default_project_id
88
- scope ||= configure.scope
89
- timeout ||= configure.timeout
90
- endpoint ||= configure.endpoint
91
- credentials ||= keyfile || default_credentials(scope: scope)
90
+ project_id ||= project
91
+ project_id ||= ErrorReporting::Project.default_project_id
92
+ scope ||= configure.scope
93
+ timeout ||= configure.timeout
94
+ endpoint ||= configure.endpoint
95
+ universe_domain ||= configure.universe_domain
96
+ credentials ||= keyfile || default_credentials(scope: scope)
92
97
 
93
98
  credentials = resolve_credentials credentials, scope
94
99
  project_id = resolve_project_id project_id, credentials
@@ -96,7 +101,8 @@ module Google
96
101
  quota_project = configure.quota_project
97
102
  service = ErrorReporting::Service.new project_id, credentials,
98
103
  host: endpoint, timeout: timeout,
99
- quota_project: quota_project
104
+ quota_project: quota_project,
105
+ universe_domain: universe_domain
100
106
  ErrorReporting::Project.new service
101
107
  end
102
108
 
@@ -123,6 +129,9 @@ module Google
123
129
  # * `timeout` - (Integer) Default timeout to use in requests.
124
130
  # * `endpoint` - (String) Override of the endpoint host name, or `nil`
125
131
  # to use the default endpoint.
132
+ # * `universe_domain` - (String) Override of the universe domain, or
133
+ # `nil` to use `ENV["GOOGLE_CLOUD_UNIVERSE_DOMAIN"]` or the default
134
+ # universe domain (`"googleapis.com"`).
126
135
  # * `service_name` - (String) Name for the application.
127
136
  # * `service_version` - (String) Version identifier for the application.
128
137
  # * `ignore_classes` - (Array<Exception>) Array of exception types that
@@ -153,7 +153,8 @@ Google::Cloud.configure.add_config! :error_reporting do |config|
153
153
  config.add_field! :scope, default_scopes, match: [String, Array]
154
154
  config.add_field! :quota_project, nil, match: String
155
155
  config.add_field! :timeout, nil, match: Integer
156
- config.add_field! :endpoint, "clouderrorreporting.googleapis.com", match: String
156
+ config.add_field! :endpoint, nil, match: String, allow_nil: true
157
+ config.add_field! :universe_domain, nil, match: String, allow_nil: true
157
158
  config.add_field! :service_name, default_service,
158
159
  match: String, allow_nil: true
159
160
  config.add_field! :service_version, default_version,
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.1
4
+ version: 0.46.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
@@ -41,16 +41,22 @@ dependencies:
41
41
  name: google-cloud-error_reporting-v1beta1
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.9.0
47
+ - - "<"
45
48
  - !ruby/object:Gem::Version
46
- version: '0.0'
49
+ version: 2.a
47
50
  type: :runtime
48
51
  prerelease: false
49
52
  version_requirements: !ruby/object:Gem::Requirement
50
53
  requirements:
51
- - - "~>"
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.9.0
57
+ - - "<"
52
58
  - !ruby/object:Gem::Version
53
- version: '0.0'
59
+ version: 2.a
54
60
  - !ruby/object:Gem::Dependency
55
61
  name: concurrent-ruby
56
62
  requirement: !ruby/object:Gem::Requirement