Documentation
¶
Overview ¶
Package ppchi instruments the go-chi/chi package (https://github.com/go-chi/chi).
This package instruments inbound requests handled by a chi.Router. Register the Middleware as the middleware of the router to trace all handlers:
r := chi.NewRouter() r.Use(ppchi.Middleware())
Use WrapHandler or WrapHandlerFunc to select the handlers you want to track:
r.Get("/hello", ppchi.WrapHandlerFunc(hello))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware returns a chi middleware that creates a pinpoint.Tracer that instruments the http handler.
func WrapHandler ¶
WrapHandler wraps the given http handler.
func WrapHandlerFunc ¶
func WrapHandlerFunc(f func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
WrapHandlerFunc wraps the given http handler function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.