uber-go / tally

A Go metrics interface with fast buffered metrics and third party reporters
MIT License
850 stars 117 forks source link

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

Open robskillington opened 7 years ago

Raynos commented 7 years ago

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.

robskillington commented 7 years ago

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.