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
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 fromprometheus
(Erlang one). Why though? I find Erlang API much cleaner and easier to work with, only gripe is fact that it throwsErlangError
instead of Elixir-like ones (but that isn't big problem IMHO).Solutions that I see are 2:
prometheus_ex
in favour of rawprometheus
calls and just don't care about error wrappingprometheus_ex
API 1:1 mapping of the Erlang one with graceful handling of the errorsprometheus_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