Documentation ¶
Overview ¶
Package ppgorilla instruments the gorilla/mux package (https://github.com/gorilla/mux).
This package instruments inbound requests handled by a gorilla mux.Router. Register the Middleware as the middleware of the router to trace all handlers:
r := mux.NewRouter() r.Use(ppgorilla.Middleware())
Use WrapHandler or WrapHandlerFunc to select the handlers you want to track:
r.HandleFunc("/outgoing", ppgorilla.WrapHandlerFunc(outGoing))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware() mux.MiddlewareFunc
Middleware returns a mux middleware that creates a pinpoint.Tracer that instruments the http handler function.
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.