coursera / metrics-datadog

metrics-datadog
Other
187 stars 105 forks source link

HttpTransport: Compress POST body #79

Closed neurolabs closed 7 years ago

neurolabs commented 7 years ago

I recently ran into the 3MB limit on DDs API for posting metrics. They told me that their API allows for a compressed payload (see https://github.com/DataDog/dd-agent/blob/00bed41fa3c64824098761b1522c91cdfda43e65/emitter.py#L102).

This commit adds compression analogous to the dd-agent python implementation referenced above.

In order to be able to use DeflaterInputStream, source and target java versions have been bumped to 1.6

neurolabs commented 7 years ago

Would this justify a release?

neurolabs commented 7 years ago

I thought about this some more. I think this should be configurable, deactivated by default. That way we can safely let it stabilize and don't risk breaking people's monitoring.

I will get to this shortly.