google-cloud-error_reporting 0.30.1 → 0.30.2

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.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/README.md +8 -8
  4. data/lib/google/cloud/error_reporting/credentials.rb +2 -15
  5. data/lib/google/cloud/error_reporting/v1beta1/credentials.rb +40 -0
  6. data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/common.rb +1 -1
  7. data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_group_service.rb +40 -0
  8. data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_stats_service.rb +1 -16
  9. data/lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/report_errors_service.rb +1 -16
  10. data/lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/duration.rb +1 -1
  11. data/lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/timestamp.rb +1 -1
  12. data/lib/google/cloud/error_reporting/v1beta1/error_group_service_client.rb +48 -35
  13. data/lib/google/cloud/error_reporting/v1beta1/error_stats_service_client.rb +60 -40
  14. data/lib/google/cloud/error_reporting/v1beta1/report_errors_service_client.rb +38 -30
  15. data/lib/google/cloud/error_reporting/version.rb +1 -1
  16. data/lib/google/devtools/clouderrorreporting/v1beta1/error_group_service_services_pb.rb +1 -1
  17. data/lib/google/devtools/clouderrorreporting/v1beta1/error_stats_service_services_pb.rb +1 -1
  18. data/lib/google/devtools/clouderrorreporting/v1beta1/report_errors_service_services_pb.rb +1 -1
  19. metadata +18 -3
  20. data/lib/google/cloud/error_reporting/v1beta1/doc/overview.rb +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4803dd3ca8f339200e8644cff9d6cd1ff614d6938252f9ef482a1fdbfebcacf1
4
- data.tar.gz: 38de25dcb58db7bfea2070f908c2a1d051ad37aeb2d4a0d2c5cb7a76354022c6
3
+ metadata.gz: 526e937032f341fd3733119a12bfb2a15947a6fc207e21bd4c8fdf15770250fc
4
+ data.tar.gz: c674653c23005c38d607b5ea1c9e48315ee1dd8cf0f951356ee325bc66b8bdd3
5
5
  SHA512:
6
- metadata.gz: 9831d8f4ec9210ee09540126be7e9043ec9dd40d3c9740c37b11850fac7ed48743da98f213a58d4de3de9e5f33636b060828d6978309c2d7dcb96b025e45ce10
7
- data.tar.gz: 5653c450fb8c1ef7697f2a2f613d2bb35c280897a338f14044db9aabc38a252f76bb5eb95802c12573c8376e2420380830df84d244f9b86fa5d477de92954712
6
+ metadata.gz: e7936f6d9cd7f89a7f905010cdcacd0b1b14f6040e5726676505aa8ace1b421f7c954a01625e2faad21fd4be9d88297bc26ddfb4ddb3760ee2acc0c0ed2d7973
7
+ data.tar.gz: 163f7d329c7ca17d4cef9447d2a9428a553223d7daf182eba5f352bb19657b358758bd0879e0daa567af4e988a0bdeb77620b47f6b05ba8df0033f8b3af487f6
data/.yardopts CHANGED
@@ -1,7 +1,8 @@
1
1
  --no-private
2
2
  --title=Stackdriver Error Reporting
3
- --exclude lib/google/devtools/clouderrorreporting/v1beta1
3
+ --exclude _pb\.rb$
4
4
  --markup markdown
5
+ --markup-provider redcarpet
5
6
 
6
7
  ./lib/**/*.rb
7
8
  -
data/README.md CHANGED
@@ -202,14 +202,14 @@ end
202
202
 
203
203
  ## Supported Ruby Versions
204
204
 
205
- This library is supported on Ruby 2.0+.
206
-
207
- However, Ruby 2.3 or later is strongly recommended, as earlier releases have
208
- reached or are nearing end-of-life. After June 1, 2018, Google will provide
209
- official support only for Ruby versions that are considered current and
210
- supported by Ruby Core (that is, Ruby versions that are either in normal
211
- maintenance or in security maintenance).
212
- See https://www.ruby-lang.org/en/downloads/branches/ for further details.
205
+ This library is supported on Ruby 2.3+.
206
+
207
+ Google provides official support for Ruby versions that are actively supported
208
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
209
+ in security maintenance, and not end of life. Currently, this means Ruby 2.3
210
+ and later. Older versions of Ruby _may_ still work, but are unsupported and not
211
+ recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
212
+ about the Ruby support schedule.
213
213
 
214
214
  ## Versioning
215
215
 
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- require "googleauth"
16
+ require "google/cloud/error_reporting/v1beta1/credentials"
17
17
 
18
18
  module Google
19
19
  module Cloud
@@ -37,20 +37,7 @@ module Google
37
37
  #
38
38
  # error_reporting.project_id #=> "my-project"
39
39
  #
