Skip to content

sasha-bichkov/rollbar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollbar

Build Status codecov Go Report Card GoDoc Join the chat at https://gitter.im/gin-gonic/gin

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 (
	"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))

	r.Run(":8080")
}

About

Middleware to integrate with rollbar error monitoring.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%