Class: Google::Devtools::Cloudtrace::V2::Span

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/trace/v2/doc/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 may be gaps or overlaps between spans in a trace.

Defined Under Namespace

Classes: Attributes, Link, Links, TimeEvent, TimeEvents

Instance Attribute Summary collapse

Instance Attribute Details

#attributesGoogle::Devtools::Cloudtrace::V2::Span::Attributes

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

Returns:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#child_span_countGoogle::Protobuf::Int32Value

Returns An optional 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)

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#display_nameGoogle::Devtools::Cloudtrace::V2::TruncatableString

Returns A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the dynamic print site_values.console_name %. 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::Devtools::Cloudtrace::V2::TruncatableString)

    A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the dynamic print site_values.console_name %. 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.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#end_timeGoogle::Protobuf::Timestamp

Returns 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)

    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.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

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

Returns:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#nameString

Returns 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.

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

Returns:

  • (String)

    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.

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#parent_span_idString

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.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#same_process_as_parent_spanGoogle::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, Stackdriver 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, Stackdriver Trace is unable to take advantage of this helpful information.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#span_idString

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

Returns:

  • (String)

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#stack_traceGoogle::Devtools::Cloudtrace::V2::StackTrace

Returns Stack trace captured at the start of the span.

Returns:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#start_timeGoogle::Protobuf::Timestamp

Returns 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)

    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.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#statusGoogle::Rpc::Status

Returns An optional final status for this span.

Returns:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end

#time_eventsGoogle::Devtools::Cloudtrace::V2::Span::TimeEvents

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

Returns:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/google/cloud/trace/v2/doc/google/devtools/cloudtrace/v2/trace.rb', line 89

class Span
  # A set of attributes, each in the format +[KEY]:[VALUE]+.
  # @!attribute [rw] attribute_map
  #   @return [Hash{String => Google::Devtools::Cloudtrace::V2::AttributeValue}]
  #     The set of attributes. Each attribute's key can be up to 128 bytes
  #     long. The value can be a string up to 256 bytes, an integer, or the
  #     Boolean values +true+ and +false+. For example:
  #
  #         "/instance_id": "my-instance"
  #         "/http/user_agent": ""
  #         "/http/request_bytes": 300
  #         "abc.com/myattribute": true
  # @!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; 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::Devtools::Cloudtrace::V2::Span::TimeEvent::Annotation]
  #     Text annotation with a set of attributes.
  # @!attribute [rw] message_event
  #   @return [Google::Devtools::Cloudtrace::V2::Span::TimeEvent::MessageEvent]
  #     An event describing a message sent/received between Spans.
  class TimeEvent
    # Text annotation with a set of attributes.
    # @!attribute [rw] description
    #   @return [Google::Devtools::Cloudtrace::V2::TruncatableString]
    #     A user-supplied message describing the event. The maximum length for
    #     the description is 256 bytes.
    # @!attribute [rw] attributes
    #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
    #     A set of attributes on the annotation. You can have up to 4 attributes
    #     per Annotation.
    class Annotation; end

    # An event describing a message sent/received between Spans.
    # @!attribute [rw] type
    #   @return [Google::Devtools::Cloudtrace::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. It is recommended to be unique within
    #     a Span.
    # @!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 assumed to
    #     be the same size as uncompressed.
    class MessageEvent
      # 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::Devtools::Cloudtrace::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; 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::Devtools::Cloudtrace::V2::Span::Link::Type]
  #     The relationship of the current span relative to the linked span.
  # @!attribute [rw] attributes
  #   @return [Google::Devtools::Cloudtrace::V2::Span::Attributes]
  #     A set of attributes on the link. You have have up to  32 attributes per
  #     link.
  class Link
    # 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::Devtools::Cloudtrace::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; end
end