Documentation ¶
Overview ¶
Package gin provides functions to trace the gin-gonic/gin package (https://github.com/gin-gonic/gin).
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML will trace the rendering of the template as a child of the span in the given context.
func Middleware ¶
func Middleware(service string, opts ...Option) gin.HandlerFunc
Middleware returns middleware that will trace incoming requests. If service is empty then the default service name will be used.
Types ¶
type Option ¶
type Option func(*config)
Option specifies instrumentation configuration options.
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 WithIgnoreRequest ¶
WithIgnoreRequest specifies a function to use for determining if the incoming HTTP request tracing should be skipped.