40
- class Credentials < Google::Auth::Credentials
41
- SCOPE = ["https://www.googleapis.com/auth/cloud-platform"].freeze
42
- PATH_ENV_VARS = %w[ERROR_REPORTING_CREDENTIALS
43
- GOOGLE_CLOUD_CREDENTIALS
44
- ERROR_REPORTING_KEYFILE
45
- GOOGLE_CLOUD_KEYFILE
46
- GCLOUD_KEYFILE].freeze
47
- JSON_ENV_VARS = %w[ERROR_REPORTING_CREDENTIALS_JSON
48
- GOOGLE_CLOUD_CREDENTIALS_JSON
49
- ERROR_REPORTING_KEYFILE_JSON
50
- GOOGLE_CLOUD_KEYFILE_JSON
51
- GCLOUD_KEYFILE_JSON].freeze
52
- DEFAULT_PATHS = \
53
- ["~/.config/gcloud/application_default_credentials.json"].freeze
40
+ class Credentials < Google::Cloud::ErrorReporting::V1beta1::Credentials
54
41
  end
55
42
  end
56
43
  end
@@ -0,0 +1,40 @@
1
+ # Copyright 2018 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
+ require "googleauth"
16
+
17
+ module Google
18
+ module Cloud
19
+ module ErrorReporting
20
+ module V1beta1
21
+ class Credentials < Google::Auth::Credentials
22
+ SCOPE = [
23
+ "https://www.googleapis.com/auth/cloud-platform"
24
+ ].freeze
25
+ PATH_ENV_VARS = %w(ERROR_REPORTING_CREDENTIALS
26
+ ERROR_REPORTING_KEYFILE
27
+ GOOGLE_CLOUD_CREDENTIALS
28
+ GOOGLE_CLOUD_KEYFILE
29
+ GCLOUD_KEYFILE)
30
+ JSON_ENV_VARS = %w(ERROR_REPORTING_CREDENTIALS_JSON
31
+ ERROR_REPORTING_KEYFILE_JSON
32
+ GOOGLE_CLOUD_CREDENTIALS_JSON
33
+ GOOGLE_CLOUD_KEYFILE_JSON
34
+ GCLOUD_KEYFILE_JSON)
35
+ DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -0,0 +1,40 @@
1
+ # Copyright 2018 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
+ module Google
16
+ module Devtools
17
+ module Clouderrorreporting
18
+ module V1beta1
19
+ # A request to return an individual group.
20
+ # @!attribute [rw] group_name
21
+ # @return [String]
22
+ # [Required] The group resource name. Written as
23
+ # <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>.
24
+ # Call
25
+ # <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list">
26
+ # <code>groupStats.list</code></a> to return a list of groups belonging to
27
+ # this project.
28
+ #
29
+ # Example: <code>projects/my-project-123/groups/my-group</code>
30
+ class GetGroupRequest; end
31
+
32
+ # A request to replace the existing data for the given group.
33
+ # @!attribute [rw] group
34
+ # @return [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroup]
35
+ # [Required] The group which replaces the resource on the server.
36
+ class UpdateGroupRequest; end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,21 +15,6 @@
15
15
  module Google
16
16
  module Devtools
17
17
  module Clouderrorreporting
18
- ##
19
- # # Stackdriver Error Reporting API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [ErrorGroupServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
24
- # | [ErrorStatsServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
25
- # | [ReportErrorsServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
26
- # | [Data Types][] | Data types for Google::Cloud::ErrorReporting::V1beta1 |
27
- #
28
- # [ErrorGroupServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/errorgroupserviceclient
29
- # [ErrorStatsServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/errorstatsserviceclient
30
- # [ReportErrorsServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/reporterrorsserviceclient
31
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/datatypes
32
- #
33
18
  module V1beta1
34
19
  # Specifies a set of +ErrorGroupStats+ to return.
35
20
  # @!attribute [rw] project_name
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,21 +15,6 @@
15
15
  module Google
16
16
  module Devtools
17
17
  module Clouderrorreporting
18
- ##
19
- # # Stackdriver Error Reporting API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [ErrorGroupServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
24
- # | [ErrorStatsServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
25
- # | [ReportErrorsServiceClient][] | Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors. |
26
- # | [Data Types][] | Data types for Google::Cloud::ErrorReporting::V1beta1 |
27
- #
28
- # [ErrorGroupServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/errorgroupserviceclient
29
- # [ErrorStatsServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/errorstatsserviceclient
30
- # [ReportErrorsServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/reporterrorsserviceclient
31
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-error_reporting/latest/google/devtools/clouderrorreporting/v1beta1/datatypes
32
- #
33
18
  module V1beta1
34
19
  # A request for reporting an individual error event.
35
20
  # @!attribute [rw] project_name
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -28,7 +25,7 @@ require "pathname"
28
25
  require "google/gax"
29
26
 
30
27
  require "google/devtools/clouderrorreporting/v1beta1/error_group_service_pb"
31
- require "google/cloud/error_reporting/credentials"
28
+ require "google/cloud/error_reporting/v1beta1/credentials"
32
29
 
33
30
  module Google
34
31
  module Cloud
@@ -47,6 +44,9 @@ module Google
47
44
  # The default port of the service.
