Documentation ¶
Overview ¶
Package clihttp adds opentracing support to http client.
Example ¶
client := NewClient(opentracing.GlobalTracer()) req, _ := http.NewRequest("GET", "https://example.com/", nil) resp, _ := client.Do(req) resp.Body.Close()
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a http client that traces http requests.
type Option ¶
type Option func(*Client)
Option changes the behavior of Client.
func WithRequestLogThreshold ¶
WithRequestLogThreshold is options that sets threshold of request logging in number of bytes. If the payload is larger than this threshold, the log will be omit.
func WithResponseLogThreshold ¶
WithResponseLogThreshold is options that sets threshold of response logging in number of bytes. If the response body is larger than this threshold, the log will be omit.
Click to show internal directories.
Click to hide internal directories.