pinterest / elixometer

A light Elixir wrapper around exometer.
https://hexdocs.pm/elixometer
Apache License 2.0
827 stars 67 forks source link

Elixometer.clear_counter/1 is supposed to use configured Formatter #117

Open pmenhart opened 5 years ago

pmenhart commented 5 years ago

A default formatter Elixometer.Utils is called instead of a configured one: https://github.com/pinterest/elixometer/blob/c4a886b52e405a52e749b799e2a27908d526ecf5/lib/elixometer.ex#L292

To fix, Elixometer.Utils should either expose the configured formatter, or implement clear_counter/1. Exposing formatter is preferable, because there are often situations where an application may need to translate metric names between "Elixometer view" and "exometer view".

jparise commented 5 years ago

Is this related to https://github.com/pinterest/elixometer/pull/114#issuecomment-412920521?

pmenhart commented 5 years ago

Yes, this is the same issue as you reported in the comment. I didn't notice it, because #114 is closed.