48
45
  DEFAULT_SERVICE_PORT = 443
49
46
 
47
+ # The default set of gRPC interceptors.
48
+ GRPC_INTERCEPTORS = []
49
+
50
50
  DEFAULT_TIMEOUT = 30
51
51
 
52
52
  # The scopes needed to make gRPC calls to all of the methods defined in
@@ -55,6 +55,7 @@ module Google
55
55
  "https://www.googleapis.com/auth/cloud-platform"
56
56
  ].freeze
57
57
 
58
+
58
59
  GROUP_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
59
60
  "projects/{project}/groups/{group}"
60
61
  )
@@ -96,16 +97,18 @@ module Google
96
97
  # or the specified config is missing data points.
97
98
  # @param timeout [Numeric]
98
99
  # The default timeout, in seconds, for calls made through this client.
100
+ # @param metadata [Hash]
101
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
102
+ # @param exception_transformer [Proc]
103
+ # An optional proc that intercepts any exceptions raised during an API call to inject
104
+ # custom error handling.
99
105
  def initialize \
100
- service_path: SERVICE_ADDRESS,
101
- port: DEFAULT_SERVICE_PORT,
102
- channel: nil,
103
- chan_creds: nil,
104
- updater_proc: nil,
105
106
  credentials: nil,
106
107
  scopes: ALL_SCOPES,
107
108
  client_config: {},
108
109
  timeout: DEFAULT_TIMEOUT,
110
+ metadata: nil,
111
+ exception_transformer: nil,
109
112
  lib_name: nil,
110
113
  lib_version: ""
111
114
  # These require statements are intentionally placed here to initialize
@@ -114,21 +117,10 @@ module Google
114
117
  require "google/gax/grpc"
115
118
  require "google/devtools/clouderrorreporting/v1beta1/error_group_service_services_pb"
116
119
 
117
- if channel || chan_creds || updater_proc
118
- warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
119
- "on 2017/09/08"
120
- credentials ||= channel
121
- credentials ||= chan_creds
122
- credentials ||= updater_proc
123
- end
124
- if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
125
- warn "`service_path` and `port` parameters are deprecated and will be removed"
126
- end
127
-
128
- credentials ||= Google::Cloud::ErrorReporting::Credentials.default
120
+ credentials ||= Google::Cloud::ErrorReporting::V1beta1::Credentials.default
129
121
 
130
122
  if credentials.is_a?(String) || credentials.is_a?(Hash)
131
- updater_proc = Google::Cloud::ErrorReporting::Credentials.new(credentials).updater_proc
123
+ updater_proc = Google::Cloud::ErrorReporting::V1beta1::Credentials.new(credentials).updater_proc
132
124
  end
133
125
  if credentials.is_a?(GRPC::Core::Channel)
134
126
  channel = credentials
@@ -143,13 +135,16 @@ module Google
143
135
  updater_proc = credentials.updater_proc
144
136
  end
145
137
 
138
+ package_version = Gem.loaded_specs['google-cloud-error_reporting'].version.version
139
+
146
140
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
147
141
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
148
- google_api_client << " gapic/0.1.0 gax/#{Google::Gax::VERSION}"
142
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
149
143
  google_api_client << " grpc/#{GRPC::VERSION}"
150
144
  google_api_client.freeze
151
145
 
152
146
  headers = { :"x-goog-api-client" => google_api_client }
147
+ headers.merge!(metadata) unless metadata.nil?
153
148
  client_config_file = Pathname.new(__dir__).join(
154
149
  "error_group_service_client_config.json"
155
150
  )
@@ -161,9 +156,14 @@ module Google
161
156
  Google::Gax::Grpc::STATUS_CODE_NAMES,
162
157
  timeout,
163
158
  errors: Google::Gax::Grpc::API_ERRORS,
164
- kwargs: headers
159
+ metadata: headers
165
160
  )
166
161
  end
162
+
163
+ # Allow overriding the service path/port in subclasses.
164
+ service_path = self.class::SERVICE_ADDRESS
165
+ port = self.class::DEFAULT_SERVICE_PORT
166
+ interceptors = self.class::GRPC_INTERCEPTORS
167
167
  @error_group_service_stub = Google::Gax::Grpc.create_stub(
168
168
  service_path,
169
169
  port,
@@ -171,16 +171,19 @@ module Google
171
171
  channel: channel,
172
172
  updater_proc: updater_proc,
173
173
  scopes: scopes,
174
+ interceptors: interceptors,
174
175
  &Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupService::Stub.method(:new)
175
176
  )
176
177
 
177
178
  @get_group = Google::Gax.create_api_call(
178
179
  @error_group_service_stub.method(:get_group),
179
- defaults["get_group"]
180
+ defaults["get_group"],
181
+ exception_transformer: exception_transformer
180
182
  )
181
183
  @update_group = Google::Gax.create_api_call(
182
184
  @error_group_service_stub.method(:update_group),
183
- defaults["update_group"]
185
+ defaults["update_group"],
186
+ exception_transformer: exception_transformer
184
187
  )
