question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sentry doesn't pick up errors via Slack Webhook

See original GitHub issue

I’m using Django and when I cURL my endpoint, the exception is raised and logged in Sentry successfully. However, when Slack hits the endpoint through its webhook system, it somehow doesn’t get logged in Sentry. I know it’s still being hit because the 500 response still shows up in my logs and the error gets logged correctly in rollbar.

Here’s the code:

@csrf_exempt
def Slack_Webhook(request):

  data = json.loads(request.body)

  raise Exception()

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
untitakercommented, Apr 7, 2019

Ah! Go to your project settings, go to “Inbound Filters”. There you will see the option for “known web-crawlers” likely enabled:

Screenshot 2019-04-07 at 18 43 25

We maintain a regex for those user agents here: https://github.com/getsentry/sentry/blob/e6cc8483b3992fb02ebb39649efd2b264fcadeca/src/sentry/filters/web_crawlers.py#L38-L39

If you want to refine that regex somehow feel free to open a PR.

I will close this though since it’s not a bug in the SDK. Thanks for responding so quickly!

0reactions
reparadocscommented, Apr 7, 2019

Once I upgraded, I now get this error:

Apr 06 21:27:07 trestle-shrine app/web.1:  [sentry] ERROR: Unexpected status code: 403 (body: b'{"error":"Event dropped due to filter: web-crawlers"}') 
Apr 06 21:27:07 trestle-shrine app/web.1: ERROR:sentry_sdk.errors:Unexpected status code: 403 (body: b'{"error":"Event dropped due to filter: web-crawlers"}') 

Is the slack webhook being miscategorized as a web crawler? Is there a way to disable this filter?.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slack + Sentry Integration
Track errors in real time via chat. Take immediate action by assigning, resolving, or ignoring the error link. Assign new issues to any...
Read more >
Slack Integration - Sentry Developer Documentation
Create a Slack App To use Sentry's Slack integration you'll need to create a Slack app. Navigate to Your Apps and click Create...
Read more >
How to configure & use Performance Monitoring by Sentry
Neil Manvar (Solutions Engineering Manager at Sentry ) walks you through how to get the most out Sentry's new Performance Monitoring ...
Read more >
How Sentry Receives 20 Billion Events Per Month While ...
Once the image is in production, we trigger a rolling restart of every Sentry container to pick up the new image. Sentry plus...
Read more >
Custom Sentry Reporting. Customising our Slack/Sentry…
The Approach · Create a service to accept a webhook and push to Slack · Configure Slack to receive the notification · Configure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found