-
Notifications
You must be signed in to change notification settings - Fork 288
Support HTTP transport with jaeger.thrift #161
Conversation
transport/http.go
Outdated
} | ||
|
||
// NewHTTPTransport returns a new HTTP-backend transport. url should be an http | ||
// url o the collector to handle POST request, typically something like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/o/to
transport/http.go
Outdated
// NewHTTPTransport returns a new HTTP-backend transport. url should be an http | ||
// url o the collector to handle POST request, typically something like: | ||
// http://hostname:14268/api/traces?format=jaeger.thrift | ||
func NewHTTPTransport(url string, options ...HTTPOption) (*HTTPTransport, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error
seems to be always nil
, do we need it?
return 0, nil | ||
} | ||
err := c.send(c.spans) | ||
c.spans = c.spans[:0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my race condition senses are tingling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the transport is meant to be used from one goroutine by the reporter
transport/http.go
Outdated
req.SetBasicAuth(c.httpCredentials.username, c.httpCredentials.password) | ||
} | ||
|
||
_, err = c.client.Do(req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we fully read the response and close it? (even though its useless). I remember getting OOM errors for not properly closing the responses
Fixes #152