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

More tags when logging errors to Sentry #4375

Merged
merged 1 commit into from
Jul 17, 2018
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 16, 2018

This helps us to filter different kind of random/unhandled errors by tags and make debugging easier.

@humitos
Copy link
Member Author

humitos commented Jul 16, 2018

I think that we could extend from SentryHandler and write our custom one that depending on the context adds these tags automatically before this line https://github.com/getsentry/raven-python/blob/master/raven/handlers/logging.py#L97 by modifying the record object.

This way, we don't need to add tags all around the project's source code and we could guess where we are or what type of error are we handling (build, web, etc) and add the corresponding tags for each case. Just an idea, though.

@humitos humitos requested a review from a team July 17, 2018 15:51
Copy link
Contributor

@davidfischer davidfischer left a comment

Choose a reason for hiding this comment

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

This makes sense to me and looks good.

I do have some concerns about the default value of self.project and self.build being None and then we assume it is set correctly but that is probably best for a different PR.

@davidfischer davidfischer merged commit a6fa012 into master Jul 17, 2018
@stsewd stsewd deleted the humitos/sentry/tags branch August 15, 2018 22:24
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