Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeforeHandle ¶
func BeforeHandle[T any, WT Router]( cfg *Config, router T, wrapRouter func(T) WT, w http.ResponseWriter, req *http.Request, ) (http.ResponseWriter, *http.Request, func(), bool)
BeforeHandle is an adapter of httptrace.BeforeHandle for julienschmidt/httprouter types.
Types ¶
type Option ¶
type Option func(*Config)
func WithAnalytics ¶
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.
func WithHeaderTags ¶
WithHeaderTags enables the integration to attach HTTP request headers as span tags. Warning: Using this feature can risk exposing sensitive data such as authorization tokens to Datadog. Special headers can not be sub-selected. E.g., an entire Cookie header would be transmitted, without the ability to choose specific Cookies.
func WithServiceName ¶
WithServiceName sets the given service name for the returned router.
func WithSpanOptions ¶
func WithSpanOptions(opts ...ddtrace.StartSpanOption) Option
WithSpanOptions applies the given set of options to the span started by the router.