Class: Google::Apis::NetworkconnectivityV1alpha1::TraceSpan
- Inherits:
-
Object
- Object
- Google::Apis::NetworkconnectivityV1alpha1::TraceSpan
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/networkconnectivity_v1alpha1/classes.rb,
lib/google/apis/networkconnectivity_v1alpha1/representations.rb,
lib/google/apis/networkconnectivity_v1alpha1/representations.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.
Instance Attribute Summary collapse
-
#attributes ⇒ Google::Apis::NetworkconnectivityV1alpha1::Attributes
A set of attributes, each in the format
[KEY]:[VALUE]. -
#child_span_count ⇒ Fixnum
An optional number of child spans that were generated while this span was active.
-
#display_name ⇒ Google::Apis::NetworkconnectivityV1alpha1::TruncatableString
Represents a string that might be shortened to a specified length.
-
#end_time ⇒ String
The end time of the span.
-
#name ⇒ String
The resource name of the span in the following format: projects/[PROJECT_ID]/ traces/[TRACE_ID]/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.
-
#parent_span_id ⇒ String
The [SPAN_ID] of this span's parent span.
-
#same_process_as_parent_span ⇒ Boolean
(also: #same_process_as_parent_span?)
(Optional) Set this parameter to indicate whether this span is in the same process as its parent.
-
#span_id ⇒ String
The [SPAN_ID] portion of the span's resource name.
-
#span_kind ⇒ String
Distinguishes between spans generated in a particular context.
-
#start_time ⇒ String
The start time of the span.
-
#status ⇒ Google::Apis::NetworkconnectivityV1alpha1::GoogleRpcStatus
The
Statustype defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TraceSpan
constructor
A new instance of TraceSpan.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TraceSpan
Returns a new instance of TraceSpan.
1992 1993 1994 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1992 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::NetworkconnectivityV1alpha1::Attributes
A set of attributes, each in the format [KEY]:[VALUE].
Corresponds to the JSON property attributes
1920 1921 1922 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1920 def attributes @attributes end |
#child_span_count ⇒ Fixnum
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
1926 1927 1928 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1926 def child_span_count @child_span_count end |
#display_name ⇒ Google::Apis::NetworkconnectivityV1alpha1::TruncatableString
Represents a string that might be shortened to a specified length.
Corresponds to the JSON property displayName
1931 1932 1933 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1931 def display_name @display_name end |
#end_time ⇒ String
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
1938 1939 1940 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1938 def end_time @end_time end |
#name ⇒ String
The resource name of the span in the following format: projects/[PROJECT_ID]/
traces/[TRACE_ID]/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
1947 1948 1949 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1947 def name @name end |
#parent_span_id ⇒ String
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
1953 1954 1955 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1953 def parent_span_id @parent_span_id end |
#same_process_as_parent_span ⇒ Boolean Also known as: same_process_as_parent_span?
(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
1960 1961 1962 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1960 def same_process_as_parent_span @same_process_as_parent_span end |
#span_id ⇒ String
The [SPAN_ID] portion of the span's resource name.
Corresponds to the JSON property spanId
1966 1967 1968 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1966 def span_id @span_id end |
#span_kind ⇒ String
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
1973 1974 1975 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1973 def span_kind @span_kind end |
#start_time ⇒ String
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
1980 1981 1982 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1980 def start_time @start_time end |
#status ⇒ Google::Apis::NetworkconnectivityV1alpha1::GoogleRpcStatus
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. 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.
Corresponds to the JSON property status
1990 1991 1992 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1990 def status @status end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'lib/google/apis/networkconnectivity_v1alpha1/classes.rb', line 1997 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 |