Skip to content

Commit

Permalink
Merge pull request #50 from signalfx/revert-49-histogram_percentiles
Browse files Browse the repository at this point in the history
Revert "Add HistogramPercentiles param for the aggregator"
  • Loading branch information
Drew Griffin authored Jan 6, 2017
2 parents fd7f585 + fbd3b62 commit 593209b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
11 changes: 1 addition & 10 deletions src/collectd_dogstatsd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import threading
import time

import aggregator
import dogstatsd

PLUGIN_NAME = "dogstatsd"
Expand Down Expand Up @@ -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 = ""
Expand All @@ -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":
Expand All @@ -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 = ""
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 2 additions & 4 deletions src/dogstatsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand All @@ -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,
)

Expand Down

0 comments on commit 593209b

Please sign in to comment.