otelastic

package
v0.0.0-...-69f936c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContentLength = 1 << 16

MaxContentLength is the maximum content length for which we'll read and capture the contents of the request body. Anything larger will still be traced but the body will not be captured as trace metadata.

Variables

This section is empty.

Functions

func NewTracedHTTPClient

func NewTracedHTTPClient() *http.Client

NewTracedHTTPClient returns a new http.Client with a custom transport dedicated to use with github.com/olivere/elastic

Types

type TracedTransport

type TracedTransport struct {
	*http.Transport
}

TracedTransport is a traced HTTP transport that captures Elasticsearch spans.

func (*TracedTransport) RoundTrip

func (t *TracedTransport) RoundTrip(r *http.Request) (resp *http.Response, err error)

RoundTrip satisfies the RoundTripper interface, wraps the sub Transport and captures a span of the Elasticsearch request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL