Skip to content

AWS Lambda _endSpan/forceFlush() can block handler indefinitely #20063

@logaretm

Description

@logaretm

The vendored AwsLambdaInstrumentation._endSpan calls tracerProvider.forceFlush() without any timeout.

Because _endSpan sits in the promise chain before wrapHandler's flush(2000), a hung forceFlush() blocks the Lambda from ever returning, causing it to sit idle until the Lambda runtime kills it at its configured timeout.

We got the original report on discord.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions