Class: Statsig::Diagnostics::Tracker

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/diagnostics.rb

Instance Method Summary collapse

Constructor Details

#initialize(diagnostics, key, step, tags = {}) ⇒ Tracker

Returns a new instance of Tracker.



95
96
97
98
99
100
# File 'lib/diagnostics.rb', line 95

def initialize(diagnostics, key, step, tags = {})
  @diagnostics = diagnostics
  @key = key
  @step = step
  @tags = tags
end

Instance Method Details

#end(**tags) ⇒ Object



106
107
108
# File 'lib/diagnostics.rb', line 106

def end(**tags)
  @diagnostics.mark(@key, 'end', @step, tags.nil? ? {} : tags.merge(@tags))
end

#start(**tags) ⇒ Object



102
103
104
# File 'lib/diagnostics.rb', line 102

def start(**tags)
  @diagnostics.mark(@key, 'start', @step, tags.nil? ? {} : tags.merge(@tags))
end