Class: SplunkTracing::SpanContext
- Inherits:
-
Object
- Object
- SplunkTracing::SpanContext
- Defined in:
- lib/splunktracing/span_context.rb
Overview
SpanContext holds the data for a span that gets inherited to child spans
Instance Attribute Summary collapse
-
#baggage ⇒ Object
readonly
Returns the value of attribute baggage.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#trace_id ⇒ Object
readonly
Returns the value of attribute trace_id.
Instance Method Summary collapse
-
#initialize(id:, trace_id:, parent_id: nil, baggage: {}) ⇒ SpanContext
constructor
A new instance of SpanContext.
Constructor Details
#initialize(id:, trace_id:, parent_id: nil, baggage: {}) ⇒ SpanContext
Returns a new instance of SpanContext.
6 7 8 9 10 11 |
# File 'lib/splunktracing/span_context.rb', line 6 def initialize(id:, trace_id:, parent_id: nil, baggage: {}) @id = id.freeze @trace_id = trace_id.freeze @parent_id = parent_id.freeze @baggage = baggage.freeze end |
Instance Attribute Details
#baggage ⇒ Object (readonly)
Returns the value of attribute baggage.
4 5 6 |
# File 'lib/splunktracing/span_context.rb', line 4 def baggage @baggage end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/splunktracing/span_context.rb', line 4 def id @id end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
4 5 6 |
# File 'lib/splunktracing/span_context.rb', line 4 def parent_id @parent_id end |
#trace_id ⇒ Object (readonly)
Returns the value of attribute trace_id.
4 5 6 |
# File 'lib/splunktracing/span_context.rb', line 4 def trace_id @trace_id end |