185
188
  end
186
189
 
@@ -200,23 +203,27 @@ module Google
200
203
  # @param options [Google::Gax::CallOptions]
201
204
  # Overrides the default settings for this call, e.g, timeout,
202
205
  # retries, etc.
206
+ # @yield [result, operation] Access the result along with the RPC operation
207
+ # @yieldparam result [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroup]
208
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
203
209
  # @return [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroup]
204
210
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
205
211
  # @example
206
- # require "google/cloud/error_reporting/v1beta1"
212
+ # require "google/cloud/error_reporting"
207
213
  #
208
- # error_group_service_client = Google::Cloud::ErrorReporting::V1beta1::ErrorGroup.new
214
+ # error_group_service_client = Google::Cloud::ErrorReporting::ErrorGroup.new(version: :v1beta1)
209
215
  # formatted_group_name = Google::Cloud::ErrorReporting::V1beta1::ErrorGroupServiceClient.group_path("[PROJECT]", "[GROUP]")
210
216
  # response = error_group_service_client.get_group(formatted_group_name)
211
217
 
212
218
  def get_group \
213
219
  group_name,
214
- options: nil
220
+ options: nil,
221
+ &block
215
222
  req = {
216
223
  group_name: group_name
217
224
  }.delete_if { |_, v| v.nil? }
218
225
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::GetGroupRequest)
219
- @get_group.call(req, options)
226
+ @get_group.call(req, options, &block)
220
227
  end
221
228
 
222
229
  # Replace the data for the specified group.
@@ -229,23 +236,29 @@ module Google
229
236
  # @param options [Google::Gax::CallOptions]
230
237
  # Overrides the default settings for this call, e.g, timeout,
231
238
  # retries, etc.
239
+ # @yield [result, operation] Access the result along with the RPC operation
240
+ # @yieldparam result [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroup]
241
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
232
242
  # @return [Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroup]
233
243
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
234
244
  # @example
235
- # require "google/cloud/error_reporting/v1beta1"
245
+ # require "google/cloud/error_reporting"
246
+ #
247
+ # error_group_service_client = Google::Cloud::ErrorReporting::ErrorGroup.new(version: :v1beta1)
236
248
  #
237
- # error_group_service_client = Google::Cloud::ErrorReporting::V1beta1::ErrorGroup.new
249
+ # # TODO: Initialize +group+:
238
250
  # group = {}
239
251
  # response = error_group_service_client.update_group(group)
240
252
 
241
253
  def update_group \
242
254
  group,
243
- options: nil
255
+ options: nil,
256
+ &block
244
257
  req = {
245
258
  group: group
246
259
  }.delete_if { |_, v| v.nil? }
247
260
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::UpdateGroupRequest)
248
- @update_group.call(req, options)
261
+ @update_group.call(req, options, &block)
249
262
  end
250
263
  end
251
264
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -28,7 +25,7 @@ require "pathname"
28
25
  require "google/gax"
29
26
 
30
27
  require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_pb"
31
- require "google/cloud/error_reporting/credentials"
28
+ require "google/cloud/error_reporting/v1beta1/credentials"
32
29
 
33
30
  module Google
34
31
  module Cloud
@@ -48,6 +45,9 @@ module Google
48
45
  # The default port of the service.
49
46
  DEFAULT_SERVICE_PORT = 443
50
47
 
48
+ # The default set of gRPC interceptors.
49
+ GRPC_INTERCEPTORS = []
50
+
51
51
  DEFAULT_TIMEOUT = 30
52
52
 
53
53
  PAGE_DESCRIPTORS = {
@@ -69,6 +69,7 @@ module Google
69
69
  "https://www.googleapis.com/auth/cloud-platform"
70
70
  ].freeze
71
71
 
72
+
72
73
  PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
73
74
  "projects/{project}"
74
75
  )
@@ -108,16 +109,18 @@ module Google
108
109
  # or the specified config is missing data points.
109
110
  # @param timeout [Numeric]
110
111
  # The default timeout, in seconds, for calls made through this client.
112
+ # @param metadata [Hash]
113
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
114
+ # @param exception_transformer [Proc]
115
+ # An optional proc that intercepts any exceptions raised during an API call to inject
116
+ # custom error handling.
111
117
  def initialize \
112
- service_path: SERVICE_ADDRESS,
113
- port: DEFAULT_SERVICE_PORT,
114
- channel: nil,
115
- chan_creds: nil,
116
- updater_proc: nil,
117
118
  credentials: nil,
118
119
  scopes: ALL_SCOPES,
119
120
  client_config: {},
120
121
  timeout: DEFAULT_TIMEOUT,
122
+ metadata: nil,
123
+ exception_transformer: nil,
121
124
  lib_name: nil,
122
125
  lib_version: ""
123
126
  # These require statements are intentionally placed here to initialize
@@ -126,21 +129,10 @@ module Google
126
129
  require "google/gax/grpc"
