go-metrics-graphite icon indicating copy to clipboard operation
go-metrics-graphite copied to clipboard

Counter does not reset on flush?

Open didip opened this issue 8 years ago • 9 comments

Unlike statsd, it looks like counter does not reset on every flush.

Is this expected?

didip avatar Oct 07 '16 23:10 didip

I would also like to know if this is expected behavior.

dmowcomber avatar Mar 07 '17 23:03 dmowcomber

+1 on this. I would expect the counter to reset and therefore have to write my own once per second sync function

m1stermanager avatar Jun 27 '17 13:06 m1stermanager

@didip @dmowcomber @cyberdelia would we expect this behavior to perhaps be part of the Config struct or should it always clear a counter on flush?

m1stermanager avatar Jun 27 '17 15:06 m1stermanager

Config struct is much better.

didip avatar Jun 27 '17 15:06 didip

It would be a breaking change if it suddenly was resetting the counter. I think it should be defined in a config with it defaulting to false.

dmowcomber avatar Jun 27 '17 15:06 dmowcomber

i agree completely. i'll try to get to this one because it really shouldn't be horrible. any ideas on the setting name? something like ResetCountersOnFlush or something similar?

m1stermanager avatar Jun 27 '17 15:06 m1stermanager

That's not bad, it's quite descriptive.

didip avatar Jun 27 '17 17:06 didip

any updates on this issue ? @m1stermanager ? @dmowcomber ?

buzzdan avatar Aug 01 '18 08:08 buzzdan

@buzzdan i never actually had the time to do this but feel free to take a stab. If I do get the time I wouldn't mind trying it but i'd be happy to see you beat me to it

m1stermanager avatar Aug 07 '18 19:08 m1stermanager