trace

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(ctx context.Context) logrus.FieldLogger

Logger return the logger attached to context or the standard one.

func WithLoggerLevel

func WithLoggerLevel(ctx context.Context, level logrus.Level) (context.Context, logrus.FieldLogger)

WithLoggerLevel returns a context with logrus log entry.

Types

type Transport

type Transport struct {
	http.RoundTripper
}

Transport is an http.RoundTripper that keeps track of the in-flight request and add hooks to report HTTP tracing events.

func NewTransport

func NewTransport(base http.RoundTripper) *Transport

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip calls base roundtrip while keeping track of the current request.

Jump to

Keyboard shortcuts

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