cloudfoundry-attic / datadog-firehose-nozzle

OBSOLETE CF component to forward metrics from the Loggregator Firehose to DataDog
Apache License 2.0
9 stars 29 forks source link

datadogclient should set "Content-type: application/json" header while POST #12

Closed syslxg closed 8 years ago

syslxg commented 8 years ago

we are writing an datadog proxy using sinatra. The proxy receives metrics from datadog-firehose-nozzle , proccesses them, then send to datadog.com. Because the datadogclient package in this repo does not send "Content-type: application/json" header while emitting metrics, our proxy fails because Rack tries to parse the huge json in body as params. We add req.Header.Set("Content-type", "application/json") at https://github.com/cloudfoundry-incubator/datadog-firehose-nozzle/blob/master/datadogclient/datadog_client.go#L117, and that solved our issue.

cf-gitbot commented 8 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/129102399

The labels on this github issue will be updated when the story is started.

wfernandes commented 8 years ago

@syslxg Thanks for bringing this up. We'll try and prioritize it as soon as possible. If you'd like to contribute we encourage you to create a PR for this issue as well.

iplay88keys commented 8 years ago

This was fixed here: https://github.com/cloudfoundry-incubator/datadog-firehose-nozzle/commit/a954f5ba91f41936823720797b540a89a1ed5b26