Class: Atatus::Instrumenter::Current Private
- Inherits:
-
Object
- Object
- Atatus::Instrumenter::Current
- Defined in:
- lib/atatus/instrumenter.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
-
#initialize ⇒ Current
constructor
private
A new instance of Current.
- #spans ⇒ Object private
- #spans=(spans) ⇒ Object private
- #transaction ⇒ Object private
- #transaction=(transaction) ⇒ Object private
Constructor Details
#initialize ⇒ Current
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 Current.
36 37 38 39 |
# File 'lib/atatus/instrumenter.rb', line 36 def initialize self.transaction = nil self.spans = [] end |
Instance Method Details
#spans ⇒ 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.
49 50 51 |
# File 'lib/atatus/instrumenter.rb', line 49 def spans Thread.current[SPAN_KEY] ||= [] end |
#spans=(spans) ⇒ 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.
53 54 55 56 |
# File 'lib/atatus/instrumenter.rb', line 53 def spans=(spans) Thread.current[SPAN_KEY] ||= [] Thread.current[SPAN_KEY] = spans end |
#transaction ⇒ 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.
41 42 43 |
# File 'lib/atatus/instrumenter.rb', line 41 def transaction Thread.current[TRANSACTION_KEY] end |
#transaction=(transaction) ⇒ 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.
45 46 47 |
# File 'lib/atatus/instrumenter.rb', line 45 def transaction=(transaction) Thread.current[TRANSACTION_KEY] = transaction end |