Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TracingOption ¶
type TracingOption func(*tracingConfig)
TracingOption configures the Tracing middleware.
func WithExcludeFunc ¶
func WithExcludeFunc(fn func(r *http.Request) bool) TracingOption
WithExcludeFunc excludes requests matching fn from tracing spans. Use it for prefix, glob or regex matching beyond the exact paths supported by WithExcludedRoutes.
func WithExcludedRoutes ¶
func WithExcludedRoutes(routes ...string) TracingOption
WithExcludedRoutes excludes the given exact paths from tracing spans. By default, no paths are excluded.
func WithSpanNameFormatter ¶
func WithSpanNameFormatter(fn func(r *http.Request) string) TracingOption
WithSpanNameFormatter sets a function to derive the span name from the request. This is useful to use the matched route pattern (e.g. from chi, gorilla/mux, etc.) so cardinality stays bounded in the collector.
By default, the span name is "<method> <path>".
Click to show internal directories.
Click to hide internal directories.