atelasticsearch

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package atelasticsearch provides support for tracing the HTTP transport layer of Elasticsearch clients.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapRoundTripper

func WrapRoundTripper(r http.RoundTripper, o ...ClientOption) http.RoundTripper

WrapRoundTripper returns an http.RoundTripper wrapping r, reporting each request as a span to Atatus, if the request's context contains a sampled transaction.

If r is nil, then http.DefaultTransport is wrapped.

Example
httpClient := &http.Client{
	Transport: WrapRoundTripper(http.DefaultTransport),
}
_ = httpClient

// client, err := elastic.NewClient(elastic.SetHttpClient(httpClient))
// ...
Output:

Types

type ClientOption

type ClientOption func(*roundTripper)

ClientOption sets options for tracing client requests.

Jump to

Keyboard shortcuts

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