Documentation ¶
Overview ¶
Package ppgin instruments the gin-gonic/gin package (https://github.com/gin-gonic/gin).
This package instruments inbound requests handled by a gin.Engine. Register the Middleware as the middleware of the router to trace all handlers:
r := gin.Default() r.Use(ppgin.Middleware())
Use WrapHandler to select the handlers you want to track:
r.GET("/external", ppgin.WrapHandler(extCall))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware() gin.HandlerFunc
Middleware returns a gin middleware that creates a pinpoint.Tracer that instruments the gin handler function.
func WrapHandler ¶
func WrapHandler(handler gin.HandlerFunc) gin.HandlerFunc
WrapHandler wraps the given gin handler and adds the pinpoint.Tracer to the request's context. By using the pinpoint.FromContext function, this tracer can be obtained.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.