127
130
  require "google/devtools/clouderrorreporting/v1beta1/error_stats_service_services_pb"
128
131
 
129
- if channel || chan_creds || updater_proc
130
- warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
131
- "on 2017/09/08"
132
- credentials ||= channel
133
- credentials ||= chan_creds
134
- credentials ||= updater_proc
135
- end
136
- if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
137
- warn "`service_path` and `port` parameters are deprecated and will be removed"
138
- end
139
-
140
- credentials ||= Google::Cloud::ErrorReporting::Credentials.default
132
+ credentials ||= Google::Cloud::ErrorReporting::V1beta1::Credentials.default
141
133
 
142
134
  if credentials.is_a?(String) || credentials.is_a?(Hash)
143
- updater_proc = Google::Cloud::ErrorReporting::Credentials.new(credentials).updater_proc
135
+ updater_proc = Google::Cloud::ErrorReporting::V1beta1::Credentials.new(credentials).updater_proc
144
136
  end
145
137
  if credentials.is_a?(GRPC::Core::Channel)
146
138
  channel = credentials
@@ -155,13 +147,16 @@ module Google
155
147
  updater_proc = credentials.updater_proc
156
148
  end
157
149
 
150
+ package_version = Gem.loaded_specs['google-cloud-error_reporting'].version.version
151
+
158
152
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
159
153
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
160
- google_api_client << " gapic/0.1.0 gax/#{Google::Gax::VERSION}"
154
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
161
155
  google_api_client << " grpc/#{GRPC::VERSION}"
162
156
  google_api_client.freeze
163
157
 
164
158
  headers = { :"x-goog-api-client" => google_api_client }
159
+ headers.merge!(metadata) unless metadata.nil?
165
160
  client_config_file = Pathname.new(__dir__).join(
166
161
  "error_stats_service_client_config.json"
167
162
  )
@@ -174,9 +169,14 @@ module Google
174
169
  timeout,
175
170
  page_descriptors: PAGE_DESCRIPTORS,
176
171
  errors: Google::Gax::Grpc::API_ERRORS,
177
- kwargs: headers
172
+ metadata: headers
178
173
  )
179
174
  end
175
+
176
+ # Allow overriding the service path/port in subclasses.
177
+ service_path = self.class::SERVICE_ADDRESS
178
+ port = self.class::DEFAULT_SERVICE_PORT
179
+ interceptors = self.class::GRPC_INTERCEPTORS
180
180
  @error_stats_service_stub = Google::Gax::Grpc.create_stub(
181
181
  service_path,
182
182
  port,
@@ -184,20 +184,24 @@ module Google
184
184
  channel: channel,
185
185
  updater_proc: updater_proc,
186
186
  scopes: scopes,
187
+ interceptors: interceptors,
187
188
  &Google::Devtools::Clouderrorreporting::V1beta1::ErrorStatsService::Stub.method(:new)
188
189
  )
189
190
 
190
191
  @list_group_stats = Google::Gax.create_api_call(
191
192
  @error_stats_service_stub.method(:list_group_stats),
192
- defaults["list_group_stats"]
193
+ defaults["list_group_stats"],
194
+ exception_transformer: exception_transformer
193
195
  )
194
196
  @list_events = Google::Gax.create_api_call(
195
197
  @error_stats_service_stub.method(:list_events),
196
- defaults["list_events"]
198
+ defaults["list_events"],
199
+ exception_transformer: exception_transformer
197
200
  )
198
201
  @delete_events = Google::Gax.create_api_call(
199
202
  @error_stats_service_stub.method(:delete_events),
200
- defaults["delete_events"]
203
+ defaults["delete_events"],
204
+ exception_transformer: exception_transformer
201
205
  )
202
206
  end
203
207
 
@@ -255,6 +259,9 @@ module Google
255
259
  # @param options [Google::Gax::CallOptions]
256
260
  # Overrides the default settings for this call, e.g, timeout,
257
261
  # retries, etc.
262
+ # @yield [result, operation] Access the result along with the RPC operation
263
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats>]
264
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
258
265
  # @return [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats>]
259
266
  # An enumerable of Google::Devtools::Clouderrorreporting::V1beta1::ErrorGroupStats instances.
260
267
  # See Google::Gax::PagedEnumerable documentation for other
@@ -262,10 +269,12 @@ module Google
262
269
  # object.
263
270
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
264
271
  # @example
265
- # require "google/cloud/error_reporting/v1beta1"
272
+ # require "google/cloud/error_reporting"
266
273
  #
267
- # error_stats_service_client = Google::Cloud::ErrorReporting::V1beta1::ErrorStats.new
274
+ # error_stats_service_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
268
275
  # formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
276
+ #
277
+ # # TODO: Initialize +time_range+:
269
278
  # time_range = {}
270
279
  #
271
280
  # # Iterate over all results.
@@ -291,7 +300,8 @@ module Google
291
300
  alignment_time: nil,
292
301
  order: nil,
293
302
  page_size: nil,
