add WithName / WithPrefix?
yields opened this issue · 3 comments
yields commented
Just like we can do:
a = stats.WithTags(stats.Tag{"type", "a"})
a.Incr()
a.Add()
...
It will be nice to have:
eng = stats.NewEngine("worker")
storageeng = eng.WithPrefix("storage") // => all metrics are prefixed with `worker.storage`
processoreng = eng.WithPrefix("processor") // => all metrics are prefixed with `worker.processor`
what do you think?
achille-roussel commented
I'm down man, it makes sense to me.
ndhoule commented
+1, I found this issue by searching this repo for WithName
achille-roussel commented
PR are welcome 🥇