google-cloud-error_reporting 0.31.1 → 0.31.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/google/cloud/error_reporting/error_event.rb +62 -50
- data/lib/google/cloud/error_reporting/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4612ee47375f0a7cccc0a0a1e7a032855993f9111f8f98f835ef518d6f53390
|
4
|
+
data.tar.gz: d6baa8f717a81ab71e0b77940beb5873b748af7d920842c2e7645b0b195c8b98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e08399c8762312dc2e3e7cc1aa1439c575c1ed3d7b97506b20914e6749fa10417a3dbf200960eea17618799c189370e16d5ac2a62e4fe89a04f8804aa3a45e
|
7
|
+
data.tar.gz: 2f7ccb7244bbd53245be67e5f9e40174ce40cce5da7f07b2efd7a32a10287bddd53e5303b4b536ea1a0fbafca183002a760584536fbf278d6d7580ad7fbe0dd1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.31.2 / 2019-02-09
|
4
|
+
|
5
|
+
* Fix conversion code for ErrorEvent and Debugee.
|
6
|
+
* Prepare for changes in JSON serialization coming in
|
7
|
+
google-protobuf 3.7.
|
8
|
+
|
3
9
|
### 0.31.1 / 2019-02-07
|
4
10
|
|
5
11
|
* Update concurrent-ruby dependency
|
@@ -16,7 +22,7 @@
|
|
16
22
|
This value was added in googleauth 0.7.0.
|
17
23
|
* Loosen googleauth dependency
|
18
24
|
Allow for new releases up to 0.10.
|
19
|
-
The googleauth devs have committed to
|
25
|
+
The googleauth devs have committed to maintaining the current API
|
20
26
|
and will not make backwards compatible changes before 0.10.
|
21
27
|
|
22
28
|
### 0.30.5 / 2018-09-20
|
@@ -238,74 +238,86 @@ module Google
|
|
238
238
|
# @return [Devtools::Clouderrorreporting::V1beta1::ReportedErrorEvent]
|
239
239
|
# gRPC struct that represent an ErrorEvent.
|
240
240
|
def to_grpc
|
241
|
-
|
242
|
-
event_time:
|
243
|
-
message: message,
|
244
|
-
service_context:
|
245
|
-
context:
|
246
|
-
|
247
|
-
|
248
|
-
grpc_class =
|
249
|
-
Devtools::Clouderrorreporting::V1beta1::ReportedErrorEvent
|
250
|
-
grpc_class.decode_json error_event_hash.to_json
|
241
|
+
Devtools::Clouderrorreporting::V1beta1::ReportedErrorEvent.new(
|
242
|
+
event_time: event_time_grpc,
|
243
|
+
message: message.to_s,
|
244
|
+
service_context: service_context_grpc,
|
245
|
+
context: error_context_grpc
|
246
|
+
)
|
251
247
|
end
|
252
248
|
|
253
249
|
private
|
254
250
|
|
255
251
|
##
|
256
|
-
# @private Formats the event_time as
|
257
|
-
# Google::Protobuf::Timestamp struct.
|
252
|
+
# @private Formats the event_time as a Google::Protobuf::Timestamp.
|
258
253
|
#
|
259
|
-
def
|
254
|
+
def event_time_grpc
|
260
255
|
return nil if event_time.nil?
|
261
|
-
|
256
|
+
Google::Protobuf::Timestamp.new(
|
262
257
|
seconds: event_time.to_i,
|
263
258
|
nanos: event_time.nsec
|
264
|
-
|
259
|
+
)
|
265
260
|
end
|
266
261
|
|
267
262
|
##
|
268
|
-
# @private Formats the service_name and service_version as
|
269
|
-
#
|
270
|
-
# Google::Devtools::Clouderrorreporting::V1beta1::SourceContext struct.
|
263
|
+
# @private Formats the service_name and service_version as a
|
264
|
+
# Google::Devtools::Clouderrorreporting::V1beta1::ServiceContext.
|
271
265
|
#
|
272
|
-
def
|
266
|
+
def service_context_grpc
|
273
267
|
return nil if !service_name && !service_version
|
274
|
-
|
275
|
-
service: service_name,
|
276
|
-
version: service_version
|
277
|
-
|
268
|
+
Devtools::Clouderrorreporting::V1beta1::ServiceContext.new(
|
269
|
+
service: service_name.to_s,
|
270
|
+
version: service_version.to_s
|
271
|
+
)
|
272
|
+
end
|
273
|
+
|
274
|
+
# rubocop:disable Metrics/AbcSize
|
275
|
+
|
276
|
+
##
|
277
|
+
# @private Formats the http request context as a
|
278
|
+
# Google::Devtools::Clouderrorreporting::V1beta1::HttpRequestContext
|
279
|
+
#
|
280
|
+
def http_request_grpc
|
281
|
+
return nil if !http_method && !http_url && !http_user_agent &&
|
282
|
+
!http_referrer && !http_status && !http_remote_ip
|
283
|
+
Devtools::Clouderrorreporting::V1beta1::HttpRequestContext.new(
|
284
|
+
method: http_method.to_s,
|
285
|
+
url: http_url.to_s,
|
286
|
+
user_agent: http_user_agent.to_s,
|
287
|
+
referrer: http_referrer.to_s,
|
288
|
+
response_status_code: http_status.to_i,
|
289
|
+
remote_ip: http_remote_ip.to_s
|
290
|
+
)
|
291
|
+
end
|
292
|
+
|
293
|
+
# rubocop:enable Metrics/AbcSize
|
294
|
+
|
295
|
+
##
|
296
|
+
# @private Formats the source location as a
|
297
|
+
# Google::Devtools::Clouderrorreporting::V1beta1::SourceLocation
|
298
|
+
#
|
299
|
+
def source_location_grpc
|
300
|
+
return nil if !file_path && !line_number && !function_name
|
301
|
+
Devtools::Clouderrorreporting::V1beta1::SourceLocation.new(
|
302
|
+
file_path: file_path.to_s,
|
303
|
+
line_number: line_number.to_i,
|
304
|
+
function_name: function_name.to_s
|
305
|
+
)
|
278
306
|
end
|
279
307
|
|
280
308
|
##
|
281
|
-
# @private Formats the error context info as
|
282
|
-
#
|
283
|
-
# Google::Devtools::Clouderrorreporting::V1beta1::ErrorContext struct.
|
309
|
+
# @private Formats the error context info as a
|
310
|
+
# Google::Devtools::Clouderrorreporting::V1beta1::ErrorContext
|
284
311
|
#
|
285
|
-
def
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
source_location_hash = {
|
296
|
-
file_path: file_path,
|
297
|
-
line_number: line_number,
|
298
|
-
function_name: function_name
|
299
|
-
}.delete_if { |_, v| v.nil? }
|
300
|
-
|
301
|
-
result = {
|
302
|
-
http_request: http_request_hash.empty? ? nil : http_request_hash,
|
303
|
-
user: user,
|
304
|
-
report_location:
|
305
|
-
source_location_hash.empty? ? nil : source_location_hash
|
306
|
-
}.delete_if { |_, v| v.nil? }
|
307
|
-
|
308
|
-
result.empty? ? nil : result
|
312
|
+
def error_context_grpc
|
313
|
+
http_request = http_request_grpc
|
314
|
+
source_location = source_location_grpc
|
315
|
+
return nil if !http_request && !source_location && !user
|
316
|
+
Devtools::Clouderrorreporting::V1beta1::ErrorContext.new(
|
317
|
+
http_request: http_request,
|
318
|
+
user: user.to_s,
|
319
|
+
report_location: source_location
|
320
|
+
)
|
309
321
|
end
|
310
322
|
end
|
311
323
|
end
|
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.31.
|
4
|
+
version: 0.31.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: 2019-02-
|
11
|
+
date: 2019-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|