Class: Jaeger::Reporters::InMemoryReporter
- Inherits:
-
Object
- Object
- Jaeger::Reporters::InMemoryReporter
- Defined in:
- lib/jaeger/reporters/in_memory_reporter.rb
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize ⇒ InMemoryReporter
constructor
A new instance of InMemoryReporter.
- #report(span) ⇒ Object
- #spans ⇒ Object
Constructor Details
#initialize ⇒ InMemoryReporter
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
#clear ⇒ Object
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 |
#spans ⇒ Object
17 18 19 20 21 |
# File 'lib/jaeger/reporters/in_memory_reporter.rb', line 17 def spans @mutex.synchronize do @spans end end |