Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(tracer *zipkin.Tracer, opts ...TraceOpt) http.RoundTripper
NewTransport returns a transport instance including tracing for ES calls
Types ¶
type TraceOpt ¶
type TraceOpt func(r *transport)
func RoundTripper ¶
func RoundTripper(rt http.RoundTripper) TraceOpt
RoundTripper allows to inject a `http.RoundTripper` to be wrapped but it should never be used with a traced transport, otherwise traces will be duplicated.
func WithLogger ¶
WithLogger allows to pass a `log.Logger` into the transport
func WithTagQuery ¶
func WithTagQuery() TraceOpt
WithTagQuery tags the query sent to ES in non GET requests.
func WithTagTotalHits ¶
func WithTagTotalHits() TraceOpt
WithTagTotalHits tags the total hits in a successful query response.
func WithTagTotalShards ¶
func WithTagTotalShards() TraceOpt
WithTagTotalShards tags the total shards being queried in a successful query response.
func WithWhitelistQueryParams ¶
WithWhitelistQueryParams allows to pass the whitelist of query parameters that should be recorded in a ES query, e.g. "_routing"
Click to show internal directories.
Click to hide internal directories.