lib/vanity/metric/base.rb
def track!(args = nil)
      return unless @playground.collecting?
      timestamp, identity, values = track_args(args)
      connection.metric_track @id, timestamp, identity, values
      @playground.logger.info "vanity: #{@id} with value #{values.join(", ")}"
      call_hooks timestamp, identity, values
    end
def track!(args = nil)
      return unless @playground.collecting?
      timestamp, identity, values = track_args(args)
      connection.metric_track @id, timestamp, identity, values
      @playground.logger.info "vanity: #{@id} with value #{values.join(", ")}"
      call_hooks timestamp, identity, values
    end
def track! ( args = nil ) return unless @playground . collecting? timestamp , identity , values = track_args ( args ) connection . metric_track @id , timestamp , identity , values @playground . logger . info "vanity: #{@id} with value #{values.join(", ")}" call_hooks timestamp , identity , values end
Takes playground (need this to access Redis), friendly name and optional
 id (can infer from name).
 -- Tracking --
 Called to track an action associated with this metric. Most common is not
 passing an argument, and it tracks a count of 1. You can pass a different
 value as the argument, or array of value (for multi-series metrics), or
 hash with the optional keys timestamp, identity and values.

 Example:
   hits.track!
   foo_and_bar.track! [5,11]
Takes playground ( need this to access Redis ) friendly name and optional id ( can infer from name ) . -- Tracking -- Called to track an action associated with this metric . Most common is not passing an argument and it tracks a count of 1 . You can pass a different value as the argument or array of value ( for multi - series metrics ) or hash with the optional keys timestamp identity and values .