getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.5k stars 4.11k forks source link

Error events not triggering webhook request #50122

Closed cdelst closed 1 year ago

cdelst commented 1 year ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Setup integration, designate webhook URL, and error webhook
  2. Install the integration
  3. Trigger error events that are sent to Sentry
  4. Look for requests made to the webhook URL.

Expected Result

When errors are sent to sentry, I expect the error webhook to hit the webhook URL designated in the integration.

Actual Result

We are not seeing any requests made from Sentry to the endpoint specified in the Webhook URL field, as far as we can tell.

I designated https://ld-stg.launchdarkly.com/sentry/webhook as our webhook route, and looking at the logs for that route after sending ~70 errors to sentry, I am not seeing any requests.

image

This is a chart displaying the amount of requests made to our ingestion endpoint (the 1 being me sanity-checking our logging with a manual request) image

For some more background information, we're relying on the Sentry-Hook-Resource: error header to route the request correctly in our ALB.

We validated that our ALB is working correctly by running two different curl commands:

$ curl -X POST -H "Content-Type: application/json" -H "Sentry-Hook-Resource: error" -s -I https://ld-stg.launchdarkly.com/webhook/sentry

HTTP/2 401
content-type: application/json
strict-transport-security: max-age=31536000
accept-ranges: bytes
date: Wed, 31 May 2023 21:42:52 GMT
via: 1.1 varnish
x-served-by: cache-bfi-krnt7300059-BFI
x-cache: MISS
x-cache-hits: 0
x-timer: S1685569372.825136,VS0,VE207
age: 0
content-length: 0

$ curl -X POST -H "Content-Type: application/json" -H "Sentry-Hook-Resource: installation" -s -I https://ld-stg.launchdarkly.com/webhook/sentry

HTTP/2 500
strict-transport-security: max-age=31536000
accept-ranges: bytes
date: Wed, 31 May 2023 21:43:10 GMT
via: 1.1 varnish
x-served-by: cache-bfi-krnt7300037-BFI
x-cache: MISS
x-cache-hits: 0
x-timer: S1685569390.940747,VS0,VE282
vary: Accept-Encoding
age: 0
content-length: 0

cc @Dhrumil-Sentry

Product Area

Issues

Link

https://launchdarkly-ecosystem.sentry.io/settings/developer-settings/launchdarkly-staging/

DSN

No response

Version

No response

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing, due by (sfo). ⏲️

getsantry[bot] commented 1 year ago

Routing to @getsentry/product-owners-settings-integrations for triage, due by (sfo). ⏲️

scefali commented 1 year ago

@cdelst So it looks like your service is returning a 404 based on the Integration dashboard.

Screen Shot 2023-06-01 at 9 12 17 AM

Something at that endpoint is returning a 404. My guess is that something in your routing is messed up so it doesn't reach the route you expect.

cdelst commented 1 year ago

Thank you! That's useful information.

cdelst commented 1 year ago

Figured it out, thanks.

cdelst commented 1 year ago

Surfacing the webhook logs in-app would be super useful if there's something I can +1 to support that feature for 👍🏻