rollbar

WebJar for rollbar

License

License

MIT
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

rollbar
Last Version

Last Version

2.15.2
Release Date

Release Date

Type

Type

jar
Description

Description

rollbar
WebJar for rollbar
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/rollbar/rollbar.js

Download rollbar

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/rollbar/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>rollbar</artifactId>
    <version>2.15.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/rollbar/
implementation 'org.webjars.bower:rollbar:2.15.2'
// https://jarcasting.com/artifacts/org.webjars.bower/rollbar/
implementation ("org.webjars.bower:rollbar:2.15.2")
'org.webjars.bower:rollbar:jar:2.15.2'
<dependency org="org.webjars.bower" name="rollbar" rev="2.15.2">
  <artifact name="rollbar" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='rollbar', version='2.15.2')
)
libraryDependencies += "org.webjars.bower" % "rollbar" % "2.15.2"
[org.webjars.bower/rollbar "2.15.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

rollbar

rollbar is a Go Rollbar client that makes it easy to report errors to Rollbar with stacktraces. Errors are sent to Rollbar asynchronously in a background goroutine.

Because Go's error type doesn't include stack information from when it was set or allocated, rollbar uses the stack information from where the error was reported.

You may also want to look at:

  • stvp/roll - Simpler, synchronous (no background goroutine) with a nicer API.

Installation

Standard installation to your GOPATH via go get:

go get github.com/stvp/rollbar

Documentation

API docs on godoc.org

Usage

package main

import (
  "github.com/stvp/rollbar"
)

func main() {
  rollbar.Token = "MY_TOKEN"
  rollbar.Environment = "production" // defaults to "development"

  result, err := DoSomething()
  if err != nil {
    // Error reporting
    rollbar.Error(rollbar.ERR, err)
  }

  // Message reporting
  rollbar.Message(rollbar.INFO, "Message body goes here")

  // Block until all queued messages are sent to Rollbar.
  // You can do this in a defer() if needed.
  rollbar.Wait()
}

Running Tests

Set up a dummy project in Rollbar and pass the access token as an environment variable to go test:

TOKEN=f0df01587b8f76b2c217af34c479f9ea go test

And verify the reported errors manually in the Rollbar dashboard.

Other Resources

For best practices and more information on how to handle errors in Go, these are some great places to get started:

Contributors

Thanks, all!

  • @kjk
  • @nazwa
  • @ossareh
  • @paulmach
  • @Soulou
  • @tike
  • @tysonmote
  • @marcelgruber
  • @karlpatr
  • @sumeet
  • @dfuentes77
  • @seriousben
org.webjars.bower

Rollbar

Versions

Version
2.15.2
2.3.9
2.2.8
1.9.4