Remove content_type tag for now

This commit is contained in:
Gavin M. Roy 2016-09-14 00:44:49 -04:00
parent 821b80291b
commit 815949458b
4 changed files with 7 additions and 10 deletions

View file

@ -3,6 +3,10 @@
Release History
===============
`1.0.5`_ (14 Sep 2016)
----------------------
- Remove ``content_type`` tag
`1.0.4`_ (14 Sep 2016)
----------------------
- Rework how the line protocol is marshalled and support the various data types.
@ -30,9 +34,10 @@ Release History
----------------------
- Initial release
.. _1.0.5: https://github.com/sprockets/sprockets-influxdb/compare/1.0.4...1.0.5
.. _1.0.4: https://github.com/sprockets/sprockets-influxdb/compare/1.0.3...1.0.4
.. _1.0.3: https://github.com/sprockets/sprockets-influxdb/compare/1.0.2...1.0.3
.. _1.0.2: https://github.com/sprockets/sprockets-influxdb/compare/1.0.1...1.0.2
.. _1.0.1: https://github.com/sprockets/sprockets-influxdb/compare/1.0.0...1.0.1
.. _1.0.0: https://github.com/sprockets/sprockets-influxdb/compare/0.0.0...1.0.0
.. _Next Release: https://github.com/sprockets/sprockets-influxdb/compare/1.0.4...master
.. _Next Release: https://github.com/sprockets/sprockets-influxdb/compare/1.0.5...master

View file

@ -1,2 +1 @@
ietfparse>=1.3.0,<2
tornado>=4.0,<4.3

View file

@ -18,7 +18,7 @@ except ImportError: # pragma: no cover
logging.critical('Could not import Tornado')
headers, concurrent, httpclient, ioloop = None, None, None, None
version_info = (1, 0, 4)
version_info = (1, 0, 5)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['__version__', 'version_info', 'add_measurement', 'flush',
'install', 'shutdown', 'Measurement']
@ -89,11 +89,6 @@ class InfluxDBMixin(object):
if hasattr(self, 'correlation_id'):
self.influxdb.set_field('correlation_id', self.correlation_id)
self.influxdb.set_field('duration', self.request.request_time())
parsed = headers.parse_content_type(
self._headers['Content-Type'].decode('utf-8'))
self.influxdb.set_tag(
'content_type', '{}/{}'.format(
parsed.content_type, parsed.content_subtype))
self.influxdb.set_tag('status_code', self._status_code)
add_measurement(self.influxdb)

View file

@ -26,7 +26,6 @@ class MeasurementTestCase(base.AsyncServerTestCase):
'tests.base.RequestHandler')
self.assertEqual(measurement.tags['endpoint'], '/')
self.assertEqual(measurement.tags['hostname'], socket.gethostname())
self.assertEqual(measurement.tags['content_type'], 'application/json')
self.assertEqual(measurement.fields['content_length'], 16)
self.assertGreater(float(measurement.fields['duration']), 0.001)
@ -46,7 +45,6 @@ class MeasurementTestCase(base.AsyncServerTestCase):
self.assertEqual(measurement.tags['status_code'], '200')
self.assertEqual(measurement.tags['method'], 'GET')
self.assertEqual(measurement.tags['endpoint'], '/named')
self.assertEqual(measurement.tags['content_type'], 'application/json')
self.assertEqual(
measurement.tags['handler'], 'tests.base.NamedRequestHandler')
self.assertEqual(measurement.tags['hostname'], socket.gethostname())