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.
@@ -24,46 +24,52 @@ module Google
24
24
  # A span represents a single operation within a trace. Spans can be
25
25
  # nested to form a trace tree. Often, a trace contains a root span
26
26
  # that describes the end-to-end latency, and one or more subspans for
27
- # its sub-operations. A trace can also contain multiple root spans,
28
- # or none at all. Spans do not need to be contiguous—there may be
27
+ # its sub-operations.
28
+ #
29
+ # A trace can also contain multiple root spans, or none at all.
30
+ # Spans do not need to be contiguous. There might be
29
31
  # gaps or overlaps between spans in a trace.
30
32
  # @!attribute [rw] name
31
33
  # @return [::String]
32
34
  # Required. The resource name of the span in the following format:
33
35
  #
34
- # projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
36
+ # * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]`
35
37
  #
36
- # [TRACE_ID] is a unique identifier for a trace within a project;
37
- # it is a 32-character hexadecimal encoding of a 16-byte array.
38
+ # `[TRACE_ID]` is a unique identifier for a trace within a project;
39
+ # it is a 32-character hexadecimal encoding of a 16-byte array. It should
40
+ # not be zero.
38
41
  #
39
- # [SPAN_ID] is a unique identifier for a span within a trace; it
40
- # is a 16-character hexadecimal encoding of an 8-byte array.
42
+ # `[SPAN_ID]` is a unique identifier for a span within a trace; it
43
+ # is a 16-character hexadecimal encoding of an 8-byte array. It should not
44
+ # be zero.
45
+ # .
41
46
  # @!attribute [rw] span_id
42
47
  # @return [::String]
43
- # Required. The [SPAN_ID] portion of the span's resource name.
48
+ # Required. The `[SPAN_ID]` portion of the span's resource name.
44
49
  # @!attribute [rw] parent_span_id
45
50
  # @return [::String]
46
- # The [SPAN_ID] of this span's parent span. If this is a root span,
51
+ # The `[SPAN_ID]` of this span's parent span. If this is a root span,
47
52
  # then this field must be empty.
48
53
  # @!attribute [rw] display_name
49
54
  # @return [::Google::Cloud::Trace::V2::TruncatableString]
50
55
  # Required. A description of the span's operation (up to 128 bytes).
51
- # Stackdriver Trace displays the description in the
52
- # Google Cloud Platform Console.
56
+ # Cloud Trace displays the description in the
57
+ # Cloud console.
53
58
  # For example, the display name can be a qualified method name or a file name
54
59
  # and a line number where the operation is called. A best practice is to use
55
60
  # the same display name within an application and at the same call point.
56
61
  # This makes it easier to correlate spans in different traces.
57
62
  # @!attribute [rw] start_time
58
63
  # @return [::Google::Protobuf::Timestamp]
59
- # Required. The start time of the span. On the client side, this is the time kept by
60
- # the local machine where the span execution starts. On the server side, this
61
- # is the time when the server's application handler starts running.
64
+ # Required. The start time of the span. On the client side, this is the time
65
+ # kept by the local machine where the span execution starts. On the server
66
+ # side, this is the time when the server's application handler starts
67
+ # running.
62
68
  # @!attribute [rw] end_time
63
69
  # @return [::Google::Protobuf::Timestamp]
64
- # Required. The end time of the span. On the client side, this is the time kept by
65
- # the local machine where the span execution ends. On the server side, this
66
- # is the time when the server application handler stops running.
70
+ # Required. The end time of the span. On the client side, this is the time
71
+ # kept by the local machine where the span execution ends. On the server
72
+ # side, this is the time when the server application handler stops running.
67
73
  # @!attribute [rw] attributes
68
74
  # @return [::Google::Cloud::Trace::V2::Span::Attributes]
69
75
  # A set of attributes on the span. You can have up to 32 attributes per
@@ -85,27 +91,26 @@ module Google
85
91
  # @return [::Google::Protobuf::BoolValue]
86
92
  # Optional. Set this parameter to indicate whether this span is in
87
93
  # the same process as its parent. If you do not set this parameter,
88
- # Stackdriver Trace is unable to take advantage of this helpful
89
- # information.
94
+ # Trace is unable to take advantage of this helpful information.
90
95
  # @!attribute [rw] child_span_count
91
96
  # @return [::Google::Protobuf::Int32Value]
92
97
  # Optional. The number of child spans that were generated while this span
93
98
  # was active. If set, allows implementation to detect missing child spans.
94
99
  # @!attribute [rw] span_kind
95
100
  # @return [::Google::Cloud::Trace::V2::Span::SpanKind]
