eric / metriks

An experimental library to instrument ruby
MIT License
478 stars 51 forks source link

Is it possible to have a registry with two types simultaneously? #55

Closed alexhudici closed 6 years ago

alexhudici commented 6 years ago

Have been trying to use a registry with a counter and a timer at the same time. Multiple counters are created dynamically using @registry.counter("records:#{user}") and the timer is added once @registry.add('method_perf', Metriks::Timer.new).

I've tried multiple ways of adding the timer. Using the registry add method and just creating it when I want to add the value using @registry.timer("method_perf").update(time_value).

All seem to overwrite the counter when I run things, the counter value isn't there.