[erlang-questions] Exometer, Recon and prim_inet:send/2?

Ulf Wiger <>
Mon Oct 12 16:30:19 CEST 2015


> On 12 Oct 2015, at 15:09, Roberto Ostinelli <> wrote:
> 
> Thank you Ulf.​ Yes, I'm using exometer_report_graphite [1].
> 
> Unfortunately this means that I have no idea what happened, i.e. what would make its queue grow like that when a connection is unavailable.
> 
> 
> 
> [1] https://github.com/Feuerlabs/exometer/blob/master/src/exometer_report_graphite.erl <https://github.com/Feuerlabs/exometer/blob/master/src/exometer_report_graphite.erl>
Well, the two potentially blocking operations it performs are gen_tcp:connect() (5-second timeout by default) and gen_tcp:send()

If you want to create some form of buffering behavior, perhaps exometer_report_logger.erl might be useful.

It’s a bit intricate, perhaps, but you can e.g. check the following code for ideas:

https://github.com/Feuerlabs/exometer_core/blob/master/test/exometer_report_SUITE.erl <https://github.com/Feuerlabs/exometer_core/blob/master/test/exometer_report_SUITE.erl>
https://github.com/Feuerlabs/exometer_core/blob/master/test/exometer_test_udp_reporter.erl <https://github.com/Feuerlabs/exometer_core/blob/master/test/exometer_test_udp_reporter.erl>

But I think that in general, the idea with metrics is that you push them off-host if possible, otherwise let it be, until a connection is re-established.

BR,
Ulf W

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151012/1d668263/attachment.html>


More information about the erlang-questions mailing list