Skip to content

@sentry/nextjs docs: Why do you need to flush when deploying to Vercel? #4959

Answered by lforst
benj-dobs asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, vercel might have updated the docs behind the link in the code so it's not relevant anymore.

In essence, we're flushing here because we want all outgoing requests to sentry to be complete before continuing. Why? Vercel uses AWS lambdas behind scenes and those lambdas freeze after sending a response. We don't want the sending of error events to be interrupted by the freeze so we're just blocking the freeze until they're sent - otherwise errors might not get set to sentry.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@benj-dobs
Comment options

Answer selected by benj-dobs
Comment options

You must be logged in to vote
1 reply
@benj-dobs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants