Adding multi metric support to Java client (multiple metrics in a single datagram) #224

Merged
merged 1 commit into from Dec 25, 2012

Conversation

Projects
None yet
2 participants
Contributor

charlesdaniel commented Dec 25, 2012

This just adds support to buffer several metrics into a single datagram packet.
You can specify the buffer size as well setup a timer to trigger a flush at an interval.
It defaults to being disabled so it should still work like the old version.
To enable call client.enableMultiMetrics(true);

// To enable multi metrics (aka more than 1 metric in a UDP packet) (disabled by default)
client.enableMultiMetrics(true);  //disable by passing in false
// To fine-tune udp packet buffer size (default=1500)
client.setBufferSize((short) 1500);
// To force flush the buffer out (good idea to add to your shutdown path)
client.flush();
Owner

mrtazz commented Dec 25, 2012

Awesome! Thanks for the contribution.

@mrtazz mrtazz added a commit that referenced this pull request Dec 25, 2012

@mrtazz mrtazz Merge pull request #224 from charlesdaniel/master
Adding multi metric support to Java client (multiple metrics in a single datagram)
d03221f

@mrtazz mrtazz merged commit d03221f into etsy:master Dec 25, 2012

1 check passed

default The Travis build passed
Details

@hbouvier hbouvier pushed a commit to hbouvier/statsd that referenced this pull request May 25, 2013

@mrtazz mrtazz Merge pull request #224 from charlesdaniel/master
Adding multi metric support to Java client (multiple metrics in a single datagram)
dda8f6c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment