-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sentry not reporting all errors from AWS Lambda #15993
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
Comments
Hey, thanks for writing in. Could the problem be that the Sentry events are not being flushed before the serverless handler is exited? You need to make sure to call |
Ok, I can try to ensure Sentry.flush is called before the end of function. Still, isn't odd, this situation? There is one request causing error - that one is reported. Then there is another causing different error - this one is not reported. And at the end there is a call to /status endpoint to ensure the lambda still is running. One event got though, the other not. And lambda after that still stay warm, so should be able to flush in the background. Especially I see in the logs an attempt:
|
I know you selected SaaS as an option in the issue template but where are you pointing the DSN to. Network error seems rather funky. Like some infra issues, or routing, or something that is out of Sentry's realm of control actually. |
This is a SaaS setup. The DSN format is: https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxxx.ingest.us.sentry.io/0000000000000000. The service is running from the eu-west-2 region. Yesterday before I produced the log I posted here, for over an hour I've been producing errors to capture and I looked at the Sentry debug logs in deployed lambda and I saw quite a few of these errors. |
Ok it's really frustrating not to see the exact error in the logs. I am gonna add a debug statement there. |
#15993 is incredibly annoying to debug because we don't log the actual error
I added a log message. Would you mind bumping to the latest version and looking in the logs again? Thanks! |
I checked it last evening. The log didn't gave us much more above of what was there already.
|
At the end I think it was a failure on my side. Like @mydea posted a few days before:
When integrating Sentry I followed the Express guide, even though we run our app as AWS Lambda. I hadn't added I believe we can close this issue. Thanks for the assistance, and sorry for any confusion caused! 🙏 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
9.11.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Node: 18.20.6
Config
sample testing endpoints in passed to Express.js router:
Expected Result
All errors getting reported to Sentry.
Actual Result
Not all errors are reported to Sentry.
I set
debug: true
in options and I noticed these:fulllog.txt
For scenario where I call /api/throw, then /api/throw2 and /api/status.
The first error got though, the second error is not reported.
While I've been testing it today on a deployed lambda, Sentry seems to drop more events then pass through. And it is not they are not accepted - they are not reaching to the Sentry server. The project it belongs are still running low numbers - in stats I see, on total of 16 error, 16 got accepted, but there should be more then 16 errors reported.
These logs come from SDK 9.11.0, but I tested with v8 and I got similar results.
The code runs on AWS Lambda.
The text was updated successfully, but these errors were encountered: