google-cloud-trace-v2 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65456a04388bb995452a37730e6298629f1a8254d2f557aff2d1866d8e5ad270
4
- data.tar.gz: 8b6b5bfbaa1a99e45c85e7c2f50489b15d5e2e9f6106b85dd48e1474b1669acc
3
+ metadata.gz: c276c4c6fed2723987046f295bb7a90658ee668b58c690a5215b78ebec98e567
4
+ data.tar.gz: 4eac16cbfcad9b48fc07022900f7e4d87882cab0ed07a7109f03d93796c2cfc8
5
5
  SHA512:
6
- metadata.gz: d17f62eda956eef397dba508b116a0a67b0d7176a94198e765c0481143de53fb465320be721649066db7d68da48661491fe2eadaa5bc5698ace7664e70ebec55
7
- data.tar.gz: b440d55b18ed9266fe6efef4472a073ee7afc4e66e1ac214c18d6810adad3f74b5705290df1c6da2249646113c4d66f0a280bf6ff2a2093b2a08235559f098d8
6
+ metadata.gz: 076ef6b5f5e2d1869ada1cc3c7a97c720c2eb1da5a539348c892b47c0a4e2dfc813c850a33bf6f9c5081b1b27a87a1349b901823f0b21eff0e32ff5a393e2c6e
7
+ data.tar.gz: b97b3aa29de273743fd8bb84700aae5cd987f08da6cba5840a7bcccca2f39eabcb9f052e42d2eee61e4e75a741ac437f99a72dd181b7f05cecaedaf7b3ae4fbe
@@ -139,7 +139,7 @@ module Google
139
139
  credentials = @config.credentials
140
140
  # Use self-signed JWT if the endpoint is unchanged from default,
141
141
  # but only if the default endpoint does not have a region prefix.
142
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
142
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
143
  !@config.endpoint.split(".").first.include?("-")
144
144
  credentials ||= Credentials.default scope: @config.scope,
145
145
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -154,7 +154,8 @@ module Google
154
154
  credentials: credentials,
155
155
  endpoint: @config.endpoint,
156
156
  channel_args: @config.channel_args,
157
- interceptors: @config.interceptors
157
+ interceptors: @config.interceptors,
158
+ channel_pool_config: @config.channel_pool
158
159
  )
159
160
  end
160
161
 
@@ -473,7 +474,9 @@ module Google
473
474
  class Configuration
474
475
  extend ::Gapic::Config
475
476
 
476
- config_attr :endpoint, "cloudtrace.googleapis.com", ::String
477
+ DEFAULT_ENDPOINT = "cloudtrace.googleapis.com"
478
+
479
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
477
480
  config_attr :credentials, nil do |value|
478
481
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
482
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -508,6 +511,14 @@ module Google
508
511
  end
509
512
  end
510
513
 
514
+ ##
515
+ # Configuration for the channel pool
516
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
517
+ #
518
+ def channel_pool
519
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
520
+ end
521
+
511
522
  ##
512
523
  # Configuration RPC class for the TraceService API.
513
524
  #
@@ -135,7 +135,7 @@ module Google
135
135
  credentials = @config.credentials
136
136
  # Use self-signed JWT if the endpoint is unchanged from default,
137
137
  # but only if the default endpoint does not have a region prefix.
138
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
139
139
  !@config.endpoint.split(".").first.include?("-")
140
140
  credentials ||= Credentials.default scope: @config.scope,
141
141
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -183,6 +183,22 @@ module Google
183
183
  # @return [::Google::Protobuf::Empty]
184
184
  #
185
185
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
186
+ #
187
+ # @example Basic example
188
+ # require "google/cloud/trace/v2"
189
+ #
190
+ # # Create a client object. The client can be reused for multiple calls.
191
+ # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new
192
+ #
193
+ # # Create a request. To set request fields, pass in keyword arguments.
194
+ # request = Google::Cloud::Trace::V2::BatchWriteSpansRequest.new
195
+ #
196
+ # # Call the batch_write_spans method.
197
+ # result = client.batch_write_spans request
198
+ #
199
+ # # The returned object is of type Google::Protobuf::Empty.
200
+ # p result
201
+ #
186
202
  def batch_write_spans request, options = nil
187
203
  raise ::ArgumentError, "request must be provided" if request.nil?
188
204
 
@@ -301,6 +317,22 @@ module Google
301
317
  # @return [::Google::Cloud::Trace::V2::Span]
302
318
  #
303
319
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
320
+ #
321
+ # @example Basic example
322
+ # require "google/cloud/trace/v2"
323
+ #
324
+ # # Create a client object. The client can be reused for multiple calls.
325
+ # client = Google::Cloud::Trace::V2::TraceService::Rest::Client.new
326
+ #
327
+ # # Create a request. To set request fields, pass in keyword arguments.
328
+ # request = Google::Cloud::Trace::V2::Span.new
329
+ #
330
+ # # Call the create_span method.
331
+ # result = client.create_span request
332
+ #
333
+ # # The returned object is of type Google::Cloud::Trace::V2::Span.
334
+ # p result
335
+ #
304
336
  def create_span request, options = nil
305
337
  raise ::ArgumentError, "request must be provided" if request.nil?
306
338
 
@@ -409,7 +441,9 @@ module Google
409
441
  class Configuration
410
442
  extend ::Gapic::Config
411
443
 
412
- config_attr :endpoint, "cloudtrace.googleapis.com", ::String
444
+ DEFAULT_ENDPOINT = "cloudtrace.googleapis.com"
445
+
446
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
413
447
  config_attr :credentials, nil do |value|
414
448
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
415
449
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_batch_write_spans_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_create_span_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Trace
23
23
  module V2
24
- VERSION = "0.6.0"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-trace-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.0
19
+ version: 0.20.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  - !ruby/object:Gem::Version
219
219
  version: '0'
220
220
  requirements: []
221
- rubygems_version: 3.4.2
221
+ rubygems_version: 3.4.19
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: Sends application trace data to Stackdriver Trace for viewing. Trace data