294
- options: nil
303
+ options: nil,
304
+ &block
295
305
  req = {
296
306
  project_name: project_name,
297
307
  time_range: time_range,
@@ -304,7 +314,7 @@ module Google
304
314
  page_size: page_size
305
315
  }.delete_if { |_, v| v.nil? }
306
316
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::ListGroupStatsRequest)
307
- @list_group_stats.call(req, options)
317
+ @list_group_stats.call(req, options, &block)
308
318
  end
309
319
 
310
320
  # Lists the specified events.
@@ -338,6 +348,9 @@ module Google
338
348
  # @param options [Google::Gax::CallOptions]
339
349
  # Overrides the default settings for this call, e.g, timeout,
340
350
  # retries, etc.
351
+ # @yield [result, operation] Access the result along with the RPC operation
352
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent>]
353
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
341
354
  # @return [Google::Gax::PagedEnumerable<Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent>]
342
355
  # An enumerable of Google::Devtools::Clouderrorreporting::V1beta1::ErrorEvent instances.
343
356
  # See Google::Gax::PagedEnumerable documentation for other
@@ -345,10 +358,12 @@ module Google
345
358
  # object.
346
359
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
347
360
  # @example
348
- # require "google/cloud/error_reporting/v1beta1"
361
+ # require "google/cloud/error_reporting"
349
362
  #
350
- # error_stats_service_client = Google::Cloud::ErrorReporting::V1beta1::ErrorStats.new
363
+ # error_stats_service_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
351
364
  # formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
365
+ #
366
+ # # TODO: Initialize +group_id+:
352
367
  # group_id = ''
353
368
  #
354
369
  # # Iterate over all results.
@@ -370,7 +385,8 @@ module Google
370
385
  service_filter: nil,
371
386
  time_range: nil,
372
387
  page_size: nil,
373
- options: nil
388
+ options: nil,
389
+ &block
374
390
  req = {
375
391
  project_name: project_name,
376
392
  group_id: group_id,
@@ -379,7 +395,7 @@ module Google
379
395
  page_size: page_size
380
396
  }.delete_if { |_, v| v.nil? }
381
397
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::ListEventsRequest)
382
- @list_events.call(req, options)
398
+ @list_events.call(req, options, &block)
383
399
  end
384
400
 
385
401
  # Deletes all error events of a given project.
@@ -393,23 +409,27 @@ module Google
393
409
  # @param options [Google::Gax::CallOptions]
394
410
  # Overrides the default settings for this call, e.g, timeout,
395
411
  # retries, etc.
412
+ # @yield [result, operation] Access the result along with the RPC operation
413
+ # @yieldparam result [Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsResponse]
414
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
396
415
  # @return [Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsResponse]
397
416
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
398
417
  # @example
399
- # require "google/cloud/error_reporting/v1beta1"
418
+ # require "google/cloud/error_reporting"
400
419
  #
401
- # error_stats_service_client = Google::Cloud::ErrorReporting::V1beta1::ErrorStats.new
420
+ # error_stats_service_client = Google::Cloud::ErrorReporting::ErrorStats.new(version: :v1beta1)
402
421
  # formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsServiceClient.project_path("[PROJECT]")
403
422
  # response = error_stats_service_client.delete_events(formatted_project_name)
404
423
 
405
424
  def delete_events \
406
425
  project_name,
407
- options: nil
426
+ options: nil,
427
+ &block
408
428
  req = {
409
429
  project_name: project_name
410
430
  }.delete_if { |_, v| v.nil? }
411
431
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::DeleteEventsRequest)
412
- @delete_events.call(req, options)
432
+ @delete_events.call(req, options, &block)
413
433
  end
414
434
  end
415
435
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2017 Google LLC
1
+ # Copyright 2018 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
18
18
  # and updates to that file get reflected here through a refresh process.
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
- #
22
- # The only allowed edits are to method and file documentation. A 3-way
23
- # merge preserves those additions if the generated source changes.
24
21
 
25
22
  require "json"
26
23
  require "pathname"
@@ -28,7 +25,7 @@ require "pathname"
28
25
  require "google/gax"
29
26
 
30
27
  require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_pb"
31
- require "google/cloud/error_reporting/credentials"
28
+ require "google/cloud/error_reporting/v1beta1/credentials"
32
29
 
33
30
  module Google
34
31
  module Cloud
@@ -47,6 +44,9 @@ module Google
47
44
  # The default port of the service.
48
45
  DEFAULT_SERVICE_PORT = 443
49
46
 
47
+ # The default set of gRPC interceptors.
48
+ GRPC_INTERCEPTORS = []
49
+
50
50
  DEFAULT_TIMEOUT = 30
51
51
 
52
52
  # The scopes needed to make gRPC calls to all of the methods defined in
@@ -55,6 +55,7 @@ module Google
55
55
  "https://www.googleapis.com/auth/cloud-platform"
56
56
  ].freeze
57
57
 
58
+
58
59
  PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
59
60
  "projects/{project}"
60
61
  )
