Do not change API over Prometheus.erl
hauleth opened this issue · comments
Łukasz Jan Niemier commented
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 rawprometheus
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