diff --git a/ddtrace/tracer/log.go b/ddtrace/tracer/log.go index 7e494319f0..709c4a3ed1 100644 --- a/ddtrace/tracer/log.go +++ b/ddtrace/tracer/log.go @@ -6,6 +6,7 @@ package tracer import ( + "bytes" "encoding/json" "fmt" "math" @@ -51,10 +52,12 @@ type startupInfo struct { // If the endpoint is not reachable, checkEndpoint returns an error // explaining why. func checkEndpoint(endpoint string) error { - req, err := http.NewRequest("POST", endpoint, nil) + req, err := http.NewRequest("POST", endpoint, bytes.NewReader([]byte{0x90})) if err != nil { return fmt.Errorf("cannot create http request: %v", err) } + req.Header.Set(traceCountHeader, "0") + req.Header.Set("Content-Type", "application/msgpack") _, err = defaultClient.Do(req) if err != nil { return err diff --git a/ddtrace/tracer/transport.go b/ddtrace/tracer/transport.go index 7fa506e468..ce459e6edf 100644 --- a/ddtrace/tracer/transport.go +++ b/ddtrace/tracer/transport.go @@ -58,9 +58,9 @@ type transport interface { // newTransport returns a new Transport implementation that sends traces to a // trace agent running on the given hostname and port, using a given -// http.RoundTripper. If the zero values for hostname and port are provided, +// *http.Client. If the zero values for hostname and port are provided, // the default values will be used ("localhost" for hostname, and "8126" for -// port). If roundTripper is nil, a default is used. +// port). If client is nil, a default is used. // // In general, using this method is only necessary if you have a trace agent // running on a non-default port, if it's located on another machine, or when