@@ -94,16 +95,18 @@ module Google
94
95
  # or the specified config is missing data points.
95
96
  # @param timeout [Numeric]
96
97
  # The default timeout, in seconds, for calls made through this client.
98
+ # @param metadata [Hash]
99
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
100
+ # @param exception_transformer [Proc]
101
+ # An optional proc that intercepts any exceptions raised during an API call to inject
102
+ # custom error handling.
97
103
  def initialize \
98
- service_path: SERVICE_ADDRESS,
99
- port: DEFAULT_SERVICE_PORT,
100
- channel: nil,
101
- chan_creds: nil,
102
- updater_proc: nil,
103
104
  credentials: nil,
104
105
  scopes: ALL_SCOPES,
105
106
  client_config: {},
106
107
  timeout: DEFAULT_TIMEOUT,
108
+ metadata: nil,
109
+ exception_transformer: nil,
107
110
  lib_name: nil,
108
111
  lib_version: ""
109
112
  # These require statements are intentionally placed here to initialize
@@ -112,21 +115,10 @@ module Google
112
115
  require "google/gax/grpc"
113
116
  require "google/devtools/clouderrorreporting/v1beta1/report_errors_service_services_pb"
114
117
 
115
- if channel || chan_creds || updater_proc
116
- warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
117
- "on 2017/09/08"
118
- credentials ||= channel
119
- credentials ||= chan_creds
120
- credentials ||= updater_proc
121
- end
122
- if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
123
- warn "`service_path` and `port` parameters are deprecated and will be removed"
124
- end
125
-
126
- credentials ||= Google::Cloud::ErrorReporting::Credentials.default
118
+ credentials ||= Google::Cloud::ErrorReporting::V1beta1::Credentials.default
127
119
 
128
120
  if credentials.is_a?(String) || credentials.is_a?(Hash)
129
- updater_proc = Google::Cloud::ErrorReporting::Credentials.new(credentials).updater_proc
121
+ updater_proc = Google::Cloud::ErrorReporting::V1beta1::Credentials.new(credentials).updater_proc
130
122
  end
131
123
  if credentials.is_a?(GRPC::Core::Channel)
132
124
  channel = credentials
@@ -141,13 +133,16 @@ module Google
141
133
  updater_proc = credentials.updater_proc
142
134
  end
143
135
 
136
+ package_version = Gem.loaded_specs['google-cloud-error_reporting'].version.version
137
+
144
138
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
145
139
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
146
- google_api_client << " gapic/0.1.0 gax/#{Google::Gax::VERSION}"
140
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
147
141
  google_api_client << " grpc/#{GRPC::VERSION}"
148
142
  google_api_client.freeze
149
143
 
150
144
  headers = { :"x-goog-api-client" => google_api_client }
145
+ headers.merge!(metadata) unless metadata.nil?
151
146
  client_config_file = Pathname.new(__dir__).join(
152
147
  "report_errors_service_client_config.json"
153
148
  )
@@ -159,9 +154,14 @@ module Google
159
154
  Google::Gax::Grpc::STATUS_CODE_NAMES,
160
155
  timeout,
161
156
  errors: Google::Gax::Grpc::API_ERRORS,
162
- kwargs: headers
157
+ metadata: headers
163
158
  )
164
159
  end
160
+
161
+ # Allow overriding the service path/port in subclasses.
162
+ service_path = self.class::SERVICE_ADDRESS
163
+ port = self.class::DEFAULT_SERVICE_PORT
164
+ interceptors = self.class::GRPC_INTERCEPTORS
165
165
  @report_errors_service_stub = Google::Gax::Grpc.create_stub(
166
166
  service_path,
167
167
  port,
@@ -169,12 +169,14 @@ module Google
169
169
  channel: channel,
170
170
  updater_proc: updater_proc,
171
171
  scopes: scopes,
172
+ interceptors: interceptors,
172
173
  &Google::Devtools::Clouderrorreporting::V1beta1::ReportErrorsService::Stub.method(:new)
173
174
  )
174
175
 
175
176
  @report_error_event = Google::Gax.create_api_call(
176
177
  @report_errors_service_stub.method(:report_error_event),
177
- defaults["report_error_event"]
178
+ defaults["report_error_event"],
179
+ exception_transformer: exception_transformer
178
180
  )
179
181
  end
180
182
 
@@ -201,26 +203,32 @@ module Google
201
203
  # @param options [Google::Gax::CallOptions]
202
204
  # Overrides the default settings for this call, e.g, timeout,
203
205
  # retries, etc.
206
+ # @yield [result, operation] Access the result along with the RPC operation
207
+ # @yieldparam result [Google::Devtools::Clouderrorreporting::V1beta1::ReportErrorEventResponse]
208
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
204
209
  # @return [Google::Devtools::Clouderrorreporting::V1beta1::ReportErrorEventResponse]
205
210
  # @raise [Google::Gax::GaxError] if the RPC is aborted.
206
211
  # @example
