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.



114
115
116
117
118
119
# File 'lib/diagnostics.rb', line 114

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

Instance Method Details

#end(**tags) ⇒ Object



125
126
127
# File 'lib/diagnostics.rb', line 125

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

#start(**tags) ⇒ Object



121
122
123
# File 'lib/diagnostics.rb', line 121

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