stats icon indicating copy to clipboard operation
stats copied to clipboard

support datadog sets?

Open yields opened this issue 8 years ago • 4 comments

yields avatar Jun 05 '17 19:06 yields

I'm not sure how to go about adding this, looks like engine.Set() is used for gauges :/

yields avatar Jun 05 '17 19:06 yields

Maybe we can name it something different like UniqueSet and use another name for the main operation so it doesn't conflict.

achille-roussel avatar Jun 05 '17 19:06 achille-roussel

so, something like this?

type Set struct {}
...

func (e *Engine) Unique(value string) { .. }

yields avatar Jun 05 '17 19:06 yields

Well we can't call the top-level type Set because it conflicts with the top-level function. Maybe this:

type UniqueSet struct { ... }

then using one of these function names:

func Count(name string, tags ...Tag) { ... }
func Push(name string, tags ...Tag) { ... }
func Put(name string, tags ...Tag) { ... }
func Touch(name string, tags ...Tag) { ... }
func Track(name string, tags ...Tag) { ... }

The name Unique for the function name is not ideal because it's not a verb, so it doesn't communicate well what the action performed by the function is.

achille-roussel avatar Jun 05 '17 20:06 achille-roussel