Skip to content

Commit

Permalink
Fixed collectd stats (was allowing too long strings)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvalsecc committed Mar 28, 2017
1 parent 062b72b commit 1de5fdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c2cwsgiutils/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_stats(self, request):
return {"timers": timers, "gauges": gauges, "counters": counters}


INVALID_KEY_CHARS = re.compile(r"[:|\. ]")
INVALID_KEY_CHARS = re.compile(r"[:|\.]")


class _StatsDBackend(object): # pragma: nocover
Expand All @@ -148,7 +148,7 @@ def __init__(self, address, prefix):
self._socket.connect(sockaddr)

def _key(self, key):
return (self._prefix + ".".join([INVALID_KEY_CHARS.sub("_", i) for i in key]))[:500]
return (self._prefix + ".".join([INVALID_KEY_CHARS.sub("_", i) for i in key]))[:450]

def _send(self, message):
try:
Expand Down

0 comments on commit 1de5fdd

Please sign in to comment.