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, key, step, tags = {}) ⇒ Tracker
constructor
A new instance of Tracker.
- #start(**tags) ⇒ Object
Constructor Details
#initialize(diagnostics, key, step, tags = {}) ⇒ Tracker
Returns a new instance of Tracker.
114 115 116 117 118 119 |
# File 'lib/diagnostics.rb', line 114 def initialize(diagnostics, key, step, = {}) @diagnostics = diagnostics @key = key @step = step @tags = end |
Instance Method Details
#end(**tags) ⇒ Object
125 126 127 |
# File 'lib/diagnostics.rb', line 125 def end(**) @diagnostics.mark(@key, 'end', @step, .nil? ? {} : .merge(@tags)) end |
#start(**tags) ⇒ Object
121 122 123 |
# File 'lib/diagnostics.rb', line 121 def start(**) @diagnostics.mark(@key, 'start', @step, .nil? ? {} : .merge(@tags)) end |