Commit graph

23 commits

Author SHA1 Message Date
Tony Wooster
df740e7778 Minor fixups
Signed-off-by: Tony Wooster <twooster@gmail.com>
2019-09-19 18:31:10 +02:00
Tony Wooster
0e000fe833 Drop metrics with mixed tagging styles
Signed-off-by: Tony Wooster <twooster@gmail.com>
2019-09-18 15:33:23 +02:00
Tony Wooster
5537c504cc Add support for InfluxDB style tagging
Signed-off-by: Tony Wooster <twooster@gmail.com>
2019-09-17 17:01:34 +02:00
Tony Wooster
2933dd8ad0 Add support for Librato-style tags
Signed-off-by: Tony Wooster <twooster@gmail.com>
2019-09-14 17:14:03 +02:00
Amit Saha
5b44b372d1 Add test for gauge with sample rate
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2019-09-13 14:30:52 +10:00
Amit Saha
1bddef857d Add test
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2019-09-13 14:27:48 +10:00
Amit Saha
d64c674394 Fix test
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2019-09-13 13:07:12 +10:00
Amit Saha
028531e953 Fix for issue #250
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2019-09-09 17:25:19 +10:00
Clayton O'Neill
c7e76967c8
Add internal event queuing and flushing
At high traffic levels, the locking around sending on channels can cause
a large amount of blocking and CPU usage.  These adds an event queue
mechanism so that events are queued for short period of time, and
flushed in batches to the main exporter goroutine periodically.

The default is is to flush every 1000 events, or every 200ms, whichever
happens first.

Signed-off-by: Clayton O'Neill <claytono@github.com>
2019-06-04 06:57:48 -04:00
Matthias Rampke
26e9d482db
Revert "Reduce memory allocations in handlePacket" 2019-05-20 08:20:19 +00:00
Clayton O'Neill
4cf6f74dc3
Reduce memory allocations in handlePacket
This converts the byte buffer to a string by casting and parses the
string by looping over it instead of calling Split.

This usage of unsafe is taken from the strings.Builder package here:
cb5c82bc3d/src/strings/builder.go (L47)

Signed-off-by: Clayton O'Neill <claytono@github.com>
2019-05-16 16:35:32 -04:00
Clayton O'Neill
04bba78d61
Add support for Datadog distribution type
This adds the ability to accept Datadog's distribution type and treat it
like a histogram/summary.

Signed-off-by: Clayton O'Neill <claytono@github.com>
2019-05-13 14:59:21 -04:00
jwfang
07543ac557 Add TCP StatsD listener support (#71)
* add TCP StatsD listener support

* add listen-tcp flag to control UDP/TCP mode on same port

* statsdListenUDP/statsdListenTCP as string, and alias listen-address to listen-udp

* add stats for tcp error/line_too_long

* add test for TCP listener
2017-08-01 12:21:00 +02:00
Andreas Andersen
b5dfc9c9ce Added support for sampling factor on timing events 2017-05-15 15:57:31 +02:00
Justin Reid
3efcef6229 Simplified inc/dec logic based on PR feedback.
There is no need to add the string to all event types as only Gauge
is compatible with inc/dec functionality.  Removed valueStr from all
events and added a simple boolean to the Gauge event instead
2017-03-09 17:35:29 -07:00
Justin Reid
7fc8727306 Added increment/decrement support to Gauges
Now passing the value as a string (with operation prefix) through to build event so that Listen() can modify the gauge metric appropriately
2017-03-09 15:50:06 -07:00
Ilya Margolin
bb4e42068f Skip metrics with invalid utf8 2016-07-20 20:27:23 +02:00
David Haguenauer
56f65c4870 Don't panic on empty metric names or components
* Don't panic on empty metric names
* Don't panic on empty metric components
* Test tolerance the above kinds of broken StatsD lines
2016-05-19 12:43:35 -04:00
Ilya Margolin
0b792e0be6 DogStatsD: review changes 2016-05-03 18:28:33 +02:00
Daniel Bonkowski
8f36baf045 sanitize tag keys
- add tests for edge cases
 - fix typo
2016-05-03 18:27:42 +02:00
Peter Woodman
ab7c27ee77 Support datadog extensions to statsd datagrams
Datadog's format extensions allow attaching labels and tags to statsd
metrics, and are documented at
http://docs.datadoghq.com/guides/dogstatsd/#datagram-format

Additionally changes compare method in tests to reflect.DeepEqual, as
the tag maps don't sort deterministically, corrects an inversion in
displaying test failure cases, and treats an invalid sample value as 1
instead of throwing out the sample.
2016-03-04 16:22:34 +01:00
Julius Volz
b299c8a72d Fix license headers to match LICENSE file. 2015-02-19 01:04:25 +01:00
Julius Volz
42ad6cb8d6 Separate bridge into new file. 2013-07-06 00:13:39 +02:00
Renamed from main_test.go (Browse further)