diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b0f6a8..7b4f4a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ -0.0.30 / 2017-01-03 -=================== - -* Add module key `HistogramPercentiles` for configuring histogram percentiles - 0.0.29 / 2016-11-02 +=================== * Added python dependency six diff --git a/src/collectd_dogstatsd.py b/src/collectd_dogstatsd.py index 3bafda1..e8d43a1 100644 --- a/src/collectd_dogstatsd.py +++ b/src/collectd_dogstatsd.py @@ -1,7 +1,6 @@ import threading import time -import aggregator import dogstatsd PLUGIN_NAME = "dogstatsd" @@ -54,7 +53,6 @@ def __init__(self, log, timeout=dogstatsd.UDP_SOCKET_TIMEOUT): self.listen_ip = DEFAULT_IP self.max_recv_size = MAX_RECV_SIZE self.aggregator_interval = dogstatsd.DOGSTATSD_AGGREGATOR_BUCKET_SIZE - self.histogram_percentiles = aggregator.DEFAULT_HISTOGRAM_PERCENTILES self.read_to_collectd = False self.ingest_endpoint = INGEST_URL self.api_token = "" @@ -66,8 +64,6 @@ def configure_callback(self, conf): for node in conf.children: if node.key == "DogStatsDPort": self.listen_port = int(node.values[0]) - elif node.key == "HistogramPercentiles": - self.histogram_percentiles = floats(node.values[0]) elif node.key == "IP": self.listen_ip = node.values[0] elif node.key == "Verbose": @@ -86,10 +82,6 @@ def configure_callback(self, conf): self.collectd_send = bool(node.values[0]) -def floats(string): - return [float(v) for v in v.split(',')] - - def filter_signalfx_dimension(dogstatsddim): invalid_chars = "[],=:" ret = "" @@ -243,8 +235,7 @@ def init_callback(self): self.server = dogstatsd.init( self.config.listen_ip, self.config.listen_port, timeout=self.config.udp_timeout, - aggregator_interval=self.config.aggregator_interval, - histogram_percentiles=self.histogram_percentiles) + aggregator_interval=self.config.aggregator_interval) udp_server_thread = threading.Thread(target=self.server.start) udp_server_thread.daemon = True udp_server_thread.start() diff --git a/src/dogstatsd.py b/src/dogstatsd.py index 1c89180..d2ecfae 100644 --- a/src/dogstatsd.py +++ b/src/dogstatsd.py @@ -186,9 +186,7 @@ def stop(self): -def init(server_host, port, timeout=UDP_SOCKET_TIMEOUT, - aggregator_interval=DOGSTATSD_AGGREGATOR_BUCKET_SIZE, - histogram_percentiles=DEFAULT_HISTOGRAM_PERCENTILES): +def init(server_host, port, timeout=UDP_SOCKET_TIMEOUT, aggregator_interval=DOGSTATSD_AGGREGATOR_BUCKET_SIZE): """Configure the server and the reporting thread. """ @@ -202,7 +200,7 @@ def init(server_host, port, timeout=UDP_SOCKET_TIMEOUT, recent_point_threshold=None, formatter=None, histogram_aggregates=DEFAULT_HISTOGRAM_AGGREGATES, - histogram_percentiles=histogram_percentiles, + histogram_percentiles=DEFAULT_HISTOGRAM_PERCENTILES, utf8_decoding=True, )