Class: Google::Cloud::Trace::V2::Span

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/devtools/cloudtrace/v2/trace.rb

Overview

A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations.

A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous. There might be gaps or overlaps between spans in a trace.

Defined Under Namespace

Modules: SpanKind Classes: Attributes, Link, Links, TimeEvent, TimeEvents

Instance Attribute Summary collapse

Instance Attribute Details

#attributes::Google::Cloud::Trace::V2::Span::Attributes

Returns A set of attributes on the span. You can have up to 32 attributes per span.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#child_span_count::Google::Protobuf::Int32Value

Returns Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.

Returns:

  • (::Google::Protobuf::Int32Value)

    Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#display_name::Google::Cloud::Trace::V2::TruncatableString

Returns Required. A description of the span's operation (up to 128 bytes). Cloud Trace displays the description in the Cloud console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces.

Returns:

  • (::Google::Cloud::Trace::V2::TruncatableString)

    Required. A description of the span's operation (up to 128 bytes). Cloud Trace displays the description in the Cloud console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#end_time::Google::Protobuf::Timestamp

Returns Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.

Returns:

  • (::Google::Protobuf::Timestamp)

    Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

Returns Links associated with the span. You can have up to 128 links per Span.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#name::String

Returns Required. The resource name of the span in the following format:

  • projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]

[TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero.

[SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .

Returns:

  • (::String)

    Required. The resource name of the span in the following format:

    • projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]

    [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero.

    [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#parent_span_id::String

Returns The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.

Returns:

  • (::String)

    The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#same_process_as_parent_span::Google::Protobuf::BoolValue

Returns Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.

Returns:

  • (::Google::Protobuf::BoolValue)

    Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#span_id::String

Returns Required. The [SPAN_ID] portion of the span's resource name.

Returns:

  • (::String)

    Required. The [SPAN_ID] portion of the span's resource name.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#span_kind::Google::Cloud::Trace::V2::Span::SpanKind

Returns Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using CLIENT (caller) and SERVER (callee) to identify an RPC call.

Returns:

  • (::Google::Cloud::Trace::V2::Span::SpanKind)

    Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using CLIENT (caller) and SERVER (callee) to identify an RPC call.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#stack_trace::Google::Cloud::Trace::V2::StackTrace

Returns Stack trace captured at the start of the span.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#start_time::Google::Protobuf::Timestamp

Returns Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.

Returns:

  • (::Google::Protobuf::Timestamp)

    Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#status::Google::Rpc::Status

Returns Optional. The final status for this span.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end

#time_events::Google::Cloud::Trace::V2::Span::TimeEvents

Returns A set of time events. You can have up to 32 annotations and 128 message events per span.

Returns:



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'proto_docs/google/devtools/cloudtrace/v2/trace.rb', line 104

class Span
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A set of attributes as key-value pairs.
  # @!attribute [rw] attribute_map
  #   @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Trace::V2::AttributeValue}]
  #     A set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, a signed 64-bit integer,
  #     or the boolean values `true` or `false`. For example:
  #
  #         "/instance_id": { "string_value": { "value": "my-instance" } }
  #         "/http/request_bytes": { "int_value": 300 }
  #         "abc.com/myattribute": { "bool_value": false }
  # @!attribute [rw] dropped_attributes_count
  #   @return [::Integer]
  #     The number of attributes that were discarded. Attributes can be discarded
  #     because their keys are too long or because there are too many attributes.
  #     If this value is 0 then all attributes are valid.
  class Attributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Cloud::Trace::V2::AttributeValue]
    class AttributeMapEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # A time-stamped annotation or message event in the Span.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The timestamp indicating the time the event occurred.
  # @!attribute [rw] annotation
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [::Google::Cloud::Trace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::Trace::V2::Span::TimeEvent::MessageEvent::Type]
    #     Type of MessageEvent. Indicates whether the message was sent or
    #     received.
    # @!attribute [rw] id
    #   @return [::Integer]
    #     An identifier for the MessageEvent's message that can be used to match
    #     `SENT` and `RECEIVED` MessageEvents.
    # @!attribute [rw] uncompressed_size_bytes
    #   @return [::Integer]
    #     The number of uncompressed bytes sent or received.
    # @!attribute [rw] compressed_size_bytes
    #   @return [::Integer]
    #     The number of compressed bytes sent or received. If missing, the
    #     compressed size is assumed to be the same size as the uncompressed
    #     size.
    class MessageEvent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Indicates whether the message was sent or received.
      module Type
        # Unknown event type.
        TYPE_UNSPECIFIED = 0

        # Indicates a sent message.
        SENT = 1

        # Indicates a received message.
        RECEIVED = 2
      end
    end
  end

  # A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
  # on the span, consisting of either user-supplied key:value pairs, or
  # details of a message sent/received between Spans.
  # @!attribute [rw] time_event
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::TimeEvent>]
  #     A collection of `TimeEvent`s.
  # @!attribute [rw] dropped_annotations_count
  #   @return [::Integer]
  #     The number of dropped annotations in all the included time events.
  #     If the value is 0, then no annotations were dropped.
  # @!attribute [rw] dropped_message_events_count
  #   @return [::Integer]
  #     The number of dropped message events in all the included time events.
  #     If the value is 0, then no message events were dropped.
  class TimeEvents
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A pointer from the current span to another span in the same trace or in a
  # different trace. For example, this can be used in batching operations,
  # where a single batch handler processes multiple requests from different
  # traces or when the handler receives a request from a different project.
  # @!attribute [rw] trace_id
  #   @return [::String]
  #     The `[TRACE_ID]` for a trace within a project.
  # @!attribute [rw] span_id
  #   @return [::String]
  #     The `[SPAN_ID]` for a span within a trace.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::Trace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [::Google::Cloud::Trace::V2::Span::Attributes]
  #     A set of attributes on the link. Up to 32 attributes can be
  #     specified per link.
  class Link
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # The relationship of the current span relative to the linked span: child,
    # parent, or unspecified.
    module Type
      # The relationship of the two spans is unknown.
      TYPE_UNSPECIFIED = 0

      # The linked span is a child of the current span.
      CHILD_LINKED_SPAN = 1

      # The linked span is a parent of the current span.
      PARENT_LINKED_SPAN = 2
    end
  end

  # A collection of links, which are references from this span to a span
  # in the same or different trace.
  # @!attribute [rw] link
  #   @return [::Array<::Google::Cloud::Trace::V2::Span::Link>]
  #     A collection of links.
  # @!attribute [rw] dropped_links_count
  #   @return [::Integer]
  #     The number of dropped links after the maximum size was enforced. If
  #     this value is 0, then no links were dropped.
  class Links
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Type of span. Can be used to specify additional relationships between spans
  # in addition to a parent/child relationship.
  module SpanKind
    # Unspecified. Do NOT use as default.
    # Implementations MAY assume SpanKind.INTERNAL to be default.
    SPAN_KIND_UNSPECIFIED = 0

    # Indicates that the span is used internally. Default value.
    INTERNAL = 1

    # Indicates that the span covers server-side handling of an RPC or other
    # remote network request.
    SERVER = 2

    # Indicates that the span covers the client-side wrapper around an RPC or
    # other remote request.
    CLIENT = 3

    # Indicates that the span describes producer sending a message to a broker.
    # Unlike client and  server, there is no direct critical path latency
    # relationship between producer and consumer spans (e.g. publishing a
    # message to a pubsub service).
    PRODUCER = 4

    # Indicates that the span describes consumer receiving a message from a
    # broker. Unlike client and  server, there is no direct critical path
    # latency relationship between producer and consumer spans (e.g. receiving
    # a message from a pubsub service subscription).
    CONSUMER = 5
  end
end