Skip to content

chaitanyapandit/cuberl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuberl

Erlang client for Square's Cube.

Sends events to Cube's collector over UDP.

Quick Start

Add cuberl to your rebar.config deps:

{cuberl, ".*", {git, "git://github.com/chaitanyapandit/cuberl.git"}}

Don't forget to include cuberl and jiffy in your application (in the reltool.config rel section):

...[
	 cuberl,
	 jiffy
	 ]...
	 
{app, cuberl, [{incl_cond, include}]},
{app, jiffy, [{incl_cond, include}]}

The cuberl application itself needs to be configured using the application's environment, this is generally done in app.config or sys.config.

{cuberl, [
    {host, "127.0.0.1"}, %% Or wherever the collector is running
    {port, 1180} %% UDP port
]}

Include cuberl.hrl:

-include("../deps/cuberl/include/cuberl.hrl").

Start sending events to Cube:

cuberl:send(#cuberl_event{type = <<"hits">>, data = [{<<"value">>, 1}]}).

About

Erlang client for Square's Cube

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages