deadtrickster / prometheus.ex

Prometheus.io Elixir client
406 stars 68 forks source link

Inject default metrics into app env if prometheus application is not started #17

Closed seancribbs closed 6 years ago

seancribbs commented 6 years ago

Fixes #16

deadtrickster commented 6 years ago

Hi, this is exactly why default_metrics exist. Thank you for finishing it!

One thing though - I think declare_metrics and default_metrics can be created lazily in the respective if branches. For example

unquote_splicing(Enum.map(declarations, &emit_create_metric/1))

If this won't hurt readability of course. What you think?

seancribbs commented 6 years ago

I'll make that change, thanks!

deadtrickster commented 6 years ago

Thanks for this PR, please do not hesitate to submit more :-)

seancribbs commented 6 years ago

Thank you for the prompt reply and merge! 😸

deadtrickster commented 6 years ago

published 3.0.1