Class: Statsig::Diagnostics::Tracker
- Inherits:
-
Object
- Object
- Statsig::Diagnostics::Tracker
- Extended by:
- T::Sig
- Defined in:
- lib/diagnostics.rb
Instance Method Summary collapse
- #end(**tags) ⇒ Object
-
#initialize(diagnostics, context, key, step, tags = {}) ⇒ Tracker
constructor
A new instance of Tracker.
- #start(**tags) ⇒ Object
Constructor Details
#initialize(diagnostics, context, key, step, tags = {}) ⇒ Tracker
Returns a new instance of Tracker.
101 102 103 104 105 106 107 |
# File 'lib/diagnostics.rb', line 101 def initialize(diagnostics, context, key, step, = {}) @diagnostics = diagnostics @context = context @key = key @step = step @tags = end |
Instance Method Details
#end(**tags) ⇒ Object
113 114 115 |
# File 'lib/diagnostics.rb', line 113 def end(**) @diagnostics.mark(@key, 'end', @step, .nil? ? {} : .merge(@tags), @context) end |
#start(**tags) ⇒ Object
109 110 111 |
# File 'lib/diagnostics.rb', line 109 def start(**) @diagnostics.mark(@key, 'start', @step, .nil? ? {} : .merge(@tags), @context) end |