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.
64 65 66 67 68 69 70 |
# File 'lib/diagnostics.rb', line 64 def initialize(diagnostics, context, key, step, = {}) @diagnostics = diagnostics @context = context @key = key @step = step @tags = end |
Instance Method Details
#end(**tags) ⇒ Object
76 77 78 |
# File 'lib/diagnostics.rb', line 76 def end(**) @diagnostics.mark(@key, 'end', @step, .nil? ? {} : .merge(@tags), @context) end |
#start(**tags) ⇒ Object
72 73 74 |
# File 'lib/diagnostics.rb', line 72 def start(**) @diagnostics.mark(@key, 'start', @step, .nil? ? {} : .merge(@tags), @context) end |