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 option to add error breadcrumb in sentry log #81

Merged
merged 6 commits into from
Feb 4, 2019

Conversation

nicpottier
Copy link
Contributor

When using pkg/errors a problem we keep encountering is that sentry truncates the error message, which removes relevant information that has been annotated on the error via Wrapf. I looked into adding this into the StackTraceFrame but it would include a mountain of changes including ones upstream in raven-go.

This instead adds a new option IncludeErrorBreadcrumb which when true will add a breadcrumb to the sentry report that includes the verbose print of the error. When using pkg/errors this gives you a full trace including the annotations.

Totally understand if this isn't something you want to merge but leaving this here as maybe it will be useful to others. The "right" way to do this is to annotate each StackTraceFrame with vars in the cases where there is an annotation. This would require tweaking pkg/errors to get at the error message at that level (and not only the recursive error message) and tweaking getsentry/raven-go to let us set vars on a StackTraceFrame.

errors fundamental illegal method get 2019-01-29 10-40-58

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 81.19% when pulling c2962b8 on nyaruka:master into 4034fb1 on evalphobia:master.

@evalphobia evalphobia merged commit ab0fa2e into evalphobia:master Feb 4, 2019
@evalphobia
Copy link
Owner

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.

3 participants