Repository navigation
Conversation
…e Lambda timeout AWS raised the maximum timeout of on-demand Lambda functions to 30 minutes. The end flush strategy sets a timer to the maximum timeout so that it never fires. With a 15-minute timer, an invocation longer than 15 minutes got a blocking flush while the handler ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the flush-strategy interval update.
No open issues 🎉
What changed in this PR
Updates the Lambda extension’s end flush strategy timer from 15 to 30 minutes to match the new maximum on-demand Lambda timeout and avoid a timer-triggered flush at minute 15.
Changes:
- Raises the
endstrategy interval to 30 minutes and updates its unit-test expectation. - Aligns the README and test-mode doc comment with the new interval.
| File | Description |
|---|---|
bottlecap/src/lifecycle/flush_control.rs |
Updates the interval constant, explanatory comment, and unit-test expectation. |
bottlecap/src/bin/bottlecap-test-mode/main.rs |
Updates the doc comment to describe the 30-minute placeholder interval. |
bottlecap/README.md |
Documents the new interval and its relation to the on-demand timeout. |
Review effort: Balanced
|
One potential impact of extending the flush interval is increased memory pressure. For example, the logs and trace aggregators both append to unbounded queues. Could we retain a periodic safety flush or add a buffer-size-triggered flush to reduce the risk of data loss or an out-of-memory failure? |
litianningdatadog
left a comment
There was a problem hiding this comment.
left some comment
Problem
On 2026-11-19, AWS raised the maximum timeout of on-demand Lambda functions from 15 minutes to 30 minutes (AWS announcement).
A user who sets
DD_SERVERLESS_FLUSH_STRATEGY=endexpects the extension to send data only when each invocation ends. To make sure that no flush starts during the invocation, the extension sets a timer to the maximum Lambda timeout, 15 minutes. For an invocation longer than 15 minutes, the timer fires at minute 15. The extension then does one blocking flush while the handler runs.This PR
endstrategy from 15 minutes to 30 minutes.The 90-minute limit of Managed Instances does not apply. In that mode, the extension always replaces
endwith a continuous strategy.Impact
This applies to a user of
endwith an invocation between 15 and 30 minutes. The extension keeps the data of the full invocation in memory until it ends. Before this change, the flush at minute 15 released it.Testing
Steps
cargo test --lib lifecycle::flush_controlcargo clippy --all-targetsResult
endtimer valueI did not run an invocation longer than 15 minutes in Lambda.
🤖 Generated with Claude Code