Skip to content

Middleware to integrate with rollbar error monitoring.

License

Notifications You must be signed in to change notification settings

easonlin404/rollbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollbar

Build Status codecov Go Report Card GoDoc

Middleware to integrate with rollbar error monitoring. It uses roll client for Go that reports errors and logs messages.

Usage

Start using it

Download and install it:

$ go get github.com/easonlin404/rollbar

Import it in your code:

import "github.com/easonlin404/rollbar"

Example

package main

import (
	"github.com/easonlin404/rollbar"
	"github.com/gin-gonic/gin"
	"github.com/stvp/roll"
)

func main() {
	roll.Token = "POST_SERVER_ITEM_ACCESS_TOKEN"
	//roll.Environment = "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

Releases

No releases published

Packages

 
 
 

Languages