Class: Zipkin::ScopeManager::ScopeStack Private

Inherits:
Object
  • Object
show all
Defined in:
lib/zipkin/scope_manager/scope_stack.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initializeScopeStack

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ScopeStack.



7
8
9
10
11
12
# File 'lib/zipkin/scope_manager/scope_stack.rb', line 7

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

Instance Method Details

#peekObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
23
24
# File 'lib/zipkin/scope_manager/scope_stack.rb', line 22

def peek
  store.last
end

#popObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/zipkin/scope_manager/scope_stack.rb', line 18

def pop
  store.pop
end

#push(scope) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'lib/zipkin/scope_manager/scope_stack.rb', line 14

def push(scope)
  store << scope
end