tally icon indicating copy to clipboard operation
tally copied to clipboard

Document that creating timers and gauges with same tag cycles causes endless memory cycles

Open robskillington opened this issue 9 years ago • 2 comments

robskillington avatar Jan 17 '17 21:01 robskillington

Actually, every counter, gauge and subscope allocated is another iteration in this loop ( https://github.com/uber-go/tally/blob/master/scope.go#L157 ).

The array of subscopes is unbounded if sub scopes are allocated dynamically and there is no way of removing things from the scope registry.

Raynos avatar Jan 20 '17 00:01 Raynos

https://github.com/uber-go/tally/pull/25 addresses this.

And yes, there is no way to unregister a scope currently. We could probably add a method to Scope for that but it does widen the breadth of the API for someone who is implementing Scope themselves.

robskillington avatar Feb 05 '17 04:02 robskillington