Class: OrangeTap::PendingSpan

Inherits:
Object
  • Object
show all
Defined in:
lib/orange_tap/pending_span.rb

Overview

Mutable, in-progress span assembled by Worker while draining the queue. Timestamps are kept in monotonic ns; OtelConverter is responsible for anchoring them to wall-clock unix ns at output time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(span_id:, parent_span_id:, name:, thread_id:, start_mono_ns:, end_mono_ns: nil) ⇒ PendingSpan

Returns a new instance of PendingSpan.



11
12
13
14
15
16
17
18
19
# File 'lib/orange_tap/pending_span.rb', line 11

def initialize(span_id:, parent_span_id:, name:, thread_id:, start_mono_ns:, end_mono_ns: nil)
  @span_id = span_id
  @parent_span_id = parent_span_id
  @name = name
  @thread_id = thread_id
  @start_mono_ns = start_mono_ns
  @end_mono_ns = end_mono_ns
  @incomplete = false
end

Instance Attribute Details

#end_mono_nsObject

Returns the value of attribute end_mono_ns.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def end_mono_ns
  @end_mono_ns
end

#incompleteObject

Returns the value of attribute incomplete.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def incomplete
  @incomplete
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def name
  @name
end

#parent_span_idObject

Returns the value of attribute parent_span_id.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def parent_span_id
  @parent_span_id
end

#span_idObject

Returns the value of attribute span_id.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def span_id
  @span_id
end

#start_mono_nsObject

Returns the value of attribute start_mono_ns.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def start_mono_ns
  @start_mono_ns
end

#thread_idObject

Returns the value of attribute thread_id.



8
9
10
# File 'lib/orange_tap/pending_span.rb', line 8

def thread_id
  @thread_id
end