Presentation slides given at Erloung Bay Area, January 2014. The deck is a brief introduction to the Erlang library exometer and gives an overview of my work at AdRoll to increase monitoring and insight of the running real-time bidding system.
3. • VM statistics
• Application-specific statistics
• Configurable reporting to multiple backends
• Very low impact in terms of CPU time,
memory consumption and network bandwidth
7. I M P O R TA N T T E R M S
• METRIC: a measurement
• ENTRY: a receiver and aggregator of metrics
• REPORTER: an entity which samples entries on a regular
interval and optionally ships these samples onto a thirdsystem
• SUBSCRIPTION: the definition of the regular interval on which
reporters sample entries
8. C R E AT I N G E N T R I E S
exometer:new([rtb,bodhi,metrics_srv,packets_in],
histogram,
[{time_span, timer:seconds(60)}])
!
exometer:new([erlang, system_info],
{function, erlang, system_info, ['$dp'], value,
[port_count, process_count, thread_pool_size]}])
9. C R E AT I N G S U B S C R I P T I O N S
{ report,
[{ subscribers,
[ { exometer_report_statsd, [rtb, bodhi, metrics_srv, packets_in], max,
1000, true }
, { exometer_report_statsd, [rtb, bodhi, metrics_srv, packets_in], median,
1000, true }
, { exometer_report_statsd, [rtb, bodhi, metrics_srv, packets_in], mean,
1000, true }
, { exometer_report_statsd, [erlang, system_info], port_count, 10000, true }
…
10. C R E AT I N G R E P O R T E R S
{ reporters,
[{ exometer_report_statsd,
[{hostname, "localhost"}, {port, 8125},
{type_map,
[ { [rtb, bodhi, metrics_srv, packets_in, max], gauge }
, { [rtb, bodhi, metrics_srv, packets_in, median], gauge }
, { [rtb, bodhi, metrics_srv, packets_in, mean], gauge }
, { [erlang, system_info, port_count], gauge }
…
11. OTHER NICE THINGS
• Very easy to add your own reporters and
entries.
• Reporters and entries can be proprietary. Just
have to be loaded at runtime.
• Authors are responsive to issues.
12. W H Y N O T…
…FOLSOM?
… S TAT M A N ?
… V M S TAT ?