trace

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetHTTPDebugLog added in v1.1.0

func SetHTTPDebugLog(ctx context.Context, client *http.Client) *http.Client

SetHTTPDebugLog sets up http debug log with logrus.Logger

func WithLoggerLevel

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

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