Commit graph

9 commits

Author SHA1 Message Date
Matthias Rampke 0ac908603a Update documentation of metric name escaping.
The escaping changed in 728bdc52ae, before
0.1.0. Add a test for the escape function, and test various cases,
including those mentioned in the README.

This reveals that the README is inaccurate, adjust it to what has been
the reality for many years. Fixes #97.
2017-11-10 20:34:10 +00:00
Matthias Rampke ea77554dc4 Force IPv4 for the mock TCP listener.
Travis CI [does not have IPv6][0] in any environment. It could be
[enabled][1] if we ran the build in a VM, but that is much slower to
start. Instead, we just force the test connection to use IPv4.

[0]: https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future#ipv6-no-longer-present
[1]: https://github.com/travis-ci/travis-ci/issues/5200#issuecomment-162539556
2017-11-10 14:21:38 +00:00
Dave Rawks 0478c40ab0 Removes -statsd.add-suffix option flag
* Remove option flag
* Update NewExporter call signature to not take suffix boolean
* Update tests to reflect new behavior and signature
* Update documentation to reflect option flag removal
2017-09-28 11:30:17 -07:00
Dave Rawks 06444ed5c0 Minor fix-ups per PR discussion
* Removed extraneous newline
  * Reformatted/ordered imports
  * Used hash function to derive index of `Elements` instead of
    hardcoding hash result
2017-08-15 08:51:13 -07:00
Dave Rawks b2082eda2b Added test for histogram unit conversion 2017-08-14 15:20:45 -07: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
Ilya Margolin bb4e42068f Skip metrics with invalid utf8 2016-07-20 20:27:23 +02:00
Johannes 'fish' Ziemke 4d22a721eb Fix parameter to NewExporter in test 2016-05-03 23:45:48 +02:00
Jonathon Klobucar 494cc38bf8 Don't panic when negative number counter is submitted.
Instead now we will send a warning message to the logs
and continue on with our day.

Also a guard has been added when we detect a channel has been
closed and the `Exporter.Listen` function will return out of
its loop vs always running. When a channel is closed there will
be no more data to consume, so this seems correct. It also allows
for a test to be written for the panic.
2016-04-01 10:53:20 -07:00