google-cloud-trace 0.33.6 → 0.34.0

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: 191044a2a7bdf334e554281ee5cf43a7885f26cebf5702e45d0d725340cc4298
4
- data.tar.gz: 96e26f824df701bc27209374ae8902946ddcddbd9871f33e0a20fa8ee3e9d169
3
+ metadata.gz: eb8915f1cc8c21d81193ea87120b752ad050f0198149b7697db1f05ff13a0447
4
+ data.tar.gz: 6a8f3e593cf1cd53662e4032b6fbd659e6ada906fc526bad792c4cf3175a453d
5
5
  SHA512:
6
- metadata.gz: bd926a7c5671955f216640918b0cf9d2077f61c04bf662bb151ca3dbfbc9c1cb62af464267c07181d40064fa5728c31600710c11dcdfed19edd201a02dec000f
7
- data.tar.gz: 3a45dcdd595c63ba11330a9ec0ce72e6fd06e62c969afce05a1fddb4069b1d40941fb5f4e2932aeef689dba49dd4d51635e00b7560e574093d7ebb92a9ca3a42
6
+ metadata.gz: bd71d0cb5a855f6fc56133633f8c1ebb5dfff7b8b7dc26fc7f15993287cf282eb292df30a2ad0bd922e1ec07392c0deb4fdca84897a97d93452add0bf46b3d7c
7
+ data.tar.gz: 6eed64250b5cb8aa7381193e07c54c36e57b2843fcc9b837538f7512bd9b022e09d69215653dad9fed8f7dc2f5375f206d6ab73d8f2d873f2b19c0c0cf11d948
@@ -1,5 +1,24 @@
1
1
  # Release History
2
2
 
3
+ ### 0.34.0 / 2019-02-07
4
+
5
+ * Add Trace `on_error` configuration.
6
+ * Middleware improvements:
7
+ * Buffer traces and make batch API calls.
8
+ * Back pressure is applied by limiting the number of queued API calls.
9
+ * Errors will now be raised when there are not enough resources.
10
+ * Errors are reported by calling the `on_error` callback.
11
+ * Make use of `Credentials#project_id`
12
+ * Use `Credentials#project_id`
13
+ If a `project_id` is not provided, use the value on the Credentials object.
14
+ This value was added in googleauth 0.7.0.
15
+ * Loosen googleauth dependency
16
+ Allow for new releases up to 0.10.
17
+ The googleauth devs have committed to maintaining the current API
18
+ and will not make backwards compatible changes before 0.10.
19
+ * Update Trace documentation
20
+ * Correct the C-code's comments.
21
+
3
22
  ### 0.33.6 / 2018-11-15
4
23
 
5
24
  * Update network configuration.
@@ -142,4 +142,5 @@ Google::Cloud.configure.add_config! :trace do |config|
142
142
  config.add_field! :span_id_generator, nil, match: Proc
143
143
  config.add_field! :notifications, nil, match: Array
144
144
  config.add_field! :max_data_length, nil, match: Integer
145
+ config.add_field! :on_error, nil, match: Proc
145
146
  end
@@ -86,19 +86,22 @@ module Google
86
86
  #
87
87
  def self.new project_id: nil, credentials: nil, scope: nil, timeout: nil,
88
88
  client_config: nil, project: nil, keyfile: nil
89
- project_id ||= (project || default_project_id)
90
- project_id = project_id.to_s # Always cast to a string
91
- raise ArgumentError, "project_id is missing" if project_id.empty?
92
-
93
- scope ||= configure.scope
94
- timeout ||= configure.timeout
89
+ project_id ||= (project || default_project_id)
90
+ scope ||= configure.scope
91
+ timeout ||= configure.timeout
95
92
  client_config ||= configure.client_config
93
+ credentials ||= (keyfile || default_credentials(scope: scope))
96
94
 
97
- credentials ||= (keyfile || default_credentials(scope: scope))
98
95
  unless credentials.is_a? Google::Auth::Credentials
99
96
  credentials = Trace::Credentials.new credentials, scope: scope
100
97
  end
101
98
 
99
+ if credentials.respond_to? :project_id
100
+ project_id ||= credentials.project_id
101
+ end
102
+ project_id = project_id.to_s # Always cast to a string
103
+ raise ArgumentError, "project_id is missing" if project_id.empty?
104
+
102
105
  Trace::Project.new(
103
106
  Trace::Service.new(
104
107
  project_id, credentials, timeout: timeout,
@@ -138,6 +141,9 @@ module Google
138
141
  # recorded with ActiveSupport notification events. Rails-only option.
139
142
  # Default:
140
143
  # `Google::Cloud::Trace::Notifications::DEFAULT_MAX_DATA_LENGTH`
144
+ # * `on_error` - (Proc) A Proc to be run when an error is encountered
145
+ # during the reporting of traces by the middleware. The Proc must take
146
+ # the error object as the single argument.
141
147
  #
142
148
  # See the {file:INSTRUMENTATION.md Configuration Guide} for full
143
149
  # configuration parameters.
@@ -13,7 +13,9 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- require "stackdriver/core/async_actor"
16
+ require "monitor"
17
+ require "concurrent"
18
+ require "google/cloud/trace/errors"
17
19
 
18
20
  module Google
19
21
  module Cloud
@@ -22,101 +24,326 @@ module Google
22
24
  # # AsyncReporter
23
25
  #
24
26
  # @private Used by the {Google::Cloud::Trace::Middleware} to
25
- # asynchronously update traces to Stackdriver Trace service when used in
26
- # a Rack-based application.
27
+ # asynchronously buffer traces and push batches to Stackdriver Trace
28
+ # service when used in a Rack-based application.
27
29
  class AsyncReporter
28
- include Stackdriver::Core::AsyncActor
30
+ include MonitorMixin
29
31
 
30
32
  ##
31
- # @private Default Maximum blacklog size for the job queue
32
- DEFAULT_MAX_QUEUE_SIZE = 1000
33
+ # @private Implementation accessors
34
+ attr_reader :service, :max_bytes, :max_count, :max_queue, :interval,
35
+ :threads
33
36
 
34
37
  ##
35
- # The {Google::Cloud::Trace::Service} object to patch traces
36
- attr_accessor :service
38
+ # @private Creates a new AsyncReporter instance.
39
+ def initialize service, max_count: 1000, max_bytes: 4000000,
40
+ max_queue: 100, interval: 5, threads: 10
41
+ @service = service
37
42
 
38
- ##
39
- # The max number of items the queue holds
40
- attr_accessor :max_queue_size
43
+ @max_count = max_count
44
+ @max_bytes = max_bytes
45
+ @max_queue = max_queue
46
+ @interval = interval
47
+ @threads = threads
41
48
 
42
- ##
43
- # @private Construct a new instance of AsyncReporter
44
- def initialize service, max_queue_size = DEFAULT_MAX_QUEUE_SIZE
45
- super()
49
+ @error_callbacks = []
46
50
 
47
- @service = service
48
- @max_queue_size = max_queue_size
49
- @queue = []
50
- @queue_resource = new_cond
51
+ @cond = new_cond
52
+
53
+ # Make sure all buffered messages are sent when process exits.
54
+ at_exit { stop! }
55
+
56
+ # init MonitorMixin
57
+ super()
51
58
  end
52
59
 
53
60
  ##
54
61
  # Add the traces to the queue to be reported to Stackdriver Trace
55
62
  # asynchronously. Signal the child thread to start processing the queue.
63
+ #
64
+ # @param [Google::Cloud::Trace::TraceRecord,
65
+ # Array{Google::Cloud::Trace::TraceRecord}] traces Either a single
66
+ # trace object or an array of trace objects.
56
67
  def patch_traces traces
57
- ensure_thread
68
+ if synchronize { @stopped }
69
+ raise_stopped_error traces
70
+ return
71
+ end
58
72
 
59
73
  synchronize do
60
- @queue.push traces
61
- @queue_resource.broadcast
62
-
63
- while @max_queue_size && @queue.size > max_queue_size
64
- @queue_resource.wait 1
74
+ Array(traces).each do |trace|
75
+ # Add the trace to the batch
76
+ @batch ||= Batch.new self
77
+ next if @batch.try_add trace
65
78
 
66
- @queue.pop while @queue.size > max_queue_size
79
+ # If we can't add to the batch, publish and create a new batch
80
+ patch_batch!
81
+ @batch = Batch.new self
82
+ @batch.add trace
67
83
  end
84
+
85
+ init_resources!
86
+
87
+ patch_batch! if @batch.ready?
88
+
89
+ @cond.broadcast
90
+ end
91
+ self
92
+ end
93
+
94
+ ##
95
+ # Get the project id from underlying service object.
96
+ def project
97
+ service.project
98
+ end
99
+
100
+ ##
101
+ # Begins the process of stopping the reporter. Traces already in the
102
+ # queue will be published, but no new traces can be added. Use {#wait!}
103
+ # to block until the reporter is fully stopped and all pending traces
104
+ # have been pushed to the API.
105
+ #
106
+ # @return [AsyncReporter] returns self so calls can be chained.
107
+ def stop
108
+ synchronize do
109
+ break if @stopped
110
+
111
+ @stopped = true
112
+ patch_batch!
113
+ @cond.broadcast
114
+ @thread_pool.shutdown if @thread_pool
68
115
  end
116
+
117
+ self
69
118
  end
70
119
 
71
120
  ##
72
- # @private Callback function for AsyncActor module to process the queue
73
- # in a loop
74
- def run_backgrounder
75
- traces = wait_next_item
76
- return if traces.nil?
121
+ # Stop this asynchronous reporter and block until it has been stopped.
122
+ #
123
+ # @param [Number] timeout Timeout in seconds.
124
+ #
125
+ def stop! timeout = nil
126
+ stop
127
+ wait! timeout
128
+ end
77
129
 
78
- begin
79
- service.patch_traces traces
80
- rescue StandardError => e
81
- warn ["#{e.class}: #{e.message}", e.backtrace].join("\n\t")
82
- @last_exception = e
130
+ ##
131
+ # Blocks until the reporter is fully stopped, all pending traces have
132
+ # been published, and all callbacks have completed. Does not stop the
133
+ # reporter. To stop the reporter, first call {#stop} and then call
134
+ # {#wait!} to block until the reporter is stopped.
135
+ #
136
+ # @return [AsyncReporter] returns self so calls can be chained.
137
+ def wait! timeout = nil
138
+ synchronize do
139
+ if @thread_pool
140
+ @thread_pool.shutdown
141
+ @thread_pool.wait_for_termination timeout
142
+ end
83
143
  end
144
+
145
+ self
84
146
  end
85
147
 
86
148
  ##
87
- # @private Callback function when the async actor thread state changes
88
- def on_async_state_change
149
+ # Forces all traces in the current batch to be patched to the API
150
+ # immediately.
151
+ #
152
+ # @return [AsyncReporter] returns self so calls can be chained.
153
+ #
154
+ def flush!
89
155
  synchronize do
90
- @queue_resource.broadcast
156
+ patch_batch!
157
+ @cond.broadcast
91
158
  end
159
+
160
+ self
92
161
  end
93
162
 
94
163
  ##
95
- # Get the project id from underlying service object.
96
- def project
97
- service.project
164
+ # Whether the reporter has been started.
165
+ #
166
+ # @return [boolean] `true` when started, `false` otherwise.
167
+ #
168
+ def started?
169
+ !stopped?
98
170
  end
99
171
 
100
- private
172
+ ##
173
+ # Whether the reporter has been stopped.
174
+ #
175
+ # @return [boolean] `true` when stopped, `false` otherwise.
176
+ #
177
+ def stopped?
178
+ synchronize { @stopped }
179
+ end
101
180
 
102
181
  ##
103
- # @private Wait for the next item from the reporter queue. If there are
104
- # no more items, it blocks the child thread until an item is enqueued.
105
- def wait_next_item
182
+ # Register to be notified of errors when raised.
183
+ #
184
+ # If an unhandled error has occurred the reporter will attempt to
185
+ # recover from the error and resume buffering, batching, and patching
186
+ # traces.
187
+ #
188
+ # Multiple error handlers can be added.
189
+ #
190
+ # @yield [callback] The block to be called when an error is raised.
191
+ # @yieldparam [Exception] error The error raised.
192
+ #
193
+ def on_error &block
194
+ synchronize do
195
+ @error_callbacks << block
196
+ end
197
+ end
198
+
199
+ protected
200
+
201
+ def init_resources!
202
+ @thread_pool ||= \
203
+ Concurrent::CachedThreadPool.new max_threads: @threads,
204
+ max_queue: @max_queue
205
+ @thread ||= Thread.new { run_background }
206
+ nil # returning nil because of rubocop...
207
+ end
208
+
209
+ def run_background
106
210
  synchronize do
107
- @queue_resource.wait_while do
108
- async_suspended? || (async_running? && @queue.empty?)
211
+ until @stopped
212
+ if @batch.nil?
213
+ @cond.wait
214
+ next
215
+ end
216
+
217
+ if @batch.ready?
218
+ # interval met, publish the batch...
219
+ patch_batch!
220
+ @cond.wait
221
+ else
222
+ # still waiting for the interval to publish the batch...
223
+ @cond.wait(@batch.publish_wait)
224
+ end
225
+ end
226
+ end
227
+ end
228
+
229
+ def patch_batch!
230
+ return unless @batch
231
+
232
+ batch_to_be_patched = @batch
233
+ @batch = nil
234
+ patch_traces_async batch_to_be_patched
235
+ end
236
+
237
+ def patch_traces_async batch
238
+ Concurrent::Promises.future_on(
239
+ @thread_pool, batch.traces
240
+ ) do |traces|
241
+ patch_traces_with traces
242
+ end
243
+ rescue Concurrent::RejectedExecutionError => e
244
+ async_error = AsyncReporterError.new(
245
+ "Error writing traces: #{e.message}",
246
+ batch.traces
247
+ )
248
+ # Manually set backtrace so we don't have to raise
249
+ async_error.set_backtrace caller
250
+ error! async_error
251
+ end
252
+
253
+ def patch_traces_with traces
254
+ service.patch_traces traces
255
+ rescue StandardError => e
256
+ patch_error = AsyncPatchTracesError.new(
257
+ "Error writing traces: #{e.message}",
258
+ traces
259
+ )
260
+ # Manually set backtrace so we don't have to raise
261
+ patch_error.set_backtrace caller
262
+ error! patch_error
263
+ end
264
+
265
+ def raise_stopped_error traces
266
+ stopped_error = AsyncReporterError.new(
267
+ "AsyncReporter is stopped. Cannot patch traces.",
268
+ traces
269
+ )
270
+ # Manually set backtrace so we don't have to raise
271
+ stopped_error.set_backtrace caller
272
+ error! stopped_error
273
+ end
274
+
275
+ # Calls all error callbacks.
276
+ def error! error
277
+ # We shouldn't need to synchronize getting the callbacks.
278
+ error_callbacks = @error_callbacks
279
+ error_callbacks = default_error_callbacks if error_callbacks.empty?
280
+ error_callbacks.each { |error_callback| error_callback.call error }
281
+ end
282
+
283
+ def default_error_callbacks
284
+ # This is memoized to reduce calls to the configuration.
285
+ @default_error_callbacks ||= begin
286
+ error_callback = Google::Cloud::Pubsub.configuration.on_error
287
+ error_callback ||= Google::Cloud.configure.on_error
288
+ if error_callback
289
+ [error_callback]
290
+ else
291
+ []
109
292
  end
110
- @queue.pop
111
293
  end
112
294
  end
113
295
 
114
296
  ##
115
- # @private Override the #backgrounder_stoppable? method from AsyncActor
116
- # module. The actor can be gracefully stopped when queue is empty.
117
- def backgrounder_stoppable?
118
- synchronize do
119
- @queue.empty?
297
+ # @private
298
+ class Batch
299
+ attr_reader :created_at, :traces
300
+
301
+ def initialize reporter
302
+ @reporter = reporter
303
+ @traces = []
304
+ @traces_bytes = reporter.project.bytesize + 4 # initial size
305
+ @created_at = nil
306
+ end
307
+
308
+ def add trace, addl_bytes: nil
309
+ addl_bytes ||= addl_bytes_for trace
310
+ @traces << trace
311
+ @traces_bytes += addl_bytes
312
+ @created_at ||= Time.now
313
+ nil
314
+ end
315
+
316
+ def try_add trace
317
+ addl_bytes = addl_bytes_for trace
318
+ new_message_count = @traces.count + 1
319
+ new_message_bytes = @traces_bytes + addl_bytes
320
+ if new_message_count > @reporter.max_count ||
321
+ new_message_bytes >= @reporter.max_bytes
322
+ return false
323
+ end
324
+ add trace, addl_bytes: addl_bytes
325
+ true
326
+ end
327
+
328
+ def ready?
329
+ @traces.count >= @reporter.max_count ||
330
+ @traces_bytes >= @reporter.max_bytes ||
331
+ (@created_at.nil? || (publish_at < Time.now))
332
+ end
333
+
334
+ def publish_at
335
+ return nil if @created_at.nil?
336
+ @created_at + @reporter.interval
337
+ end
338
+
339
+ def publish_wait
340
+ publish_wait = publish_at - Time.now
341
+ return 0 if publish_wait < 0
342
+ publish_wait
343
+ end
344
+
345
+ def addl_bytes_for trace
346
+ trace.to_grpc.to_proto.bytesize + 2
120
347
  end
121
348
  end
122
349
  end
@@ -0,0 +1,59 @@
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
+
16
+ require "google/cloud/errors"
17
+
18
+ module Google
19
+ module Cloud
20
+ module Trace
21
+ ##
22
+ # # AsyncReporterError
23
+ #
24
+ # Used to indicate a problem preventing traces from being buffered
25
+ # asynchronously. This can occur when there are not enough resources
26
+ # allocated for the amount of usage.
27
+ #
28
+ class AsyncReporterError < Google::Cloud::Error
29
+ # @!attribute [r] count
30
+ # @return [Array<Google::Cloud::Trace::TraceRecord>] traces The trace
31
+ # objects that were not written to the API due to the error.
32
+ attr_reader :traces
33
+
34
+ def initialize message, traces = nil
35
+ super(message)
36
+ @traces = traces if traces
37
+ end
38
+ end
39
+
40
+ ##
41
+ # # AsyncPatchTracesError
42
+ #
43
+ # Used to indicate a problem when patching traces to the API. This can
44
+ # occur when the API returns an error.
45
+ #
46
+ class AsyncPatchTracesError < Google::Cloud::Error
47
+ # @!attribute [r] count
48
+ # @return [Array<Google::Cloud::Trace::TraceRecord>] traces The trace
49
+ # objects that were not written to the API due to the error.
50
+ attr_reader :traces
51
+
52
+ def initialize message, traces = nil
53
+ super(message)
54
+ @traces = traces if traces
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -93,6 +93,36 @@ module Google
93
93
  # end
94
94
  # ```
95
95
  #
96
+ # ## Error handling
97
+ #
98
+ # An error encountered during the reporting of traces by the middleware
99
+ # can be handled using a Proc set in the `on_error` configuration. (See
100
+ # {Google::Cloud::Trace.configure}.) The Proc must take the error object
101
+ # as the single argument.
102
+ #
103
+ # ```ruby
104
+ # # Configure error handling
105
+ #
106
+ # require "sinatra"
107
+ # require "google/cloud/trace"
108
+ # require "google/cloud/error_reporting"
109
+ #
110
+ # Google::Cloud::Trace.configure do |config|
111
+ # config.on_error = lambda do |error|
112
+ # Google::Cloud::ErrorReporting.report error
113
+ # end
114
+ # end
115
+ #
116
+ # use Google::Cloud::Trace::Middleware
117
+ #
118
+ # get "/" do
119
+ # Google::Cloud::Trace.in_span "Sleeping on the job!" do
120
+ # sleep rand
121
+ # end
122
+ # "Hello World!"
123
+ # end
124
+ # ```
125
+ #
96
126
  # ## Sampling and blacklisting
97
127
  #
98
128
  # A sampler makes the decision whether to record a trace for each
@@ -214,13 +244,7 @@ module Google
214
244
  begin
215
245
  @service.patch_traces trace
216
246
  rescue StandardError => ex
217
- msg = "Transmit to Stackdriver Trace failed: #{ex.inspect}"
218
- logger = env["rack.logger"]
219
- if logger
220
- logger.error msg
221
- else
222
- warn msg
223
- end
247
+ handle_error ex, logger: env["rack.logger"]
224
248
  end
225
249
  end
226
250
  end
@@ -390,6 +414,38 @@ module Google
390
414
  def configuration
391
415
  Google::Cloud::Trace.configure
392
416
  end
417
+
418
+ ##
419
+ # @private Get the error callback from the configuration.
420
+ # This value is memoized to reduce calls to the configuration.
421
+ def error_callback
422
+ if @error_callback.nil?
423
+ @error_callback = :unset
424
+ configuration_callback = configuration.on_error
425
+ configuration_callback ||= Cloud.configure.on_error
426
+ @error_callback = configuration_callback if configuration_callback
427
+ end
428
+
429
+ return nil if @error_callback == :unset
430
+ @error_callback
431
+ end
432
+
433
+ ##
434
+ # @private Handle errors raised when making patch_traces API calls.
435
+ def handle_error error, logger: nil
436
+ # Use on_error from configuration
437
+ if error_callback
438
+ error_callback.call error
439
+ else
440
+ # log error
441
+ msg = "Transmit to Stackdriver Trace failed: #{error.inspect}"
442
+ if logger
443
+ logger.error msg
444
+ else
445
+ warn msg
446
+ end
447
+ end
448
+ end
393
449
  end
394
450
  end
395
451
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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,38 +15,6 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # Wrapper message for `double`.
19
- #
20
- # The JSON representation for `DoubleValue` is JSON number.
21
- # @!attribute [rw] value
22
- # @return [Float]
23
- # The double value.
24
- class DoubleValue; end
25
-
26
- # Wrapper message for `float`.
27
- #
28
- # The JSON representation for `FloatValue` is JSON number.
29
- # @!attribute [rw] value
30
- # @return [Float]
31
- # The float value.
32
- class FloatValue; end
33
-
34
- # Wrapper message for `int64`.
35
- #
36
- # The JSON representation for `Int64Value` is JSON string.
37
- # @!attribute [rw] value
38
- # @return [Integer]
39
- # The int64 value.
40
- class Int64Value; end
41
-
42
- # Wrapper message for `uint64`.
43
- #
44
- # The JSON representation for `UInt64Value` is JSON string.
45
- # @!attribute [rw] value
46
- # @return [Integer]
47
- # The uint64 value.
48
- class UInt64Value; end
49
-
50
18
  # Wrapper message for `int32`.
51
19
  #
52
20
  # The JSON representation for `Int32Value` is JSON number.
@@ -55,14 +23,6 @@ module Google
55
23
  # The int32 value.
56
24
  class Int32Value; end
57
25
 
58
- # Wrapper message for `uint32`.
59
- #
60
- # The JSON representation for `UInt32Value` is JSON number.
61
- # @!attribute [rw] value
62
- # @return [Integer]
63
- # The uint32 value.
64
- class UInt32Value; end
65
-
66
26
  # Wrapper message for `bool`.
67
27
  #
68
28
  # The JSON representation for `BoolValue` is JSON `true` and `false`.
@@ -70,21 +30,5 @@ module Google
70
30
  # @return [true, false]
71
31
  # The bool value.
72
32
  class BoolValue; end
73
-
74
- # Wrapper message for `string`.
75
- #
76
- # The JSON representation for `StringValue` is JSON string.
77
- # @!attribute [rw] value
78
- # @return [String]
79
- # The string value.
80
- class StringValue; end
81
-
82
- # Wrapper message for `bytes`.
83
- #
84
- # The JSON representation for `BytesValue` is JSON string.
85
- # @!attribute [rw] value
86
- # @return [String]
87
- # The bytes value.
88
- class BytesValue; end
89
33
  end
90
34
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 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 2018 Google LLC
1
+ # Copyright 2019 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.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Trace
19
- VERSION = "0.33.6".freeze
19
+ VERSION = "0.34.0".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.6
4
+ version: 0.34.0
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-11-15 00:00:00.000000000 Z
11
+ date: 2019-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: concurrent-ruby
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.1'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: minitest
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +184,14 @@ dependencies:
170
184
  requirements:
171
185
  - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: 0.59.2
187
+ version: 0.61.0
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: 0.59.2
194
+ version: 0.61.0
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: simplecov
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -255,6 +269,7 @@ files:
255
269
  - lib/google/cloud/trace.rb
256
270
  - lib/google/cloud/trace/async_reporter.rb
257
271
  - lib/google/cloud/trace/credentials.rb
272
+ - lib/google/cloud/trace/errors.rb
258
273
  - lib/google/cloud/trace/faraday_middleware.rb
259
274
  - lib/google/cloud/trace/label_key.rb
260
275
  - lib/google/cloud/trace/middleware.rb
@@ -314,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
329
  version: '0'
315
330
  requirements: []
316
331
  rubyforge_project:
317
- rubygems_version: 2.7.7
332
+ rubygems_version: 2.7.6
318
333
  signing_key:
319
334
  specification_version: 4
320
335
  summary: Application Instrumentation and API Client library for Stackdriver Trace