README ¶ rollbar Middleware to integrate with rollbar error monitoring. It uses rollbar-go SDK that reports errors and logs messages. Usage Download and install it: go get github.com/gin-contrib/rollbar Import it in your code: import "github.com/gin-contrib/rollbar" Example package main import ( "log" "github.com/gin-contrib/rollbar" "github.com/gin-gonic/gin" roll "github.com/rollbar/rollbar-go" ) func main() { roll.SetToken("MY_TOKEN") // roll.SetEnvironment("production") // defaults to "development" r := gin.Default() r.Use(rollbar.Recovery(true)) if err := r.Run(":8080"); err != nil { log.Fatal(err) } } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Recovery(onlyCrashes bool) gin.HandlerFunc Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Recovery ¶ func Recovery(onlyCrashes bool) gin.HandlerFunc Recovery middleware for rollbar error monitoring Types ¶ This section is empty. Source Files ¶ View all Source files recovery.go Directories ¶ Show internal Expand all Path Synopsis example Click to show internal directories. Click to hide internal directories.