acquia / statsgod

A Statsd implementation written in GO lang
Apache License 2.0
119 stars 8 forks source link

Support "set" metric types that track the unique values between flushes #54

Closed kevinhankens closed 9 years ago

kevinhankens commented 9 years ago

A set is a metric that keeps track of the number of unique occurances of a metric sent between flush periods. We could either support the "s" metric type like statsd or we could just calculate this as a value for all metrics. Also, I think "sets" is a terrible name... "uniques" might be better.

Option 1 - "set" metric type (notice the "s" type):

my.value:123|s
my.value:124|s
my.value:125|s
my.value:123|s
-- flush --
generates: stats.sets.my.value 3

Option 2 - generate a unique metric for all types (notice the "g" type):

my.value:123|g
my.value:124|g
my.value:125|g
my.value:123|g
-- flush --
generates: stats.gauges.my.value 123 -and- stats.uniques.my.value 3
kevinhankens commented 9 years ago

Tracked in branch metric-set-type.

kevinhankens commented 9 years ago

PR #61