gemhome / fnordmetric

(possible new home for) FnordMetric is a redis/ruby-based realtime Event-Tracking app
0 stars 1 forks source link

Unique gauges need to take an option when incrementing gauge #31

Open bf4 opened 10 years ago

bf4 commented 10 years ago

Issue by KieranP Sunday Sep 30, 2012 at 21:16 GMT Originally opened as https://github.com/paulasmuth/fnordmetric/issues/102


How does unique determine when it should be uniq?

I think it needs to take a key called uniq_by. In my case, the key would be the user id of the unique page visit.

gauge :uniq_pagevisits_per_day, :tick => 1.day, :unique => true
event :pageview do
  incr :uniq_pagevisits_per_day, :uniq_by => data[:user_id]
end