google-cloud-error_reporting 0.35.2 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +23 -0
- data/lib/google-cloud-error_reporting.rb +7 -14
- data/lib/google/cloud/error_reporting.rb +16 -13
- data/lib/google/cloud/error_reporting/credentials.rb +2 -2
- data/lib/google/cloud/error_reporting/error_event.rb +14 -18
- data/lib/google/cloud/error_reporting/service.rb +12 -36
- data/lib/google/cloud/error_reporting/version.rb +1 -1
- metadata +7 -68
- data/lib/google/cloud/error_reporting/v1beta1.rb +0 -19
- data/lib/google/cloud/error_reporting/v1beta1/credentials.rb +0 -41
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/common.rb +0 -158
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_group_service.rb +0 -39
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_stats_service.rb +0 -314
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/report_errors_service.rb +0 -79
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/error_reporting/v1beta1/error_group_service_client.rb +0 -283
- data/lib/google/cloud/error_reporting/v1beta1/error_group_service_client_config.json +0 -36
- data/lib/google/cloud/error_reporting/v1beta1/error_stats_service_client.rb +0 -457
- data/lib/google/cloud/error_reporting/v1beta1/error_stats_service_client_config.json +0 -41
- data/lib/google/cloud/error_reporting/v1beta1/report_errors_service_client.rb +0 -254
- data/lib/google/cloud/error_reporting/v1beta1/report_errors_service_client_config.json +0 -31
- data/lib/google/devtools/clouderrorreporting/v1beta1/common_pb.rb +0 -64
- data/lib/google/devtools/clouderrorreporting/v1beta1/error_group_service_pb.rb +0 -30
- data/lib/google/devtools/clouderrorreporting/v1beta1/error_group_service_services_pb.rb +0 -50
- data/lib/google/devtools/clouderrorreporting/v1beta1/error_stats_service_pb.rb +0 -116
- data/lib/google/devtools/clouderrorreporting/v1beta1/error_stats_service_services_pb.rb +0 -52
- data/lib/google/devtools/clouderrorreporting/v1beta1/report_errors_service_pb.rb +0 -38
- data/lib/google/devtools/clouderrorreporting/v1beta1/report_errors_service_services_pb.rb +0 -55
@@ -1,36 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"interfaces": {
|
3
|
-
"google.devtools.clouderrorreporting.v1beta1.ErrorGroupService": {
|
4
|
-
"retry_codes": {
|
5
|
-
"idempotent": [
|
6
|
-
"DEADLINE_EXCEEDED",
|
7
|
-
"UNAVAILABLE"
|
8
|
-
],
|
9
|
-
"non_idempotent": []
|
10
|
-
},
|
11
|
-
"retry_params": {
|
12
|
-
"default": {
|
13
|
-
"initial_retry_delay_millis": 100,
|
14
|
-
"retry_delay_multiplier": 1.3,
|
15
|
-
"max_retry_delay_millis": 60000,
|
16
|
-
"initial_rpc_timeout_millis": 20000,
|
17
|
-
"rpc_timeout_multiplier": 1.0,
|
18
|
-
"max_rpc_timeout_millis": 20000,
|
19
|
-
"total_timeout_millis": 600000
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"methods": {
|
23
|
-
"UpdateGroup": {
|
24
|
-
"timeout_millis": 60000,
|
25
|
-
"retry_codes_name": "idempotent",
|
26
|
-
"retry_params_name": "default"
|
27
|
-
},
|
28
|
-
"GetGroup": {
|
29
|
-
"timeout_millis": 60000,
|
30
|
-
"retry_codes_name": "idempotent",
|
31
|
-
"retry_params_name": "default"
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
@@ -1,457 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
#
|
15
|
-
# EDITING INSTRUCTIONS
|
16
|
-
# This file was generated from the file
|
17
|
-
# https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto,
|
18
|
-
# and updates to that file get reflected here through a refresh process.
|
19
|
-
# For the short term, the refresh process will only be runnable by Google
|
20
|
-
# engineers.
|
21
|
-
|
22
|
-
|
23
|
-
require "json"
|
24
|
-
require "pathname"
|
25
|
-
|
26
|
-
require "google/gax"
|
27
|
-
|
28
|
-
require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_pb"
|
29
|
-
require "google/cloud/error_reporting/v1beta1/credentials"
|
30
|
-
require "google/cloud/error_reporting/version"
|
31
|
-
|
32
|
-
module Google
|
33
|
-
module Cloud
|
34
|
-
module ErrorReporting
|
35
|
-
module V1beta1
|
36
|
-
# An API for retrieving and managing error statistics as well as data for
|
37
|
-
# individual events.
|
38
|
-
#
|
39
|
-
# @!attribute [r] error_stats_service_stub
|
40
|
-
# @return [Google::Devtools::Clouderrorreporting::V1beta1::ErrorStatsService::Stub]
|
41
|
-
class ErrorStatsServiceClient
|
42
|
-
# @private
|
43
|
-
attr_reader :error_stats_service_stub
|
44
|
-
|
45
|
-
# The default address of the service.
|
46
|
-
SERVICE_ADDRESS = "clouderrorreporting.googleapis.com".freeze
|
47
|
-
|
48
|
-
# The default port of the service.
|
49
|
-
DEFAULT_SERVICE_PORT = 443
|
50
|
-
|
51
|
-
# The default set of gRPC interceptors.
|
52
|
-
GRPC_INTERCEPTORS = []
|
53
|
-
|
54
|
-
DEFAULT_TIMEOUT = 30
|
55
|
-
|
56
|
-
PAGE_DESCRIPTORS = {
|
57
|
-
"list_group_stats" => Google::Gax::PageDescriptor.new(
|
58
|
-
"page_token",
|
59
|
-
"next_page_token",
|
60
|
-
"error_group_stats"),
|
61
|
-
"list_events" => Google::Gax::PageDescriptor.new(
|
62
|
-
"page_token",
|
63
|
-
"next_page_token",
|
64
|
-
"error_events")
|
65
|
-
}.freeze
|
66
|
-
|
67
|
-
private_constant :PAGE_DESCRIPTORS
|
68
|
-
|
69
|
-
# The scopes needed to make gRPC calls to all of the methods defined in
|
70
|
-
# this service.
|
71
|
-
ALL_SCOPES = [
|
72
|
-
"https://www.googleapis.com/auth/cloud-platform"
|
73
|
-
].freeze
|
74
|
-
|
75
|
-
|
76
|
-
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
77
|
-
"projects/{project}"
|
78
|
-
)
|
79
|
-
|
80
|
-
private_constant :PROJECT_PATH_TEMPLATE
|
81
|
-
|
82
|
-
# Returns a fully-qualified project resource name string.
|
83
|
-
# @param project [String]
|
84
|
-
# @return [String]
|
85
|
-
def self.project_path project
|
86
|
-
PROJECT_PATH_TEMPLATE.render(
|
87
|
-
:"project" => project
|
88
|
-
)
|
89
|
-
end
|
90
|
-
|
91
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
92
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
93
|
-
# be many types.
|
94
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
95
|
-
# authenticating requests made by this client.
|
96
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
97
|
-
# credentials for this client.
|
98
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
99
|
-
# credentials for this client.
|
100
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
101
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
102
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
103
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
104
|
-
# metadata for requests, generally, to give OAuth credentials.
|
105
|
-
# @param scopes [Array<String>]
|
106
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
107
|
-
# an updater_proc is supplied.
|
108
|
-
# @param client_config [Hash]
|
109
|
-
# A Hash for call options for each method. See
|
110
|
-
# Google::Gax#construct_settings for the structure of
|
111
|
-
# this data. Falls back to the default config if not specified
|
112
|
-
# or the specified config is missing data points.
|
113
|
-
# @param timeout [Numeric]
|
114
|
-
# The default timeout, in seconds, for calls made through this client.
|
115
|
-
# @param metadata [Hash]
|
116
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
117
|
-
# @param service_address [String]
|
118
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
119
|
-
# @param service_port [Integer]
|
120
|
-
# Override for the service port, or `nil` to leave as the default.
|
121
|
-
# @param exception_transformer [Proc]
|
122
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
123
|
-
# custom error handling.
|
124
|
-
def initialize \
|
125
|
-
credentials: nil,
|
126
|
-
scopes: ALL_SCOPES,
|
127
|
-
client_config: {},
|
128
|
-
timeout: DEFAULT_TIMEOUT,
|
129
|
-
metadata: nil,
|
130
|
-
service_address: nil,
|
131
|
-
service_port: nil,
|
132
|
-
exception_transformer: nil,
|
133
|
-
lib_name: nil,
|
134
|
-
lib_version: ""
|
135
|
-
# These require statements are intentionally placed here to initialize
|
136
|
-
# the gRPC module only when it's required.
|
137
|
-
# See https://github.com/googleapis/toolkit/issues/446
|
138
|
-
require "google/gax/grpc"
|
139
|
-
require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_services_pb"
|
140
|
-
|
141
|
-
credentials ||= Google::Cloud::ErrorReporting::V1beta1::Credentials.default
|
142
|
-
|
143
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
144
|
-
updater_proc = Google::Cloud::ErrorReporting::V1beta1::Credentials.new(credentials).updater_proc
|
145
|
-
end
|
146
|
-
if credentials.is_a?(GRPC::Core::Channel)
|
147
|
-
channel = credentials
|
148
|
-
end
|
149
|
-
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
150
|
-
chan_creds = credentials
|
151
|
-
end
|
152
|
-
if credentials.is_a?(Proc)
|
153
|
-
updater_proc = credentials
|
154
|
-
end
|
155
|
-
if credentials.is_a?(Google::Auth::Credentials)
|
156
|
-
updater_proc = credentials.updater_proc
|
157
|
-
end
|
158
|
-
|
159
|
-
package_version = Google::Cloud::ErrorReporting::VERSION
|
160
|
-
|
161
|
-
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
162
|
-
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
163
|
-
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
164
|
-
google_api_client << " grpc/#{GRPC::VERSION}"
|
165
|
-
google_api_client.freeze
|
166
|
-
|
167
|
-
headers = { :"x-goog-api-client" => google_api_client }
|
168
|
-
if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
|
169
|
-
headers[:"x-goog-user-project"] = credentials.quota_project_id
|
170
|
-
end
|
171
|
-
headers.merge!(metadata) unless metadata.nil?
|
172
|
-
client_config_file = Pathname.new(__dir__).join(
|
173
|
-
"error_stats_service_client_config.json"
|
174
|
-
)
|
175
|
-
defaults = client_config_file.open do |f|
|
176
|
-
Google::Gax.construct_settings(
|
177
|
-
"google.devtools.clouderrorreporting.v1beta1.ErrorStatsService",
|
178
|
-
JSON.parse(f.read),
|
179
|
-
client_config,
|
180
|
-
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
181
|
-
timeout,
|
182
|
-
page_descriptors: PAGE_DESCRIPTORS,
|
183
|
-
errors: Google::Gax::Grpc::API_ERRORS,
|
184
|
-
metadata: headers
|
185
|
-
)
|
186
|
-
end
|
187
|
-
|
188
|
-
# Allow overriding the service path/port in subclasses.
|
189
|
-
service_path = service_address || self.class::SERVICE_ADDRESS
|
190
|
-
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
191
|
-
interceptors = self.class::GRPC_INTERCEPTORS
|
192
|
-
@error_stats_service_stub = Google::Gax::Grpc.create_stub(
|
193
|
-
service_path,
|
194
|
-
port,
|
195
|
-
chan_creds: chan_creds,
|
196
|
-
channel: channel,
|
197
|
-
updater_proc: updater_proc,
|
198
|
-
scopes: scopes,
|
199
|
-
interceptors: interceptors,
|
200
|
-
&Google::Devtools::Clouderrorreporting::V1beta1::ErrorStatsService::Stub.method(:new)
|
201
|
-
)
|
202
|
-
|
203
|
-
@delete_events = Google::Gax.create_api_call(
|
204
|
-
@error_stats_service_stub.method(:delete_events),
|
205
|
-
defaults["delete_events"],
|
206
|
-
exception_transformer: exception_transformer,
|
207
|
-
params_extractor: proc do |request|
|
208
|
-
{'project_name' => request.project_name}
|
209
|
-
end
|
210
|
-
)
|
211
|
-
@list_group_stats = Google::Gax.create_api_call(
|
212
|
-
@error_stats_service_stub.method(:list_group_stats),
|
213
|
-
defaults["list_group_stats"],
|
214
|
-
exception_transformer: exception_transformer,
|
215
|
-
params_extractor: proc do |request|
|
216
|
-
{'project_name' => request.project_name}
|
217
|
-
end
|
218
|
-
)
|
219
|
-
@list_events = Google::Gax.create_api_call(
|
220
|
-
@error_stats_service_stub.method(:list_events),
|
221
|
-
defaults["list_events"],
|
222
|
-
exception_transformer: exception_transformer,
|
223
|
-
params_extractor: proc do |request|
|
224
|
-
{'project_name' => request.project_name}
|
225
|
-
end
|
226
|
-
)
|
227
|
-
end
|
228
|
-
|
229
|
-
# Service calls
|
230
|
-
|
231
|
-
# Deletes all error events of a given project.
|
232
|
-
#
|
233
|
-
# @param project_name [String]
|
234
|
-
# Required. The resource name of the Google Cloud Platform project. Written
|
235
|
-
# as `projects/` plus the
|
236
|
-
# [Google Cloud Platform project
|
237
|
-
# ID](https://support.google.com/cloud/answer/6158840).
|
238
|
-
# Example: `projects/my-project-123`.
|
239
|
-
# @param options [Google::Gax::CallOptions]
|
240
|
-
# Overrides the default settings for this call, e.g, timeout,
|
241
|
-
# retries, etc.
|
242
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
243
|
-
# @yieldparam result [Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsResponse]
|
244
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
245
|
-
# @return [Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsResponse]
|
246
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
247
|
-
# @example
|
248
|
-
# require "google/cloud/error_reporting"
|
249
|
-
#
|
250
|
-
# error_stats_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
|
251
|
-
# formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
|
252
|
-
# response = error_stats_client.delete_events(formatted_project_name)
|
253
|
-
|
254
|
-
def delete_events \
|
255
|
-
project_name,
|
256
|
-
options: nil,
|
257
|
-
&block
|
258
|
-
req = {
|
259
|
-
project_name: project_name
|
260
|
-
}.delete_if { |_, v| v.nil? }
|
261
|
-
req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsRequest)
|
262
|
-
@delete_events.call(req, options, &block)
|
263
|
-
end
|
264
|
-
|
265
|
-
# Lists the specified groups.
|
266
|
-
#
|
267
|
-
# @param project_name [String]
|
268
|
-
# Required. The resource name of the Google Cloud Platform project. Written
|
269
|
-
# as <code>projects/</code> plus the
|
270
|
-
# <a href="https://support.google.com/cloud/answer/6158840">Google Cloud
|
271
|
-
# Platform project ID</a>.
|
272
|
-
#
|
273
|
-
# Example: <code>projects/my-project-123</code>.
|
274
|
-
# @param group_id [Array<String>]
|
275
|
-
# Optional. List all <code>ErrorGroupStats</code> with these IDs.
|
276
|
-
# @param service_filter [Google::Devtools::Clouderrorreporting::V1beta1::ServiceContextFilter | Hash]
|
277
|
-
# Optional. List only <code>ErrorGroupStats</code> which belong to a service
|
278
|
-
# context that matches the filter.
|
279
|
-
# Data for all service contexts is returned if this field is not specified.
|
280
|
-
# A hash of the same form as `Google::Devtools::Clouderrorreporting::V1beta1::ServiceContextFilter`
|
281
|
-
# can also be provided.
|
282
|
-
# @param time_range [Google::Devtools::Clouderrorreporting::V1beta1::QueryTimeRange | Hash]
|
283
|
-
# Optional. List data for the given time range.
|
284
|
-
# If not set, a default time range is used. The field
|
285
|
-
# <code>time_range_begin</code> in the response will specify the beginning
|
286
|
-
# of this time range.
|
287
|
-
# Only <code>ErrorGroupStats</code> with a non-zero count in the given time
|
288
|
-
# range are returned, unless the request contains an explicit
|
289
|
-
# <code>group_id</code> list. If a <code>group_id</code> list is given, also
|
290
|
-
# <code>ErrorGroupStats</code> with zero occurrences are returned.
|
291
|
-
# A hash of the same form as `Google::Devtools::Clouderrorreporting::V1beta1::QueryTimeRange`
|
292
|
-
# can also be provided.
|
293
|
-
# @param timed_count_duration [Google::Protobuf::Duration | Hash]
|
294
|
-
# Optional. The preferred duration for a single returned `TimedCount`.
|
295
|
-
# If not set, no timed counts are returned.
|
296
|
-
# A hash of the same form as `Google::Protobuf::Duration`
|
297
|
-
# can also be provided.
|
298
|
-
# @param alignment [Google::Devtools::Clouderrorreporting::V1beta1::TimedCountAlignment]
|
299
|
-
# Optional. The alignment of the timed counts to be returned.
|
300
|
-
# Default is `ALIGNMENT_EQUAL_AT_END`.
|
301
|
-
# @param alignment_time [Google::Protobuf::Timestamp | Hash]
|
302
|
-
# Optional. Time where the timed counts shall be aligned if rounded
|
303
|
-
# alignment is chosen. Default is 00:00 UTC.
|
304
|
-
# A hash of the same form as `Google::Protobuf::Timestamp`
|
305
|
-
# can also be provided.
|
306
|
-
# @param order [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupOrder]
|
307
|
-
# Optional. The sort order in which the results are returned.
|
308
|
-
# Default is `COUNT_DESC`.
|
309
|
-
# @param page_size [Integer]
|
310
|
-
# The maximum number of resources contained in the underlying API
|
311
|
-
# response. If page streaming is performed per-resource, this
|
312
|
-
# parameter does not affect the return value. If page streaming is
|
313
|
-
# performed per-page, this determines the maximum number of
|
314
|
-
# resources in a page.
|
315
|
-
# @param options [Google::Gax::CallOptions]
|
316
|
-
# Overrides the default settings for this call, e.g, timeout,
|
317
|
-
# retries, etc.
|
318
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
319
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats>]
|
320
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
321
|
-
# @return [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats>]
|
322
|
-
# An enumerable of Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats instances.
|
323
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
324
|
-
# operations such as per-page iteration or access to the response
|
325
|
-
# object.
|
326
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
327
|
-
# @example
|
328
|
-
# require "google/cloud/error_reporting"
|
329
|
-
#
|
330
|
-
# error_stats_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
|
331
|
-
# formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
|
332
|
-
#
|
333
|
-
# # Iterate over all results.
|
334
|
-
# error_stats_client.list_group_stats(formatted_project_name).each do |element|
|
335
|
-
# # Process element.
|
336
|
-
# end
|
337
|
-
#
|
338
|
-
# # Or iterate over results one page at a time.
|
339
|
-
# error_stats_client.list_group_stats(formatted_project_name).each_page do |page|
|
340
|
-
# # Process each page at a time.
|
341
|
-
# page.each do |element|
|
342
|
-
# # Process element.
|
343
|
-
# end
|
344
|
-
# end
|
345
|
-
|
346
|
-
def list_group_stats \
|
347
|
-
project_name,
|
348
|
-
group_id: nil,
|
349
|
-
service_filter: nil,
|
350
|
-
time_range: nil,
|
351
|
-
timed_count_duration: nil,
|
352
|
-
alignment: nil,
|
353
|
-
alignment_time: nil,
|
354
|
-
order: nil,
|
355
|
-
page_size: nil,
|
356
|
-
options: nil,
|
357
|
-
&block
|
358
|
-
req = {
|
359
|
-
project_name: project_name,
|
360
|
-
group_id: group_id,
|
361
|
-
service_filter: service_filter,
|
362
|
-
time_range: time_range,
|
363
|
-
timed_count_duration: timed_count_duration,
|
364
|
-
alignment: alignment,
|
365
|
-
alignment_time: alignment_time,
|
366
|
-
order: order,
|
367
|
-
page_size: page_size
|
368
|
-
}.delete_if { |_, v| v.nil? }
|
369
|
-
req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::ListGroupStatsRequest)
|
370
|
-
@list_group_stats.call(req, options, &block)
|
371
|
-
end
|
372
|
-
|
373
|
-
# Lists the specified events.
|
374
|
-
#
|
375
|
-
# @param project_name [String]
|
376
|
-
# Required. The resource name of the Google Cloud Platform project. Written
|
377
|
-
# as `projects/` plus the
|
378
|
-
# [Google Cloud Platform project
|
379
|
-
# ID](https://support.google.com/cloud/answer/6158840).
|
380
|
-
# Example: `projects/my-project-123`.
|
381
|
-
# @param group_id [String]
|
382
|
-
# Required. The group for which events shall be returned.
|
383
|
-
# @param service_filter [Google::Devtools::Clouderrorreporting::V1beta1::ServiceContextFilter | Hash]
|
384
|
-
# Optional. List only ErrorGroups which belong to a service context that
|
385
|
-
# matches the filter.
|
386
|
-
# Data for all service contexts is returned if this field is not specified.
|
387
|
-
# A hash of the same form as `Google::Devtools::Clouderrorreporting::V1beta1::ServiceContextFilter`
|
388
|
-
# can also be provided.
|
389
|
-
# @param time_range [Google::Devtools::Clouderrorreporting::V1beta1::QueryTimeRange | Hash]
|
390
|
-
# Optional. List only data for the given time range.
|
391
|
-
# If not set a default time range is used. The field time_range_begin
|
392
|
-
# in the response will specify the beginning of this time range.
|
393
|
-
# A hash of the same form as `Google::Devtools::Clouderrorreporting::V1beta1::QueryTimeRange`
|
394
|
-
# can also be provided.
|
395
|
-
# @param page_size [Integer]
|
396
|
-
# The maximum number of resources contained in the underlying API
|
397
|
-
# response. If page streaming is performed per-resource, this
|
398
|
-
# parameter does not affect the return value. If page streaming is
|
399
|
-
# performed per-page, this determines the maximum number of
|
400
|
-
# resources in a page.
|
401
|
-
# @param options [Google::Gax::CallOptions]
|
402
|
-
# Overrides the default settings for this call, e.g, timeout,
|
403
|
-
# retries, etc.
|
404
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
405
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent>]
|
406
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
407
|
-
# @return [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent>]
|
408
|
-
# An enumerable of Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent instances.
|
409
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
410
|
-
# operations such as per-page iteration or access to the response
|
411
|
-
# object.
|
412
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
413
|
-
# @example
|
414
|
-
# require "google/cloud/error_reporting"
|
415
|
-
#
|
416
|
-
# error_stats_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
|
417
|
-
# formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
|
418
|
-
#
|
419
|
-
# # TODO: Initialize `group_id`:
|
420
|
-
# group_id = ''
|
421
|
-
#
|
422
|
-
# # Iterate over all results.
|
423
|
-
# error_stats_client.list_events(formatted_project_name, group_id).each do |element|
|
424
|
-
# # Process element.
|
425
|
-
# end
|
426
|
-
#
|
427
|
-
# # Or iterate over results one page at a time.
|
428
|
-
# error_stats_client.list_events(formatted_project_name, group_id).each_page do |page|
|
429
|
-
# # Process each page at a time.
|
430
|
-
# page.each do |element|
|
431
|
-
# # Process element.
|
432
|
-
# end
|
433
|
-
# end
|
434
|
-
|
435
|
-
def list_events \
|
436
|
-
project_name,
|
437
|
-
group_id,
|
438
|
-
service_filter: nil,
|
439
|
-
time_range: nil,
|
440
|
-
page_size: nil,
|
441
|
-
options: nil,
|
442
|
-
&block
|
443
|
-
req = {
|
444
|
-
project_name: project_name,
|
445
|
-
group_id: group_id,
|
446
|
-
service_filter: service_filter,
|
447
|
-
time_range: time_range,
|
448
|
-
page_size: page_size
|
449
|
-
}.delete_if { |_, v| v.nil? }
|
450
|
-
req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::ListEventsRequest)
|
451
|
-
@list_events.call(req, options, &block)
|
452
|
-
end
|
453
|
-
end
|
454
|
-
end
|
455
|
-
end
|
456
|
-
end
|
457
|
-
end
|