Documentation ¶
Overview ¶
Package fasthttp provides functions to trace the valyala/fasthttp package (https://github.com/valyala/fasthttp)
Index ¶
- func WrapHandler(h fasthttp.RequestHandler, opts ...Option) fasthttp.RequestHandler
- type Option
- func WithIgnoreRequest(f func(fctx *fasthttp.RequestCtx) bool) Option
- func WithResourceNamer(fn func(fctx *fasthttp.RequestCtx) string) Option
- func WithServiceName(name string) Option
- func WithSpanOptions(opts ...ddtrace.StartSpanOption) Option
- func WithStatusCheck(fn func(statusCode int) bool) Option
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapHandler ¶
func WrapHandler(h fasthttp.RequestHandler, opts ...Option) fasthttp.RequestHandler
WrapHandler wraps a fasthttp.RequestHandler with tracing middleware
Types ¶
type Option ¶
func WithIgnoreRequest ¶
func WithIgnoreRequest(f func(fctx *fasthttp.RequestCtx) bool) Option
WithIgnoreRequest specifies a function to use for determining if the incoming HTTP request tracing should be skipped.
func WithResourceNamer ¶
func WithResourceNamer(fn func(fctx *fasthttp.RequestCtx) string) Option
WithResourceNamer specifies a function which will be used to obtain the resource name for a given request
func WithServiceName ¶
WithServiceName sets the given service name for the router.
func WithSpanOptions ¶
func WithSpanOptions(opts ...ddtrace.StartSpanOption) Option
WithSpanOptions applies the given set of options to the spans started by the router.
func WithStatusCheck ¶
WithStatusCheck allows customization over which status code(s) to consider "error"
Click to show internal directories.
Click to hide internal directories.