Class: SpanManager::ManagedSpanSource

Inherits:
Object
  • Object
show all
Defined in:
lib/spanmanager/managed_span_source.rb

Overview

ManagedSpanSource is an interface for a pluggable class that keeps track of the current active Span. It must be used as a base class for a specific implementation.

Direct Known Subclasses

ThreadLocalManagedSpanSource

Instance Method Summary collapse

Instance Method Details

#active_spanSpanManager::ManagedSpan

Retrieves the current active span.

If there is an active span, it becomes an implicit parent of a newly-created span at [SpanManager::Tracer#start_span] time.

Returns:



21
22
# File 'lib/spanmanager/managed_span_source.rb', line 21

def active_span
end

#clearObject

Unconditionally cleans up all managed spans.



25
26
# File 'lib/spanmanager/managed_span_source.rb', line 25

def clear
end

#make_active(span) ⇒ SpanManager::ManagedSpan

Wrap and “make active” the span by encapsulating it in a new [SpanManager::ManagedSpan]

The actived span becomes an implicit parent of a newly-created span at [SpanManager::Tracer#start_span] time.

Parameters:

  • span (OpenTracing::Span)

    the Span to wrap in [SpanManager::ManagedSpan].

Returns:



12
13
# File 'lib/spanmanager/managed_span_source.rb', line 12

def make_active(span)
end