deadtrickster / prometheus.ex

Prometheus.io Elixir client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not change API over Prometheus.erl

hauleth opened this issue · comments

Currently API provided by prometheus_ex for no reason tries to use keyword list as a first argument and do some magic parsing before calling functions from prometheus (Erlang one). Why though? I find Erlang API much cleaner and easier to work with, only gripe is fact that it throws ErlangError instead of Elixir-like ones (but that isn't big problem IMHO).

Solutions that I see are 2:

  • deprecate prometheus_ex in favour of raw prometheus calls and just don't care about error wrapping
  • make prometheus_ex API 1:1 mapping of the Erlang one with graceful handling of the errors
  • make prometheus_ex addition to Erlang API instead of wrapping it, aka provide only new features instead of doing that and at the same time wrapping existing features