google-cloud-trace 0.33.0 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7becd377ee3ddaa69c4cb68f69936d1b44f30d15ea11fdd310b3be018b483d4
4
- data.tar.gz: 6bdd288a7aab1639b8be40585290458e990b4c0521db644e2e9828b08fd096da
3
+ metadata.gz: 72f583302c7f227c7286b69a817b865126bb46f4e81db80032758a17cbd29bbb
4
+ data.tar.gz: cdba7500b430fadb4aca52ab717a0604aa2217f1fa5afc7341f5f0f070d015cf
5
5
  SHA512:
6
- metadata.gz: efee8c87c8d583cbb9947e049bf6a593aee6c5e69f6a0f67c3d2863a7fe75495ce52885ec9f011992c0c59d2c8d39153438aa2af4d88cae07144e1498ad90ad8
7
- data.tar.gz: 499852250ad78d5d368828c727a89617c2116feb219ab6fad2b835857dc13d7b12dc7744336d17a261aa655569c15869496e4bb903a7100549d08c9c538a85cf
6
+ metadata.gz: 82a08cfe8604df23297959ce11f140dd316cfa3b692ed27d7b4ff1c7a2854836a38f67e7b835082f6ba1dc27ff78e8b03093487414c4d347b8e1501a2b347bf9
7
+ data.tar.gz: 8519a7df8948dc32b16540f0ee1f2e2d0d92d61af90081e824e14f6a1fc499960d9c15b90fc056c2107763119b972129080db4d0dc7adbb6ef39517a7dc89c05
data/README.md CHANGED
@@ -183,6 +183,28 @@ This library also supports the other authentication methods provided by the
183
183
  `google-cloud-ruby` suite. Instructions and configuration options are covered
184
184
  in the [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-trace/guides/authentication).
185
185
 
186
+ ## Enabling Logging
187
+
188
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger) that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
189
+
190
+ Configuring a Ruby stdlib logger:
191
+
192
+ ```ruby
193
+ require "logger"
194
+
195
+ module MyLogger
196
+ LOGGER = Logger.new $stderr, level: Logger::WARN
197
+ def logger
198
+ LOGGER
199
+ end
200
+ end
201
+
202
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
203
+ module GRPC
204
+ extend MyLogger
205
+ end
206
+ ```
207
+
186
208
  ## Supported Ruby Versions
187
209
 
188
210
  This library is supported on Ruby 2.0+.
@@ -190,6 +190,39 @@ module Google
190
190
  # trace_client.patch_traces trace
191
191
  # ```
192
192
  #
193
+ # ## Enabling Logging
194
+ #
195
+ # To enable logging for this library, set the logger for the underlying
196
+ # [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The
197
+ # logger that you set may be a Ruby stdlib
198
+ # [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html)
199
+ # as shown below, or a
200
+ # [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
201
+ # that will write logs to [Stackdriver
202
+ # Logging](https://cloud.google.com/logging/). See
203
+ # [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
204
+ # and the gRPC
205
+ # [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb)
206
+ # for additional information.
207
+ #
208
+ # Configuring a Ruby stdlib logger:
209
+ #
210
+ # ```ruby
211
+ # require "logger"
212
+ #
213
+ # module MyLogger
214
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
215
+ # def logger
216
+ # LOGGER
217
+ # end
218
+ # end
219
+ #
220
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
221
+ # module GRPC
222
+ # extend MyLogger
223
+ # end
224
+ # ```
225
+ #
193
226
  module Trace
194
227
  THREAD_KEY = :__stackdriver_trace_span__
195
228
 
@@ -128,7 +128,7 @@ module Google
128
128
  # Done if Google::Cloud.configure.use_trace is explicitly false
129
129
  return if Google::Cloud.configure.use_trace == false
130
130
 
131
- # Verify credentials and set use_error_reporting to false if
131
+ # Verify credentials and set use_trace to false if
132
132
  # credentials are invalid
133
133
  unless valid_credentials? Trace.configure.project_id,
134
134
  Trace.configure.credentials
@@ -30,7 +30,8 @@ module Google
30
30
  #
31
31
  # 1. It allows you to blacklist certain URI paths that should never be
32
32
  # traced. For example, the Google App Engine health check request
33
- # path `/_ah/health` is blacklisted by default.
33
+ # path `/_ah/health` is blacklisted by default. Kubernetes default
34
+ # health check `/healthz` is also ignored.
34
35
  # 2. It spaces samples out by delaying a minimum time between each
35
36
  # sample. This enforces a maximum QPS for this Ruby process.
36
37
  #
@@ -38,7 +39,7 @@ module Google
38
39
  ##
39
40
  # Default list of paths for which to disable traces. Currently includes
40
41
  # App Engine Flex health checks.
41
- DEFAULT_PATH_BLACKLIST = ["/_ah/health"].freeze
42
+ DEFAULT_PATH_BLACKLIST = ["/_ah/health", "/healthz"].freeze
42
43
 
43
44
  ##
44
45
  # Create a TimeSampler for the given QPS.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Trace
19
- VERSION = "0.33.0".freeze
19
+ VERSION = "0.33.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.33.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-02 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  version: '0'
291
291
  requirements: []
292
292
  rubyforge_project:
293
- rubygems_version: 2.7.6
293
+ rubygems_version: 2.7.7
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: Application Instrumentation and API Client library for Stackdriver Trace