Class: LightStep::SpanContext

Inherits:
Object
  • Object
show all
Defined in:
lib/lightstep/span_context.rb

Overview

SpanContext holds the data for a span that gets inherited to child spans

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, trace_id:, baggage: {}) ⇒ SpanContext

Returns a new instance of SpanContext.



6
7
8
9
10
# File 'lib/lightstep/span_context.rb', line 6

def initialize(id:, trace_id:, baggage: {})
  @id = id.freeze
  @trace_id = trace_id.freeze
  @baggage = baggage.freeze
end

Instance Attribute Details

#baggageObject (readonly)

Returns the value of attribute baggage.



4
5
6
# File 'lib/lightstep/span_context.rb', line 4

def baggage
  @baggage
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/lightstep/span_context.rb', line 4

def id
  @id
end

#trace_idObject (readonly)

Returns the value of attribute trace_id.



4
5
6
# File 'lib/lightstep/span_context.rb', line 4

def trace_id
  @trace_id
end