Search code examples
pythonsentryraven

Sentry for Python: Add "git blame" like prefix to each source code line


It would be really great if exceptions in sentry would contain info like git blame does.

If every line of source code which I see in an exception in sentry would have a prefix like git blame (date, commit hash, author) you could find the relevant commit faster.

AFAIK sentry can't do this out of the box. Where and how could I hook into sentry to get this?

Please leave a comment why you down-vote this question. I am curious and willing to learn.

Just for the records. The sentry team is working on something like this. Not exactly, but it does solve the same use case: https://github.com/getsentry/sentry/issues/6547


Solution

  • I'd suggest you to try Guthub Plugin, which doesn't show git blame, but integrates with Sentry Releases and show an appropriate commit and author with a link to Github.

    https://sentry.io/integrations/github/