96
- # Optional. Distinguishes between spans generated in a particular context. For example,
97
- # two spans with the same name may be distinguished using `CLIENT` (caller)
98
- # and `SERVER` (callee) to identify an RPC call.
101
+ # Optional. Distinguishes between spans generated in a particular context.
102
+ # For example, two spans with the same name may be distinguished using
103
+ # `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.
99
104
  class Span
100
105
  include ::Google::Protobuf::MessageExts
101
106
  extend ::Google::Protobuf::MessageExts::ClassMethods
102
107
 
103
- # A set of attributes, each in the format `[KEY]:[VALUE]`.
108
+ # A set of attributes as key-value pairs.
104
109
  # @!attribute [rw] attribute_map
105
110
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
106
- # The set of attributes. Each attribute's key can be up to 128 bytes
111
+ # A set of attributes. Each attribute's key can be up to 128 bytes
107
112
  # long. The value can be a string up to 256 bytes, a signed 64-bit integer,
108
- # or the Boolean values `true` and `false`. For example:
113
+ # or the boolean values `true` or `false`. For example:
109
114
  #
110
115
  # "/instance_id": { "string_value": { "value": "my-instance" } }
111
116
  # "/http/request_bytes": { "int_value": 300 }
@@ -165,15 +170,15 @@ module Google
165
170
  # @!attribute [rw] id
166
171
  # @return [::Integer]
167
172
  # An identifier for the MessageEvent's message that can be used to match
168
- # SENT and RECEIVED MessageEvents. It is recommended to be unique within
169
- # a Span.
173
+ # `SENT` and `RECEIVED` MessageEvents.
170
174
  # @!attribute [rw] uncompressed_size_bytes
171
175
  # @return [::Integer]
172
176
  # The number of uncompressed bytes sent or received.
173
177
  # @!attribute [rw] compressed_size_bytes
174
178
  # @return [::Integer]
175
- # The number of compressed bytes sent or received. If missing assumed to
176
- # be the same size as uncompressed.
179
+ # The number of compressed bytes sent or received. If missing, the
180
+ # compressed size is assumed to be the same size as the uncompressed
181
+ # size.
177
182
  class MessageEvent
178
183
  include ::Google::Protobuf::MessageExts
179
184
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -217,17 +222,17 @@ module Google
217
222
  # traces or when the handler receives a request from a different project.
218
223
  # @!attribute [rw] trace_id
219
224
  # @return [::String]
220
- # The [TRACE_ID] for a trace within a project.
225
+ # The `[TRACE_ID]` for a trace within a project.
221
226
  # @!attribute [rw] span_id
222
227
  # @return [::String]
223
- # The [SPAN_ID] for a span within a trace.
228
+ # The `[SPAN_ID]` for a span within a trace.
224
229
  # @!attribute [rw] type
225
230
  # @return [::Google::Cloud::Trace::V2::Span::Link::Type]
226
231
  # The relationship of the current span relative to the linked span.
227
232
  # @!attribute [rw] attributes
228
233
  # @return [::Google::Cloud::Trace::V2::Span::Attributes]
229
- # A set of attributes on the link. You have have up to 32 attributes per
230
- # link.
234
+ # A set of attributes on the link. Up to 32 attributes can be
235
+ # specified per link.
231
236
  class Link
232
237
  include ::Google::Protobuf::MessageExts
233
238
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -292,7 +297,7 @@ module Google
292
297
  end
293
298
  end
294
299
 
295
- # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
300
+ # The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute.
296
301
  # @!attribute [rw] string_value
297
302
  # @return [::Google::Cloud::Trace::V2::TruncatableString]
298
303
  # A string up to 256 bytes long.
@@ -333,9 +338,10 @@ module Google
333
338
  # method that is active in this frame (up to 1024 bytes).
334
339
  # @!attribute [rw] original_function_name
335
340
  # @return [::Google::Cloud::Trace::V2::TruncatableString]
336
- # An un-mangled function name, if `function_name` is
337
- # [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
338
- # be fully-qualified (up to 1024 bytes).
341
+ # An un-mangled function name, if `function_name` is mangled.
342
+ # To get information about name mangling, run
343
+ # [this search](https://www.google.com/search?q=cxx+name+mangling).
344
+ # The name can be fully-qualified (up to 1024 bytes).
339
345
  # @!attribute [rw] file_name
340
346
  # @return [::Google::Cloud::Trace::V2::TruncatableString]
341
347
  # The name of the source file where the function call appears (up to 256
@@ -29,7 +29,7 @@ module Google
29
29
  # @!attribute [rw] spans
30
30
  # @return [::Array<::Google::Cloud::Trace::V2::Span>]
31
31
  # Required. A list of new spans. The span names must not match existing
32
- # spans, or the results are undefined.
32
+ # spans, otherwise the results are undefined.
33
33
  class BatchWriteSpansRequest
34
34
  include ::Google::Protobuf::MessageExts
35
35
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+
20
+ module Google
21
+ module Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -26,8 +26,6 @@ module Google
26
26
  # service Foo {
27
27
  # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
28
  # }
29
- #
30
- # The JSON representation for `Empty` is empty JSON object `{}`.
31
29
  class Empty
32
30
  include ::Google::Protobuf::MessageExts
33
31
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -28,12 +28,14 @@ module Google
28
28
  # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
29
  # @!attribute [rw] code
30
30
  # @return [::Integer]
31
- # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
32
33
  # @!attribute [rw] message
33
34
  # @return [::String]
34
35
  # A developer-facing error message, which should be in English. Any
35
36
  # user-facing error message should be localized and sent in the
36
- # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
37
39
  # @!attribute [rw] details
38
40
  # @return [::Array<::Google::Protobuf::Any>]
39
41
  # A list of messages that carry the error details. There is a common set of
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.4.0
4
+ version: 0.5.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: 2022-07-08 00:00:00.000000000 Z
11
+ date: 2023-03-08 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.10'
19
+ version: 0.18.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.10'
29
+ version: 0.18.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.26.1
53
+ version: 1.26.3
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.26.1
60
+ version: 1.26.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -158,11 +158,11 @@ dependencies:
158
158
  version: '0.9'
159
159
  description: The Cloud Trace API lets you send and retrieve latency data to and from
160
160
  Cloud Trace. This API provides low-level interfaces for interacting directly with
161
- the feature. For some languages, you can use OpenCensus, a set of open source tracing
162
- and stats instrumentation libraries that work with multiple backends. Note that
163
- google-cloud-trace-v2 is a version-specific client library. For most uses, we recommend
164
- installing the main client library google-cloud-trace instead. See the readme for
165
- more details.
161
+ the feature. For some languages, you can use OpenTelemetry, a set of open source
162
+ tracing and stats instrumentation libraries that work with multiple backends. Note
163
+ that google-cloud-trace-v2 is a version-specific client library. For most uses,
164
+ we recommend installing the main client library google-cloud-trace instead. See
165
+ the readme for more details.
166
166
  email: googleapis-packages@google.com
167
167
  executables: []
168
168
  extensions: []
@@ -174,20 +174,27 @@ files:
174
174
  - README.md
175
175
  - lib/google-cloud-trace-v2.rb
176
176
  - lib/google/cloud/trace/v2.rb
177
+ - lib/google/cloud/trace/v2/rest.rb
177
178
  - lib/google/cloud/trace/v2/trace_service.rb
178
179
  - lib/google/cloud/trace/v2/trace_service/client.rb
179
180
  - lib/google/cloud/trace/v2/trace_service/credentials.rb
180
181
  - lib/google/cloud/trace/v2/trace_service/paths.rb
182
+ - lib/google/cloud/trace/v2/trace_service/rest.rb
183
+ - lib/google/cloud/trace/v2/trace_service/rest/client.rb
184
+ - lib/google/cloud/trace/v2/trace_service/rest/service_stub.rb
181
185
  - lib/google/cloud/trace/v2/version.rb
182
186
  - lib/google/devtools/cloudtrace/v2/trace_pb.rb
183
187
  - lib/google/devtools/cloudtrace/v2/tracing_pb.rb
184
188
  - lib/google/devtools/cloudtrace/v2/tracing_services_pb.rb
185
189
  - proto_docs/README.md
190
+ - proto_docs/google/api/client.rb
186
191
  - proto_docs/google/api/field_behavior.rb
192
+ - proto_docs/google/api/launch_stage.rb
187
193
  - proto_docs/google/api/resource.rb
188
194
  - proto_docs/google/devtools/cloudtrace/v2/trace.rb
189
195
  - proto_docs/google/devtools/cloudtrace/v2/tracing.rb
190
196
  - proto_docs/google/protobuf/any.rb
197
+ - proto_docs/google/protobuf/duration.rb
191
198
  - proto_docs/google/protobuf/empty.rb
192
199
  - proto_docs/google/protobuf/timestamp.rb
193
200
  - proto_docs/google/protobuf/wrappers.rb
@@ -211,8 +218,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
218
  - !ruby/object:Gem::Version
212
219
  version: '0'
213
220
  requirements: []
214
- rubygems_version: 3.3.14
221
+ rubygems_version: 3.4.2
215
222
  signing_key:
216
223
  specification_version: 4
217
- summary: API Client library for the Cloud Trace V2 API
224
+ summary: Sends application trace data to Stackdriver Trace for viewing. Trace data
225
+ is collected for all App Engine applications by default. Trace data from other applications
226
+ can be provided using this API. This library is used to interact with the Trace
227
+ API directly. If you are looking to instrument your application for Stackdriver
228
+ Trace, we recommend using OpenTelemetry.
218
229
  test_files: []