Class: Jaeger::Reporters::InMemoryReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/jaeger/reporters/in_memory_reporter.rb

Instance Method Summary collapse

Constructor Details

#initializeInMemoryReporter

Returns a new instance of InMemoryReporter.



6
7
8
9
# File 'lib/jaeger/reporters/in_memory_reporter.rb', line 6

def initialize
  @spans = []
  @mutex = Mutex.new
end

Instance Method Details

#clearObject



23
24
25
26
27
# File 'lib/jaeger/reporters/in_memory_reporter.rb', line 23

def clear
  @mutex.synchronize do
    @spans.clear
  end
end

#report(span) ⇒ Object



11
12
13
14
15
# File 'lib/jaeger/reporters/in_memory_reporter.rb', line 11

def report(span)
  @mutex.synchronize do
    @spans << span
  end
end

#spansObject



17
18
19
20
21
# File 'lib/jaeger/reporters/in_memory_reporter.rb', line 17

def spans
  @mutex.synchronize do
    @spans
  end
end