Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not change API over Prometheus.erl #26

Open
hauleth opened this issue Oct 11, 2018 · 0 comments
Open

Do not change API over Prometheus.erl #26

hauleth opened this issue Oct 11, 2018 · 0 comments

Comments

@hauleth
Copy link
Contributor

hauleth commented Oct 11, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant