feat(datadog): add stateless Foldspace retry fallback - #2252
Draft
aqian01 wants to merge 4 commits into
Draft
Conversation
Regression Detector (Agent Data Plane)Optimization Goals:
|
webern
reviewed
Aug 4, 2026
| #[serde(default)] | ||
| pub struct LogsConfig { | ||
| /// Whether stateful Foldspace transport is enabled (`logs_config.use_grpc`). | ||
| pub use_grpc: Option<bool>, |
Contributor
There was a problem hiding this comment.
Could this be named more clearly? use_grpc does not imply, to me, enable_foldspace.
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.
Summary
payload_id.prev(), applying the seed and retained wire datums as separate decoder batcheslogs_config.use_grpcconfiguration and generated configuration documentationWhy
ADP prioritizes fresh payloads over retries. Newer stateful log payloads can therefore redefine Foldspace patterns before an older failed payload is retried. Replaying the old stateful bytes against the latest stream state can reconstruct the wrong logs.
Before any stateful payload enters the existing retry or persisted queues, this change uses Foldspace's retained-payload recovery API to rebuild the original logical logs and creates an ordinary self-contained transaction accepted by the same intake endpoint. The payload leaves stateful replay only through that conversion path, and its changelog retention is released only after retry-queue acceptance or an explicit terminal drop.
Permanent HTTP failures keep the existing drop behavior. If stateless expansion exceeds retry-queue limits, ADP records an oversized conversion and drops it; it never falls back to enqueueing stateful bytes.
Foldspace dependency
c585fd1fc09758eb61e133b0e4e023a01c82cb26Initial POC scope and durability
DispatchPolicy::ReliableonlyPersisted entries are complete stateless transactions and disk recovery has no Foldspace stream-state dependency. This does not provide full crash durability: a process crash before conversion can still lose an unacknowledged stateful payload, and the persisted queue retains its existing dequeue crash window.
Checks
cargo nextest run -p saluki-components stateful_logs(9 passed)cargo nextest run -p agent-data-plane-config-system saluki_only(5 passed)cargo nextest run -p datadog-agent-config-testing(4 passed)cargo check -p saluki-components --testscargo check --workspacecargo check --workspace --testsmake build-schema-overlaymake fmtmake check-all