-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GCPFunction] Failure to flush leads to cloud function hanging #4809
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
Note: I am able to fix this issue by running the same
Basically, it seems like the issue is that it is possible not to call |
Thanks for writing in! I investigated a bit and I believe this error occurs when sentry returns a NOK response while we are flushing the event buffer with The following section in the promise buffer will simply return a rejected promise while no consumer of sentry-javascript/packages/utils/src/promisebuffer.ts Lines 92 to 98 in 4ab3abb
I'm not totally sure whether that's actually the issue because I didn't try to repro, but if it is we should def fix it. |
Thanks for looking into this so quickly! This mismatch in expectation makes sense. I think seeing the Sentry error in our logs is vaguely useful (or could be to others), so I'm not sure if the answer is just to swallow things locally or to explicitly |
We just merged #5090 which will hopefully get rid of this problem entirely. The SDK should not throw anymore when transmitting errors to Sentry fails. In case of an error, the SDK will simply log the error (if you set We are currently amidst preparing for the v7 release of the SDK - meaning this change will become available with the next beta or release candidate version of v7. |
We are observing the following problem, which seems to be related to this issue: When our sentry subscription runs out of transactions (i.e. we reach for example 100k transactions included in the minimum price business subscription), our functions start to hang all the time. There is a perfect correlation in our metrics between cloud functions hanging and sentry transactions running out. I suspect that something internally throws, when the transaction can not be reported and subsequently this issue is triggered. As a workaround you can buy additional sentry transactions (not ideal, I'd say), and we are looking into downgrading the sentry Maybe you can hotfix this in a release prior to v7? |
@fpoppinga that problem should also be resolved with the fix. The v7 release will most likely happen later today. I will check back with the team about cherry picking onto v6. For now the recommendation is to upgrade. |
@lforst Thanks for getting back to me, alright, I'll look into upgrading to 7 ASAP then :) |
Closing this because we released v7 - feel free to ping me if there are any outstanding issues! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/serverless
SDK Version
6.19.2
Framework Version
6.19.2
Link to Sentry event
No response
Steps to Reproduce
We have a project in which we happen to be over the transaction limit.
GCPFunction.wrapHttpFunction
around any function.tracesSampleRate: 1.0
See some errors like this show up in the logs:
Expected Result
Transactions / traces do not send, but functions continue to operate as expected.
Actual Result
Function times out.
The text was updated successfully, but these errors were encountered: