Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for reporting to rollbar #1075

Merged
merged 5 commits into from
Jun 7, 2017
Merged

add support for reporting to rollbar #1075

merged 5 commits into from
Jun 7, 2017

Conversation

sumeet
Copy link
Contributor

@sumeet sumeet commented May 2, 2017

TODO:

@sumeet sumeet requested a review from ejholmes May 2, 2017 00:35
@@ -9,6 +10,9 @@ import (
"github.com/remind101/empire/server/github"
)

const hbExampleURL = "hb://api.honeybadger.io?key=<key>&environment=<environment>"
const rollbarExampleURL = "rb://api.rollbar.com?key=<key>&environment=<environment>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah shit, fixed!

@ejholmes
Copy link
Contributor

ejholmes commented May 2, 2017

Awesome. Looks good! Can you also add a line to CHANGELOG.md?

We're running this internally in our staging environment, I think we should give this a couple days and assuming no issues, we can merge.

@sumeet
Copy link
Contributor Author

sumeet commented May 2, 2017

@ejholmes sweet, sounds good. all set!

@ejholmes
Copy link
Contributor

ejholmes commented May 3, 2017

Just adding some comments on my findings here:

It seems like a lot of errors end up getting grouped incorrectly in Rollbar. Originally thought that this may have been a bug in remind101/pkg/reporter/rollbar, and tried to test with 293bd7a, however, errors still got clumped together.

Digging a little deeper, I noticed that all of the errors that got clumped together shared the same stack. In stvp/rollbar the fingerprint that gets generated for the error only takes the stack into account:

func (s Stack) Fingerprint() string {
	hash := crc32.NewIEEE()
	for _, frame := range s {
		fmt.Fprintf(hash, "%s%s%d", frame.Filename, frame.Method, frame.Line)
	}
	return fmt.Sprintf("%x", hash.Sum32())
}

I think this is ok, but ideally the fingerprint would be a combination of stack and error class, but it looks like there's no way to easily inject a custom fingerprint into stvp/rollbar.

@ejholmes ejholmes merged commit 217559f into master Jun 7, 2017
@ejholmes ejholmes deleted the rollbar branch June 7, 2017 18:23
@ejholmes ejholmes mentioned this pull request Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants