Repository navigation
Conversation
Use the tracer flush contract within the remaining Lambda budget while preserving handler outcomes and warm providers. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost>
Keep invalid timeout defaults numeric, initialize the smoke provider before invocation, and assert older tracer compatibility. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost>
Incorporate upstream Lambda v130 and instrumentation updates for FFL-3412. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost>
Contributor
There was a problem hiding this comment.
More details
Static review identified no actionable defect in cleanup placement, timeout budgeting, or older-tracer compatibility. Runtime behavior and deployed AWS freeze/thaw delivery remain unverified.
🤖 Bits Code Review · Commit f6f08ba
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A customer asked about flushing feature-flag telemetry from Python Lambda functions (FFL-3412). Short invocations can return before background writers send evaluation and exposure events, leaving telemetry delayed by Lambda freezing or lost on termination.
This change automatically attempts a flush before the invocation finishes, without customers adding handler code. Providers remain available for warm invocations.
Changes
DD_FEATURE_FLAG_FLUSH_TIMEOUT_MS(default 500 ms) and remaining invocation time minus a 100 ms safety margin.Testing
main: 361 tests plus 15 subtests passed with the rebuilt candidate tracer; 360 plus 15 subtests passed withddtrace4.1.1 (candidate-only test skipped). Flake8 passed.Release coordination
Companion: dd-trace-py #21135. Either PR can merge first; ship the tracer capability before the Lambda library/layer containing both changes. Older tracers safely skip the flush. Delivery remains best effort; timeout stops waiting, not the underlying send.
PR checklist
Types of Changes
Check all that apply