-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Flushing doesn't work with asynchronous transport #2000
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
You need to add the request to the transport internal buffer so
So if you implement your custom transport, you need to at least implement close which takes care of this. |
I don't want to implement custom transport. The issue is with default http / https transport. I've just provided you a way to reproduce this issue. To reproduce this issue directly on upstream https implementation, please change in node_modules https transport sendEvent to: HTTPSTransport.prototype.sendEvent = function (event) {
console.log('sending https')
// ... rest
}; and add The result are following logs:
As you can see even default transports fails to fully send events after Also: Why isn't promise returned from sendEvent automatically added to _buffer? It seems more sensitive than documenting internal _buffer thing. Please reopen |
@sentry/node
(5.0.5)Sentry.flush()
doesn't wait for events to be delivered by transport. This can result in dropped events in serverless environment like AWS lambda.Reproduction:
The text was updated successfully, but these errors were encountered: