google-cloud-trace-v2 0.4.0 → 0.5.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: 0c7ad9562c999185921aa9e0c1ad80ca6e7450a6830a77840108a03220d8e7e4
4
- data.tar.gz: f563a78ddeadeb474d7b2b544ed1d50cfd43e25f3ed4f2410e3e01c7378b42bb
3
+ metadata.gz: 301a2c0272350f4499cc6cbdd479f3f0c5e75671ceb29795dddab5606021188e
4
+ data.tar.gz: b920d6892f84d7dbed237a4d5c0d20f73882e75556febace1d4aeef32922b5cf
5
5
  SHA512:
6
- metadata.gz: 28bd6138924f535aecfdccad163cbc2aa12db42ff2950f3740893b683b2d10380f429a8cfdb3b02a22c20ea533aad1c24a898702b0c465f632d9d692a075d200
7
- data.tar.gz: a422e89e1d5d54b1d3262073afdf03a24dea0e4bcd4748a88ffda6daa1110d8f31a1ccb8b414a63e58692638e1c5e97783bb8840781d2be5724682f35fd8dbbd
6
+ metadata.gz: 87f06c9a3ecce4246547ff74e8026e08f692c713e96f39b016559845b563e448d5d2dbaf389cf8fb7fb44702825c0d152d6a3a956ae0f7d7e98daba6dbdd7d49
7
+ data.tar.gz: 1b7b847a95f498049dbc516ce945c568688e6ad9ee18d89405b12b8a1bae55bc45690fdd8e37f2cc5fcde6b03315b29bf85814df8ee58dcc9ebf9c996d823af0
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby Client for the Cloud Trace V2 API
2
2
 
3
- API Client library for the Cloud Trace V2 API
3
+ Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenTelemetry.
4
4
 
5
- The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenCensus, a set of open source tracing and stats instrumentation libraries that work with multiple backends.
5
+ The Cloud Trace API lets you send and retrieve latency data to and from Cloud Trace. This API provides low-level interfaces for interacting directly with the feature. For some languages, you can use OpenTelemetry, a set of open source tracing and stats instrumentation libraries that work with multiple backends.
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/trace/v2/trace_service/rest"
20
+ require "google/cloud/trace/v2/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Trace
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/trace/v2/rest"
31
+ # client = ::Google::Cloud::Trace::V2::TraceService::Rest::Client.new
32
+ #
33
+ module V2
34
+ end
35
+ end
36
+ end
37
+ end
@@ -27,11 +27,13 @@ module Google
27
27
  ##
28
28
  # Client for the TraceService service.
29
29
  #
30
- # This file describes an API for collecting and viewing traces and spans
31
- # within a trace. A Trace is a collection of spans corresponding to a single
32
- # operation or set of operations for an application. A span is an individual
33
- # timed event which forms a node of the trace tree. A single trace may
34
- # contain span(s) from multiple services.
30
+ # Service for collecting and viewing traces and spans within a trace.
31
+ #
32
+ # A trace is a collection of spans corresponding to a single
33
+ # operation or a set of operations in an application.
34
+ #
35
+ # A span is an individual timed event which forms a node of the trace tree.
36
+ # A single trace can contain spans from multiple services.
35
37
  #
36
38
  class Client
37
39
  include Paths
@@ -69,6 +71,9 @@ module Google
69
71
  default_config = Client::Configuration.new parent_config
70
72
 
71
73
  default_config.rpcs.batch_write_spans.timeout = 120.0
74
+ default_config.rpcs.batch_write_spans.retry_policy = {
75
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 2, retry_codes: [14, 4]
76
+ }
72
77
 
73
78
  default_config.rpcs.create_span.timeout = 120.0
74
79
  default_config.rpcs.create_span.retry_policy = {
@@ -156,7 +161,7 @@ module Google
156
161
  # Service calls
157
162
 
158
163
  ##
159
- # Sends new spans to new or existing traces. You cannot update
164
+ # Batch writes new spans to new or existing traces. You cannot update
160
165
  # existing spans.
161
166
  #
162
167
  # @overload batch_write_spans(request, options = nil)
@@ -179,7 +184,7 @@ module Google
179
184
  # `projects/[PROJECT_ID]`.
180
185
  # @param spans [::Array<::Google::Cloud::Trace::V2::Span, ::Hash>]
181
186
  # Required. A list of new spans. The span names must not match existing
182
- # spans, or the results are undefined.
187
+ # spans, otherwise the results are undefined.
183
188
  #
184
189
  # @yield [response, operation] Access the result along with the RPC operation
185
190
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -266,34 +271,38 @@ module Google
266
271
  # @param name [::String]
267
272
  # Required. The resource name of the span in the following format:
268
273
  #
269
- # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
274
+ # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]`
270
275
  #
271
- # [TRACE_ID] is a unique identifier for a trace within a project;
272
- # it is a 32-character hexadecimal encoding of a 16-byte array.
276
+ # `[TRACE_ID]` is a unique identifier for a trace within a project;
277
+ # it is a 32-character hexadecimal encoding of a 16-byte array. It should
278
+ # not be zero.
273
279
  #
274
- # [SPAN_ID] is a unique identifier for a span within a trace; it
275
- # is a 16-character hexadecimal encoding of an 8-byte array.
280
+ # `[SPAN_ID]` is a unique identifier for a span within a trace; it
281
+ # is a 16-character hexadecimal encoding of an 8-byte array. It should not
282
+ # be zero.
283
+ # .
276
284
  # @param span_id [::String]
277
- # Required. The [SPAN_ID] portion of the span's resource name.
285
+ # Required. The `[SPAN_ID]` portion of the span's resource name.
278
286
  # @param parent_span_id [::String]
279
- # The [SPAN_ID] of this span's parent span. If this is a root span,
287
+ # The `[SPAN_ID]` of this span's parent span. If this is a root span,
280
288
  # then this field must be empty.
281
289
  # @param display_name [::Google::Cloud::Trace::V2::TruncatableString, ::Hash]
282
290
  # Required. A description of the span's operation (up to 128 bytes).
283
- # Stackdriver Trace displays the description in the
284
- # Google Cloud Platform Console.
291
+ # Cloud Trace displays the description in the
292
+ # Cloud console.
285
293
  # For example, the display name can be a qualified method name or a file name
286
294
  # and a line number where the operation is called. A best practice is to use
287
295
  # the same display name within an application and at the same call point.
288
296
  # This makes it easier to correlate spans in different traces.
289
297
  # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
290
- # Required. The start time of the span. On the client side, this is the time kept by
291
- # the local machine where the span execution starts. On the server side, this
292
- # is the time when the server's application handler starts running.
298
+ # Required. The start time of the span. On the client side, this is the time
299
+ # kept by the local machine where the span execution starts. On the server
300
+ # side, this is the time when the server's application handler starts
301
+ # running.
293
302
  # @param end_time [::Google::Protobuf::Timestamp, ::Hash]
294
- # Required. The end time of the span. On the client side, this is the time kept by
295
- # the local machine where the span execution ends. On the server side, this
296
- # is the time when the server application handler stops running.
303
+ # Required. The end time of the span. On the client side, this is the time
304
+ # kept by the local machine where the span execution ends. On the server
305
+ # side, this is the time when the server application handler stops running.
297
306
  # @param attributes [::Google::Cloud::Trace::V2::Span::Attributes, ::Hash]
298
307
  # A set of attributes on the span. You can have up to 32 attributes per
299
308
  # span.
@@ -309,15 +318,14 @@ module Google
309
318
  # @param same_process_as_parent_span [::Google::Protobuf::BoolValue, ::Hash]
310
319
  # Optional. Set this parameter to indicate whether this span is in
311
320
  # the same process as its parent. If you do not set this parameter,
312
- # Stackdriver Trace is unable to take advantage of this helpful
313
- # information.
321
+ # Trace is unable to take advantage of this helpful information.
314
322
  # @param child_span_count [::Google::Protobuf::Int32Value, ::Hash]
315
323
  # Optional. The number of child spans that were generated while this span
316
324
  # was active. If set, allows implementation to detect missing child spans.
317
325
  # @param span_kind [::Google::Cloud::Trace::V2::Span::SpanKind]
318
- # Optional. Distinguishes between spans generated in a particular context. For example,
319
- # two spans with the same name may be distinguished using `CLIENT` (caller)
320
- # and `SERVER` (callee) to identify an RPC call.
326
+ # Optional. Distinguishes between spans generated in a particular context.
327
+ # For example, two spans with the same name may be distinguished using
328
+ # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.
321
329
  #
322
330
  # @yield [response, operation] Access the result along with the RPC operation
323
331
  # @yieldparam response [::Google::Cloud::Trace::V2::Span]