Skip to content

Commit 5b47539

Browse files
vjfridgeCodex GPT-6
andcommitted
fix: align feature flag flush configuration and trim docs
Use the shared DD_FEATURE_FLAGS_ prefix for the timeout setting and remove PR-specific README and smoke-runbook text. Environment: Datadog workspace Co-Authored-By: Codex GPT-6 <noreply@localhost>
1 parent f6f08ba commit 5b47539

4 files changed

Lines changed: 3 additions & 96 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,3 @@ Unless explicitly stated otherwise all files in this repository are licensed und
7676
This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2019 Datadog, Inc.
7777

7878
[1]: https://www.datadoghq.com/blog/troubleshoot-lambda-function-request-response-payloads/
79-
80-
## Feature flag telemetry at invocation end
81-
82-
With a tracer and Lambda layer that support automatic feature flag flushing,
83-
the wrapper attempts to send pending evaluation and exposure events before
84-
returning a response or rethrowing a handler exception. No additional handler
85-
code or provider shutdown is required; providers and polling remain available
86-
for warm invocations.
87-
88-
`DD_FEATURE_FLAG_FLUSH_TIMEOUT_MS` sets the maximum added wait in milliseconds
89-
(default: `500`; `0` disables waiting). The actual budget is the smaller of that
90-
cap and the invocation's remaining time minus a 100 ms safety margin. The wrapper
91-
skips waiting when that budget is exhausted or unavailable. Incomplete flushes
92-
are reported in debug logs without changing the handler's result.
93-
94-
Delivery is best effort. A timeout stops waiting but does not cancel or retry
95-
in-flight requests; they may complete after a warm thaw. Abrupt termination can
96-
still lose buffered events. Endpoint acceptance does not guarantee immediate
97-
visibility in the UI. Older tracers safely skip the integration.
98-
99-
Release status: this capability requires the tracer's internal flush contract
100-
version 1. The first supported tracer/library/layer combination is pending
101-
coordinated release and deployed validation; an older published layer does not
102-
provide this behavior merely by setting the timeout variable.

‎datadog_lambda/config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _resolve_env(self, key, default=None, cast=None, depends_on_tracing=False):
8686

8787
flush_in_thread = _get_env("DD_FLUSH_IN_THREAD", "false", as_bool)
8888
feature_flag_flush_timeout_ms = _get_env(
89-
"DD_FEATURE_FLAG_FLUSH_TIMEOUT_MS", 500.0, float
89+
"DD_FEATURE_FLAGS_FLUSH_TIMEOUT_MS", 500.0, float
9090
)
9191
flush_to_log = _get_env("DD_FLUSH_TO_LOG", "false", as_bool)
9292
logs_injection = _get_env("DD_LOGS_INJECTION", "true", as_bool)

‎tests/integration/FEATURE_FLAG_FLUSH.md‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

‎tests/test_feature_flags.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def test_timeout_environment_parsing_preserves_flush(self):
7272
feature_flags, "config", Config()
7373
), patch.object(feature_flags, "_telemetry") as telemetry:
7474
if value is None:
75-
os.environ.pop("DD_FEATURE_FLAG_FLUSH_TIMEOUT_MS", None)
75+
os.environ.pop("DD_FEATURE_FLAGS_FLUSH_TIMEOUT_MS", None)
7676
else:
77-
os.environ["DD_FEATURE_FLAG_FLUSH_TIMEOUT_MS"] = value
77+
os.environ["DD_FEATURE_FLAGS_FLUSH_TIMEOUT_MS"] = value
7878
telemetry.FLUSH_API_VERSION = 1
7979
telemetry.flush.return_value = "completed"
8080
feature_flags.flush_feature_flag_telemetry(

0 commit comments

Comments
 (0)