Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Support HTTP transport with jaeger.thrift #161

Merged
merged 3 commits into from
Jun 15, 2017
Merged

Conversation

yurishkuro
Copy link
Member

Fixes #152

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 85.5% when pulling 02f1b1e on jaeger-thrift-http into d109b2b on master.

}

// NewHTTPTransport returns a new HTTP-backend transport. url should be an http
// url o the collector to handle POST request, typically something like:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/o/to

// 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) {
Copy link
Contributor

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?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 85.5% when pulling 5a836f8 on jaeger-thrift-http into d109b2b on master.

return 0, nil
}
err := c.send(c.spans)
c.spans = c.spans[:0]
Copy link
Contributor

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

Copy link
Member Author

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

req.SetBasicAuth(c.httpCredentials.username, c.httpCredentials.password)
}

_, err = c.client.Do(req)
Copy link
Contributor

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

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 85.407% when pulling 15edf6a on jaeger-thrift-http into d109b2b on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants