google-cloud-error_reporting 0.41.0 → 0.42.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +2 -2
- data/LOGGING.md +1 -1
- data/lib/google/cloud/error_reporting/async_error_reporter.rb +2 -2
- data/lib/google/cloud/error_reporting/middleware.rb +5 -5
- data/lib/google/cloud/error_reporting/rails.rb +2 -2
- data/lib/google/cloud/error_reporting/service.rb +4 -1
- data/lib/google/cloud/error_reporting/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d0236b7db5323c5ab86adccc9a0fcad7db65080f4a7ff47142fd6645cc50008
|
4
|
+
data.tar.gz: bda4d6819f6a6063097a4874b80a939dbc13afe32531cac53488a3f5019a7045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70094df759c28f7ce883dc90d35bd1a820171ce41ddc03ea06f4b8f504f3f43891ecfb10e225d11d5de9224842e243c4f14e0b980f035a1e70edc2032ba98352
|
7
|
+
data.tar.gz: 4a2c39a5ee27364915bd340296f52dc5554c7e8f8a703c0bd3922b3b711e6ae87e9f44df0837bdb41bf7980c1377a0261624fac8723dc4f4c4ff24a475d3007d
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
|
|
24
24
|
In order to use the google-cloud-error_reporting console and run the project's
|
25
25
|
tests, there is a small amount of setup:
|
26
26
|
|
27
|
-
1. Install Ruby. google-cloud-error_reporting requires Ruby 2.
|
27
|
+
1. Install Ruby. google-cloud-error_reporting requires Ruby 2.5+. You may choose
|
28
28
|
to manage your Ruby and gem installations with [RVM](https://rvm.io/),
|
29
29
|
[rbenv](https://github.com/rbenv/rbenv), or
|
30
30
|
[chruby](https://github.com/postmodern/chruby).
|
@@ -45,7 +45,7 @@ tests, there is a small amount of setup:
|
|
45
45
|
|
46
46
|
```sh
|
47
47
|
$ cd google-cloud-error_reporting/
|
48
|
-
$ bundle
|
48
|
+
$ bundle install
|
49
49
|
```
|
50
50
|
|
51
51
|
## Console
|
data/LOGGING.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
To enable logging for this library, set the logger for the underlying
|
4
4
|
[gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger
|
5
5
|
that you set may be a Ruby stdlib
|
6
|
-
[`Logger`](https://ruby-doc.org/stdlib
|
6
|
+
[`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as
|
7
7
|
shown below, or a
|
8
8
|
[`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
9
9
|
that will write logs to [Stackdriver
|
@@ -108,7 +108,7 @@ module Google
|
|
108
108
|
#
|
109
109
|
# @return [AsyncErrorReporter] returns self so calls can be chained.
|
110
110
|
def stop
|
111
|
-
@thread_pool
|
111
|
+
@thread_pool&.shutdown
|
112
112
|
|
113
113
|
self
|
114
114
|
end
|
@@ -145,7 +145,7 @@ module Google
|
|
145
145
|
# @return [boolean] `true` when started, `false` otherwise.
|
146
146
|
#
|
147
147
|
def started?
|
148
|
-
@thread_pool
|
148
|
+
@thread_pool&.running?
|
149
149
|
end
|
150
150
|
|
151
151
|
##
|
@@ -50,7 +50,7 @@ module Google
|
|
50
50
|
require "rack/request"
|
51
51
|
@app = app
|
52
52
|
|
53
|
-
load_config
|
53
|
+
load_config(**kwargs)
|
54
54
|
|
55
55
|
@error_reporting =
|
56
56
|
error_reporting ||
|
@@ -86,11 +86,11 @@ module Google
|
|
86
86
|
end
|
87
87
|
|
88
88
|
response
|
89
|
-
rescue Exception =>
|
90
|
-
report_exception env,
|
89
|
+
rescue Exception => e
|
90
|
+
report_exception env, e
|
91
91
|
|
92
92
|
# Always raise exception backup
|
93
|
-
raise
|
93
|
+
raise e
|
94
94
|
end
|
95
95
|
|
96
96
|
##
|
@@ -112,7 +112,7 @@ module Google
|
|
112
112
|
# If this exception maps to a HTTP status code less than 500, do
|
113
113
|
# not report it.
|
114
114
|
status_code = error_event.http_status.to_i
|
115
|
-
return if status_code
|
115
|
+
return if status_code.positive? && status_code < 500
|
116
116
|
|
117
117
|
error_reporting.report error_event
|
118
118
|
end
|
@@ -151,13 +151,13 @@ module Google
|
|
151
151
|
ErrorReporting::Credentials.new credentials
|
152
152
|
end
|
153
153
|
rescue StandardError => e
|
154
|
-
|
154
|
+
$stdout.puts "Note: Google::Cloud::ErrorReporting is disabled " \
|
155
155
|
"because it failed to authorize with the service. (#{e.message})"
|
156
156
|
return false
|
157
157
|
end
|
158
158
|
|
159
159
|
if project_id.to_s.empty?
|
160
|
-
|
160
|
+
$stdout.puts "Note: Google::Cloud::ErrorReporting is disabled " \
|
161
161
|
"because the project ID could not be determined."
|
162
162
|
return false
|
163
163
|
end
|
@@ -25,7 +25,10 @@ module Google
|
|
25
25
|
# @private Represents the gRPC Error Reporting service, including all the
|
26
26
|
# API methods.
|
27
27
|
class Service
|
28
|
-
attr_accessor :project
|
28
|
+
attr_accessor :project
|
29
|
+
attr_accessor :credentials
|
30
|
+
attr_accessor :timeout
|
31
|
+
attr_accessor :host
|
29
32
|
|
30
33
|
##
|
31
34
|
# Creates a new Service instance.
|
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.
|
4
|
+
version: 0.42.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.25.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 1.25.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,14 +260,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
260
260
|
requirements:
|
261
261
|
- - ">="
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version: '2.
|
263
|
+
version: '2.5'
|
264
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
265
|
requirements:
|
266
266
|
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.
|
270
|
+
rubygems_version: 3.2.13
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: API Client library for Stackdriver Error Reporting
|