207
- # require "google/cloud/error_reporting/v1beta1"
212
+ # require "google/cloud/error_reporting"
208
213
  #
209
- # report_errors_service_client = Google::Cloud::ErrorReporting::V1beta1::ReportErrors.new
214
+ # report_errors_service_client = Google::Cloud::ErrorReporting::ReportErrors.new(version: :v1beta1)
210
215
  # formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ReportErrorsServiceClient.project_path("[PROJECT]")
216
+ #
217
+ # # TODO: Initialize +event+:
211
218
  # event = {}
212
219
  # response = report_errors_service_client.report_error_event(formatted_project_name, event)
213
220
 
214
221
  def report_error_event \
215
222
  project_name,
216
223
  event,
217
- options: nil
224
+ options: nil,
225
+ &block
218
226
  req = {
219
227
  project_name: project_name,
220
228
  event: event
221
229
  }.delete_if { |_, v| v.nil? }
222
230
  req = Google::Gax::to_proto(req, Google::Devtools::Clouderrorreporting::V1beta1::ReportErrorEventRequest)
223
- @report_error_event.call(req, options)
231
+ @report_error_event.call(req, options, &block)
224
232
  end
225
233
  end
226
234
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module ErrorReporting
19
- VERSION = "0.30.1".freeze
19
+ VERSION = "0.30.2".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-error_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.1
4
+ version: 0.30.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-06 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '5.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: redcarpet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rubocop
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -213,12 +227,13 @@ files:
213
227
  - lib/google/cloud/error_reporting/rails.rb
214
228
  - lib/google/cloud/error_reporting/service.rb
215
229
  - lib/google/cloud/error_reporting/v1beta1.rb
230
+ - lib/google/cloud/error_reporting/v1beta1/credentials.rb
216
231
  - lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/common.rb
232
+ - lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_group_service.rb
217
233
  - lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/error_stats_service.rb
218
234
  - lib/google/cloud/error_reporting/v1beta1/doc/google/devtools/clouderrorreporting/v1beta1/report_errors_service.rb
219
235
  - lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/duration.rb
220
236
  - lib/google/cloud/error_reporting/v1beta1/doc/google/protobuf/timestamp.rb
221
- - lib/google/cloud/error_reporting/v1beta1/doc/overview.rb
222
237
  - lib/google/cloud/error_reporting/v1beta1/error_group_service_client.rb
223
238
  - lib/google/cloud/error_reporting/v1beta1/error_group_service_client_config.json
224
239
  - lib/google/cloud/error_reporting/v1beta1/error_stats_service_client.rb
@@ -1,82 +0,0 @@
1
- # Copyright 2017 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
- module Google
16
- module Cloud
17
- # rubocop:disable LineLength
18
-
19
- ##
20
- # # Ruby Client for Stackdriver Error Reporting API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
21
- #
22
- # [Stackdriver Error Reporting API][Product Documentation]:
23
- # Stackdriver Error Reporting groups and counts similar errors from cloud
24
- # services. The Stackdriver Error Reporting API provides a way to report new
25
- # errors and read access to error groups and their associated errors.
26
- # - [Product Documentation][]
27
- #
28
- # ## Quick Start
29
- # In order to use this library, you first need to go through the following
30
- # steps:
31
- #
32
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
33
- # 2. [Enable the Stackdriver Error Reporting API.](https://console.cloud.google.com/apis/api/error-reporting)
34
- # 3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
35
- #
36
- # ### Installation
37
- # ```
38
- # $ gem install google-cloud-error_reporting
39
- # ```
40
- #
41
- # ### Preview
42
- # #### ReportErrorsServiceClient
43
- # ```rb
44
- # require "google/cloud/error_reporting"
45
- #
46
- # report_errors_service_client = Google::Cloud::ErrorReporting::ReportErrors.new
47
- # formatted_project_name = Google::Cloud::ErrorReporting::V1beta1::ReportErrorsServiceClient.project_path(project_id)
48
- # message = "[MESSAGE]"
49
- # service = "[SERVICE]"
50
- # service_context = { service: service }
51
- # file_path = "path/to/file.lang"
52
- # line_number = 42
53
- # function_name = "meaningOfLife"
54
- # report_location = {
55
- # file_path: file_path,
56
- # line_number: line_number,
57
- # function_name: function_name
58
- # }
59
- # context = { report_location: report_location }
60
- # event = {
61
- # message: message,
62
- # service_context: service_context,
63
- # context: context
64
- # }
65
- # response = report_errors_service_client.report_error_event(formatted_project_name, event)
66
- # ```
67
- #
68
- # ### Next Steps
69
- # - Read the [Stackdriver Error Reporting API Product documentation][Product Documentation]
70
- # to learn more about the product and see How-to Guides.
71
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
72
- # to see the full list of Cloud APIs that we cover.
73
- #
74
- # [Product Documentation]: https://cloud.google.com/error-reporting
75
- #
76
- #
77
- module ErrorReporting
78
- module V1beta1
79
- end
80
- end
81
- end
82
- end