config

package
v1.72.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "net/http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SpanOpts      []ddtrace.StartSpanOption
	FinishOpts    []ddtrace.FinishOption
	IgnoreRequest func(*http.Request) bool
	ResourceNamer func(*http.Request) string
	IsStatusError func(int) bool
	HeaderTags    *internal.LockMap
	ServiceName   string
	AnalyticsRate float64
}

func Default

func Default() *Config

func With

func With(opts ...Option) *Config

type Option

type Option func(*Config)

Option represents an option that can be passed to NewServeMux or WrapHandler.

func WithResourceNamer

func WithResourceNamer(namer func(req *http.Request) string) Option

WithResourceNamer populates the name of a resource based on a custom function.

Jump to

Keyboard shortcuts

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