rollbar

package module
v0.0.0-...-3badf1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

Index

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL