class Google::Apis::ServicecontrolV1::TraceSpan

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.

Attributes

attributes[RW]

A set of attributes, each in the format `[KEY]:`. Corresponds to the JSON property `attributes` @return [Google::Apis::ServicecontrolV1::Attributes]

child_span_count[RW]

An optional number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans. Corresponds to the JSON property `childSpanCount` @return [Fixnum]

display_name[RW]

Represents a string that might be shortened to a specified length. Corresponds to the JSON property `displayName` @return [Google::Apis::ServicecontrolV1::TruncatableString]

end_time[RW]

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. Corresponds to the JSON property `endTime` @return [String]

name[RW]

The resource name of the span in the following format: projects// traces//spans/SPAN_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. Corresponds to the JSON property `name` @return [String]

parent_span_id[RW]

The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty. Corresponds to the JSON property `parentSpanId` @return [String]

same_process_as_parent_span[RW]

(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. Corresponds to the JSON property `sameProcessAsParentSpan` @return [Boolean]

same_process_as_parent_span?[RW]

(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. Corresponds to the JSON property `sameProcessAsParentSpan` @return [Boolean]

span_id[RW]

The [SPAN_ID] portion of the span's resource name. Corresponds to the JSON property `spanId` @return [String]

span_kind[RW]

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. Corresponds to the JSON property `spanKind` @return [String]

start_time[RW]

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. Corresponds to the JSON property `startTime` @return [String]

status[RW]

The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [ gRPC](github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https: //cloud.google.com/apis/design/errors). Corresponds to the JSON property `status` @return [Google::Apis::ServicecontrolV1::Status]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/servicecontrol_v1/classes.rb, line 2389
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/servicecontrol_v1/classes.rb, line 2394
def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @child_span_count = args[:child_span_count] if args.key?(:child_span_count)
  @display_name = args[:display_name] if args.key?(:display_name)
  @end_time = args[:end_time] if args.key?(:end_time)
  @name = args[:name] if args.key?(:name)
  @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
  @same_process_as_parent_span = args[:same_process_as_parent_span] if args.key?(:same_process_as_parent_span)
  @span_id = args[:span_id] if args.key?(:span_id)
  @span_kind = args[:span_kind] if args.key?(:span_kind)
  @start_time = args[:start_time] if args.key?(:start_time)
  @status = args[:status] if args.key?(:status)
end