Repository navigation
[SVLS-8713] feat(logs-agent): accept pre-serialized logs and an oversize policy - #191
Draft
litianningdatadog wants to merge 1 commit into
Draft
litianningdatadog wants to merge 1 commit into
litianningdatadog wants to merge 1 commit into
Conversation
This was referenced Oct 21, 2026
litianningdatadog
force-pushed
the
tianning.li/logs-sc-1-fips-features
branch
from
October 21, 2026 19:50
db2d5af to
c3f11c2
Compare
litianningdatadog
force-pushed
the
tianning.li/logs-sc-2-aggregator-options
branch
from
October 21, 2026 19:50
da1b92b to
ab4758c
Compare
Why: bottlecap already turns each Lambda log into JSON in its own format, which this crate's entry type cannot express, and it sends logs over 1 MiB (with a warning) instead of dropping them. To use this crate without changing what Lambda users see, the aggregator needs both, as options. What: - The aggregator handle gets insert_serialized_batch(), which queues JSON strings as-is in the same queue as normal entries. - The aggregator and its service get an oversize policy: the default still drops entries over 1 MiB; the new "send with warning" option keeps them with one warning unless they are too big for any payload. Nothing changes for existing users. - The flusher's test module moves unchanged to src/flusher/tests.rs (it had grown to about 1,500 lines, mostly tests), and the counter tests use to count warning and error lines moves to a small test-only helper so other test modules can use it too. Most of this change's diff is that move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
litianningdatadog
force-pushed
the
tianning.li/logs-sc-2-aggregator-options
branch
from
October 21, 2026 19:52
ab4758c to
179bcd8
Compare
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.
What does this PR do?
AggregatorHandle::insert_serialized_batch(Vec<String>): queues already-serialized JSON objects as-is, in the same queue as normal entries.OversizePolicyon the aggregator and its service:Drop(default, today's behavior: entries over 1 MiB are dropped) orSendWithWarning(keep them with one warning, unless an entry is too big for any payload,len + 2 > 5 MiB, which is still dropped).src/flusher/tests.rsand a small test-only helper for counting log lines (flusher.rswas ~1,500 lines, mostly tests).Motivation
Part of SVLS-8713: bottlecap (the Datadog Lambda Extension) is replacing its own logs aggregator and flusher with this crate. Two rules for the whole stack:
bottlecap builds its own nested per-log JSON (message, Lambda context, tags) that
IntakeEntrycan't express; passing strings keeps the wire format byte-for-byte and avoids serializing twice. bottlecap also sends logs over 1 MiB with a warning instead of dropping them.Additional Notes
Both are opt-in; defaults unchanged. The large diff is mostly the test-file move (the moved tests are unchanged). Squashed from two commits (the move, then the feature).
Describe how to test/QA your changes
91 tests pass (11 new: serialized inserts, mixed batching, both oversize policies and their warning counts, the too-big-for-any-payload cap). All sc-0 tests unchanged.
Stack
Each PR is nested under the PR it builds on (and targets). Review and merge from the top down.
serverless-components (
datadog-logs-agentoptions; merge first)maindefault/fipsfeaturesretry()+FlushPolicydatadog-lambda-extension (bottlecap)
main🤖 Generated with Claude Code