class Jaeger::Client::ScopeManager::ScopeStack
@api private
Public Class Methods
new()
click to toggle source
# File lib/jaeger/client/scope_manager/scope_stack.rb, line 8 def initialize # Generate a random identifier to use as the Thread.current key. This is # needed so that it would be possible to create multiple tracers in one # thread (mostly useful for testing purposes) @scope_identifier = ScopeIdentifier.generate end
Public Instance Methods
peek()
click to toggle source
# File lib/jaeger/client/scope_manager/scope_stack.rb, line 23 def peek store.last end
pop()
click to toggle source
# File lib/jaeger/client/scope_manager/scope_stack.rb, line 19 def pop store.pop end
push(scope)
click to toggle source
# File lib/jaeger/client/scope_manager/scope_stack.rb, line 15 def push(scope) store << scope end
Private Instance Methods
store()
click to toggle source
# File lib/jaeger/client/scope_manager/scope_stack.rb, line 29 def store Thread.current[@scope_identifier] ||= [] end