[erlang-questions] abstracting folsom, estatsd, exometer & co

Motiejus Jakštys desired.mta@REDACTED
Fri May 9 10:29:08 CEST 2014


Dear list,

we are open-sourcing an internal library to release in EUC2014[1].
Currently it relies on estatsd (graphite) for instrumentation.

We instrument the following:
1. incr. success/error of calls (different keys).
2. time spent doing a request (different keys).

I want users with other instrumentation tools to be able to use it
successfully, therefore I would rather not depend on estatsd.

Alternative configuration comes to mind (Key :: [string()|atom()]) :
1. {success_callback, {M, F} :: fun((Key) -> ok)}.
2. {failure_callback, {M, F} :: fun((Key) -> ok)}.
3. {tc_callback, {M, F} :: fun((Key, ValueInMs) -> ok)}.

Is it feasible? Is there a more elegant way? I would very much love
something like error_logger:

> error_logger:error_msg("Oops!").

How do you approach abstract instrumentation in a lean library?

Regards,
Motiejus

[1]: http://www.erlang-factory.com/euc2014/motiejus-jaktys



More information about the erlang-questions mailing list