Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix statsd client on urls that aren't ascii encodable
Fixes https://sentry.galaxyproject.org/share/issue/e2c535d2d4904d438a0a1524c991bba4/: ``` UnicodeEncodeError: 'ascii' codec can't encode characters in position 14-16: ordinal not in range(128) File "galaxy/web/framework/middleware/error.py", line 167, in __call__ app_iter = self.application(environ, sr_checker) File "galaxy/web/framework/middleware/statsd.py", line 34, in __call__ self.galaxy_stasd_client.timing(page, dt) File "galaxy/web/statsd_client.py", line 35, in timing self.statsd_client.timing(infix + path, time) File "statsd/client/base.py", line 33, in timing self._send_stat(stat, '%0.6f|ms' % delta, rate) File "statsd/client/base.py", line 61, in _send_stat self._after(self._prepare(stat, value, rate)) File "statsd/client/base.py", line 76, in _after self._send(data) File "statsd/client/udp.py", line 42, in _send self._sock.sendto(data.encode('ascii'), self._addr) ```
- Loading branch information