Class: Statsig::Diagnostics::Tracker

Inherits:
Object
  • Object
show all
Defined in:
lib/diagnostics.rb

Instance Method Summary collapse

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, tags = {})
  @diagnostics = diagnostics
  @context = context
  @key = key
  @step = step
  @tags = tags
end

Instance Method Details

#end(**tags) ⇒ Object



76
77
78
# File 'lib/diagnostics.rb', line 76

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

#start(**tags) ⇒ Object



72
73
74
# File 'lib/diagnostics.rb', line 72

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