segmentio / stats

Go package for abstracting stats collection
https://godoc.org/github.com/segmentio/stats
MIT License
208 stars 32 forks source link

Allow for tags to be map[string]string #57

Closed abraithwaite closed 7 years ago

abraithwaite commented 7 years ago

Realized we're not doing vet on a number of repos and found this:

https://gist.github.com/abraithwaite/9660621e4f8259d3d7445d1dcabc292b

I don't see a super compelling reason to have the stats.Tag to be typed so strongly over map[string]string.

Convince me otherwise ;-)

abraithwaite commented 7 years ago

Speaking with Achille in chat, he's concerned about performance (weird, right?). So he suggested we add a function which returns a tag instead.

PR incoming.