Class: Statsig::Diagnostics::Tracker
- Inherits:
-
Object
- Object
- Statsig::Diagnostics::Tracker
- 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.
69 70 71 72 73 74 75 |
# File 'lib/diagnostics.rb', line 69 def initialize(diagnostics, context, key, step, = {}) @diagnostics = diagnostics @context = context @key = key @step = step @tags = end |
Instance Method Details
#end(**tags) ⇒ Object
81 82 83 |
# File 'lib/diagnostics.rb', line 81 def end(**) @diagnostics.mark(@key, 'end', @step, .nil? ? {} : .merge(@tags), @context) end |
#start(**tags) ⇒ Object
77 78 79 |
# File 'lib/diagnostics.rb', line 77 def start(**) @diagnostics.mark(@key, 'start', @step, .nil? ? {} : .merge(@tags), @context) end |