Class: OpenCensus::Trace::Link
- Inherits:
-
Object
- Object
- OpenCensus::Trace::Link
- Defined in:
- lib/opencensus/trace/link.rb
Overview
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.
Constant Summary collapse
- TYPE_UNSPECIFIED =
A link type, indicating the relationship of the two spans is unknown, or is known but is other than parent-child.
:TYPE_UNSPECIFIED
- CHILD_LINKED_SPAN =
A link type, indicating the linked span is a child of the current span.
:CHILD_LINKED_SPAN
- PARENT_LINKED_SPAN =
A link type, indicating the linked span is a parent of the current span.
:PARENT_LINKED_SPAN
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String, (TruncatableString, Integer, Float, Boolean)>
readonly
A set of attributes on the link.
-
#dropped_attributes_count ⇒ Integer
readonly
The number of attributes that were discarded.
-
#span_id ⇒ String
readonly
A unique identifier for a span within a trace, assigned when the span is created.
-
#trace_id ⇒ String
readonly
A unique identifier for a trace.
-
#type ⇒ Symbol
readonly
The relationship of the current span relative to the linked span.
Instance Attribute Details
#attributes ⇒ Hash<String, (TruncatableString, Integer, Float, Boolean)> (readonly)
A set of attributes on the link.
74 75 76 |
# File 'lib/opencensus/trace/link.rb', line 74 def attributes @attributes end |
#dropped_attributes_count ⇒ Integer (readonly)
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 no attributes were dropped.
83 84 85 |
# File 'lib/opencensus/trace/link.rb', line 83 def dropped_attributes_count @dropped_attributes_count end |
#span_id ⇒ String (readonly)
A unique identifier for a span within a trace, assigned when the span is created. The ID is a 16-byte represented as a hexadecimal string.
59 60 61 |
# File 'lib/opencensus/trace/link.rb', line 59 def span_id @span_id end |
#trace_id ⇒ String (readonly)
A unique identifier for a trace. All spans from the same trace share
the same trace_id
. The ID is a 16-byte represented as a hexadecimal
string.
51 52 53 |
# File 'lib/opencensus/trace/link.rb', line 51 def trace_id @trace_id end |
#type ⇒ Symbol (readonly)
The relationship of the current span relative to the linked span. You should use the type constants provided by this class.
67 68 69 |
# File 'lib/opencensus/trace/link.rb', line 67 def type @type end |