I have been using Sentry now for a while and it’s great. It picks up most errors, but somehow not all of them.
I have a Slack bot running with the Django framework (hosted with Heroku) and errors that happen with the Slack bot are not tracked. When my bot picks something up from a team in Slack, it sends a post request to a specific URL on my server. The server then processes that request and then sends something back if needed. Somehow Sentry does not catch any 500 errors there. According to the logs from Heroku, errors happen there.
Unfortunately, I have not been able to fix this yet. I think Sentry depends on requests and since celery is not making them, it doesn’t catch the errors. I am currently using both the Django error handling system and sentry to catch errors. It’s not great, but so far it works for me.
Perhaps you could try out the new Python SDK instead of Raven? It is more intrusive in hooking into frameworks but also simpler to debug in why certain errors do not get sent. Make sure to enable the Celery and Django integration.
I use the new version of Sentry. The problem seems to be specific to Slack?
Here’s my function:
@csrf_exempt
def Slack_Webhook(request):
data = json.loads(request.body)
raise Exception()
When I curl the endpoint the exception gets logged, when I hit it through Slack making a POST request as a webhook, it doesn’t (I know it still hits it because it shows up as a 500 in my server logs). How is this possible?
BTW, Rollbar picks it up either way I love Sentry but it seems like I’m going to have to switch if it randomly doesn’t catch errors based on who’s sending the request somehow?