httputil

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TraceAndServe

func TraceAndServe(h http.Handler, cfg *TraceConfig)

TraceAndServe will apply tracing to the given http.Handler using the passed tracer under the given service and resource.

Types

type TraceConfig added in v1.32.0

type TraceConfig struct {
	ResponseWriter http.ResponseWriter       // response writer
	Request        *http.Request             // request that is traced
	Service        string                    // service name
	Resource       string                    // resource name
	QueryParams    bool                      // specifies that request query parameters should be appended to http.url tag
	FinishOpts     []ddtrace.FinishOption    // span finish options to be applied
	SpanOpts       []ddtrace.StartSpanOption // additional span options to be applied
}

TraceConfig defines the configuration for request tracing.

Jump to

Keyboard shortcuts

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