google-cloud-trace-v1 0.3.0 → 0.3.4
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/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/trace/v1/trace_service/client.rb +111 -62
- data/lib/google/cloud/trace/v1/version.rb +1 -1
- data/lib/google/devtools/cloudtrace/v1/trace_pb.rb +2 -2
- data/lib/google/devtools/cloudtrace/v1/trace_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95269a0c506bd591f4e5a3d1da7a51124d8320fd325ca5130fa7a87841289bf6
|
4
|
+
data.tar.gz: 0ea42ea7491d0125b6689d1037f6ebd58d50341ba16285ee4534a1b80422dcce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 465bb0b621cd8167e4bfadb3db51d14c7a6a06795f10f76b060d17e078f9c685cddb038a0ae3634db06efca764852c7fe2ce1d2a4d8228e65d784dbdc3bf1ffa
|
7
|
+
data.tar.gz: f58b079dec973466fade2ab57d4c4f67ee6b5a2b3e7c1b59c6419022135a2adee3db25803544ec4107ef777f78e3bd8b5f9fc425f33c5a8da199a0a40d96ca69
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-trace-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Trace::V1::TraceService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `TRACE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `TRACE_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/trace/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Trace::V1::TraceService::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/trace/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/trace/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/trace/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Trace::V1::TraceService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Trace::V1::ListTracesRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_traces request
|
38
38
|
```
|
39
39
|
|
@@ -43,13 +43,12 @@ module Google
|
|
43
43
|
# See {::Google::Cloud::Trace::V1::TraceService::Client::Configuration}
|
44
44
|
# for a description of the configuration fields.
|
45
45
|
#
|
46
|
-
#
|
46
|
+
# @example
|
47
47
|
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# end
|
48
|
+
# # Modify the configuration for all TraceService clients
|
49
|
+
# ::Google::Cloud::Trace::V1::TraceService::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
53
52
|
#
|
54
53
|
# @yield [config] Configure the Client client.
|
55
54
|
# @yieldparam config [Client::Configuration]
|
@@ -69,26 +68,17 @@ module Google
|
|
69
68
|
|
70
69
|
default_config.rpcs.list_traces.timeout = 45.0
|
71
70
|
default_config.rpcs.list_traces.retry_policy = {
|
72
|
-
initial_delay: 0.1,
|
73
|
-
max_delay: 1.0,
|
74
|
-
multiplier: 1.2,
|
75
|
-
retry_codes: [14, 4]
|
71
|
+
initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4]
|
76
72
|
}
|
77
73
|
|
78
74
|
default_config.rpcs.get_trace.timeout = 45.0
|
79
75
|
default_config.rpcs.get_trace.retry_policy = {
|
80
|
-
initial_delay: 0.1,
|
81
|
-
max_delay: 1.0,
|
82
|
-
multiplier: 1.2,
|
83
|
-
retry_codes: [14, 4]
|
76
|
+
initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4]
|
84
77
|
}
|
85
78
|
|
86
79
|
default_config.rpcs.patch_traces.timeout = 45.0
|
87
80
|
default_config.rpcs.patch_traces.retry_policy = {
|
88
|
-
initial_delay: 0.1,
|
89
|
-
max_delay: 1.0,
|
90
|
-
multiplier: 1.2,
|
91
|
-
retry_codes: [14, 4]
|
81
|
+
initial_delay: 0.1, max_delay: 1.0, multiplier: 1.2, retry_codes: [14, 4]
|
92
82
|
}
|
93
83
|
|
94
84
|
default_config
|
@@ -120,19 +110,15 @@ module Google
|
|
120
110
|
##
|
121
111
|
# Create a new TraceService client object.
|
122
112
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# To create a new TraceService client with the default
|
126
|
-
# configuration:
|
113
|
+
# @example
|
127
114
|
#
|
128
|
-
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Cloud::Trace::V1::TraceService::Client.new
|
129
117
|
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
# config.timeout = 10.0
|
135
|
-
# end
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
136
122
|
#
|
137
123
|
# @yield [config] Configure the TraceService client.
|
138
124
|
# @yieldparam config [Client::Configuration]
|
@@ -152,14 +138,13 @@ module Google
|
|
152
138
|
|
153
139
|
# Create credentials
|
154
140
|
credentials = @config.credentials
|
155
|
-
# Use self-signed JWT if the
|
141
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
156
142
|
# but only if the default endpoint does not have a region prefix.
|
157
|
-
enable_self_signed_jwt = @config.
|
158
|
-
@config.endpoint == Client.configure.endpoint &&
|
143
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
159
144
|
!@config.endpoint.split(".").first.include?("-")
|
160
145
|
credentials ||= Credentials.default scope: @config.scope,
|
161
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
162
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
147
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
163
148
|
credentials = Credentials.new credentials, scope: @config.scope
|
164
149
|
end
|
165
150
|
@quota_project_id = @config.quota_project
|
@@ -266,6 +251,27 @@ module Google
|
|
266
251
|
#
|
267
252
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
268
253
|
#
|
254
|
+
# @example Basic example
|
255
|
+
# require "google/cloud/trace/v1"
|
256
|
+
#
|
257
|
+
# # Create a client object. The client can be reused for multiple calls.
|
258
|
+
# client = Google::Cloud::Trace::V1::TraceService::Client.new
|
259
|
+
#
|
260
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
261
|
+
# request = Google::Cloud::Trace::V1::ListTracesRequest.new
|
262
|
+
#
|
263
|
+
# # Call the list_traces method.
|
264
|
+
# result = client.list_traces request
|
265
|
+
#
|
266
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
267
|
+
# # iterate over all elements by calling #each, and the enumerable
|
268
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
269
|
+
# # methods are also available for managing paging directly.
|
270
|
+
# result.each do |response|
|
271
|
+
# # Each element is of type ::Google::Cloud::Trace::V1::Trace.
|
272
|
+
# p response
|
273
|
+
# end
|
274
|
+
#
|
269
275
|
def list_traces request, options = nil
|
270
276
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
271
277
|
|
@@ -283,16 +289,20 @@ module Google
|
|
283
289
|
gapic_version: ::Google::Cloud::Trace::V1::VERSION
|
284
290
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
285
291
|
|
286
|
-
header_params = {
|
287
|
-
|
288
|
-
|
292
|
+
header_params = {}
|
293
|
+
if request.project_id
|
294
|
+
header_params["project_id"] = request.project_id
|
295
|
+
end
|
296
|
+
|
289
297
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
290
298
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
291
299
|
|
292
300
|
options.apply_defaults timeout: @config.rpcs.list_traces.timeout,
|
293
301
|
metadata: metadata,
|
294
302
|
retry_policy: @config.rpcs.list_traces.retry_policy
|
295
|
-
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
305
|
+
metadata: @config.metadata,
|
296
306
|
retry_policy: @config.retry_policy
|
297
307
|
|
298
308
|
@trace_service_stub.call_rpc :list_traces, request, options: options do |response, operation|
|
@@ -335,6 +345,21 @@ module Google
|
|
335
345
|
#
|
336
346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
337
347
|
#
|
348
|
+
# @example Basic example
|
349
|
+
# require "google/cloud/trace/v1"
|
350
|
+
#
|
351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
352
|
+
# client = Google::Cloud::Trace::V1::TraceService::Client.new
|
353
|
+
#
|
354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
355
|
+
# request = Google::Cloud::Trace::V1::GetTraceRequest.new
|
356
|
+
#
|
357
|
+
# # Call the get_trace method.
|
358
|
+
# result = client.get_trace request
|
359
|
+
#
|
360
|
+
# # The returned object is of type Google::Cloud::Trace::V1::Trace.
|
361
|
+
# p result
|
362
|
+
#
|
338
363
|
def get_trace request, options = nil
|
339
364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
340
365
|
|
@@ -352,17 +377,23 @@ module Google
|
|
352
377
|
gapic_version: ::Google::Cloud::Trace::V1::VERSION
|
353
378
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
354
379
|
|
355
|
-
header_params = {
|
356
|
-
|
357
|
-
"
|
358
|
-
|
380
|
+
header_params = {}
|
381
|
+
if request.project_id
|
382
|
+
header_params["project_id"] = request.project_id
|
383
|
+
end
|
384
|
+
if request.trace_id
|
385
|
+
header_params["trace_id"] = request.trace_id
|
386
|
+
end
|
387
|
+
|
359
388
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
360
389
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
361
390
|
|
362
391
|
options.apply_defaults timeout: @config.rpcs.get_trace.timeout,
|
363
392
|
metadata: metadata,
|
364
393
|
retry_policy: @config.rpcs.get_trace.retry_policy
|
365
|
-
|
394
|
+
|
395
|
+
options.apply_defaults timeout: @config.timeout,
|
396
|
+
metadata: @config.metadata,
|
366
397
|
retry_policy: @config.retry_policy
|
367
398
|
|
368
399
|
@trace_service_stub.call_rpc :get_trace, request, options: options do |response, operation|
|
@@ -408,6 +439,21 @@ module Google
|
|
408
439
|
#
|
409
440
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
410
441
|
#
|
442
|
+
# @example Basic example
|
443
|
+
# require "google/cloud/trace/v1"
|
444
|
+
#
|
445
|
+
# # Create a client object. The client can be reused for multiple calls.
|
446
|
+
# client = Google::Cloud::Trace::V1::TraceService::Client.new
|
447
|
+
#
|
448
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
449
|
+
# request = Google::Cloud::Trace::V1::PatchTracesRequest.new
|
450
|
+
#
|
451
|
+
# # Call the patch_traces method.
|
452
|
+
# result = client.patch_traces request
|
453
|
+
#
|
454
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
455
|
+
# p result
|
456
|
+
#
|
411
457
|
def patch_traces request, options = nil
|
412
458
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
413
459
|
|
@@ -425,16 +471,20 @@ module Google
|
|
425
471
|
gapic_version: ::Google::Cloud::Trace::V1::VERSION
|
426
472
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
427
473
|
|
428
|
-
header_params = {
|
429
|
-
|
430
|
-
|
474
|
+
header_params = {}
|
475
|
+
if request.project_id
|
476
|
+
header_params["project_id"] = request.project_id
|
477
|
+
end
|
478
|
+
|
431
479
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
432
480
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
433
481
|
|
434
482
|
options.apply_defaults timeout: @config.rpcs.patch_traces.timeout,
|
435
483
|
metadata: metadata,
|
436
484
|
retry_policy: @config.rpcs.patch_traces.retry_policy
|
437
|
-
|
485
|
+
|
486
|
+
options.apply_defaults timeout: @config.timeout,
|
487
|
+
metadata: @config.metadata,
|
438
488
|
retry_policy: @config.retry_policy
|
439
489
|
|
440
490
|
@trace_service_stub.call_rpc :patch_traces, request, options: options do |response, operation|
|
@@ -458,22 +508,21 @@ module Google
|
|
458
508
|
# Configuration can be applied globally to all clients, or to a single client
|
459
509
|
# on construction.
|
460
510
|
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
# to 20 seconds,
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
# end
|
511
|
+
# @example
|
512
|
+
#
|
513
|
+
# # Modify the global config, setting the timeout for
|
514
|
+
# # list_traces to 20 seconds,
|
515
|
+
# # and all remaining timeouts to 10 seconds.
|
516
|
+
# ::Google::Cloud::Trace::V1::TraceService::Client.configure do |config|
|
517
|
+
# config.timeout = 10.0
|
518
|
+
# config.rpcs.list_traces.timeout = 20.0
|
519
|
+
# end
|
520
|
+
#
|
521
|
+
# # Apply the above configuration only to a new client.
|
522
|
+
# client = ::Google::Cloud::Trace::V1::TraceService::Client.new do |config|
|
523
|
+
# config.timeout = 10.0
|
524
|
+
# config.rpcs.list_traces.timeout = 20.0
|
525
|
+
# end
|
477
526
|
#
|
478
527
|
# @!attribute [rw] endpoint
|
479
528
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/devtools/cloudtrace/v1/trace.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/client_pb'
|
7
5
|
require 'google/api/field_behavior_pb'
|
8
6
|
require 'google/api/resource_pb'
|
9
7
|
require 'google/protobuf/empty_pb'
|
10
8
|
require 'google/protobuf/timestamp_pb'
|
11
9
|
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/devtools/cloudtrace/v1/trace.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.devtools.cloudtrace.v1.Trace" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-trace-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
205
|
- !ruby/object:Gem::Version
|
200
206
|
version: '0'
|
201
207
|
requirements: []
|
202
|
-
rubygems_version: 3.2.
|
208
|
+
rubygems_version: 3.2.17
|
203
209
|
signing_key:
|
204
210
|
specification_version: 4
|
205
211
|
summary: API Client library for the Cloud Trace V1 API
|