Skip to content

Conversation

@lym953
Copy link
Contributor

@lym953 lym953 commented Dec 4, 2025

Problem

When the Lambda runtime spins down, the extension may enter a loop waiting for unfinished work, printing up to 100,000s identical lines of log:

LOGS_AGENT | No more events to process but still have senders, continuing to drain...

For example, in one of my tests, this line was printed 31602 times within 1.28 seconds.

image

This:

  1. slightly complicates debugging for our engineers
  2. adds costs and confusion for customers who turn on DD_LOG_LEVEL=debug to debug the extension

This PR

Add a timer and print this line at most once every 100ms, so it will be printed at most 20 times within the 2-second spindown time.

Testing

No testing for now. Should be straightforward. Will see if logs are reduced in future debugging.

@lym953 lym953 marked this pull request as ready for review December 4, 2025 18:51
@lym953 lym953 requested a review from a team as a code owner December 4, 2025 18:51
@lym953 lym953 merged commit b260205 into main Dec 9, 2025
44 checks passed
@lym953 lym953 deleted the yiming.luo/less-log branch December 9, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants