Repository navigation
[SVLS-8713] perf(logs-agent): compress each log batch only once - #194
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-4-compress-once
branch
from
October 21, 2026 19:50
947fde3 to
89ab609
Compare
litianningdatadog
force-pushed
the
tianning.li/logs-sc-3b-retry-and-policy
branch
from
October 21, 2026 19:50
e0406de to
5ac08a9
Compare
Why: the flusher compressed the same batch again for every endpoint. With additional endpoints configured, that multiplied CPU work, which matters for bottlecap on small Lambda functions. What: each batch is now compressed at most once, the first time an endpoint needs it, and the same bytes are reused for every other endpoint. The bytes sent do not change. New tests check that the primary and every additional endpoint receive identical bytes, equal to compressing the batch once, and that each batch in a flush is still compressed on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
litianningdatadog
force-pushed
the
tianning.li/logs-sc-3b-retry-and-policy
branch
from
October 21, 2026 19:52
5ac08a9 to
a562801
Compare
litianningdatadog
force-pushed
the
tianning.li/logs-sc-4-compress-once
branch
from
October 21, 2026 19:52
89ab609 to
84cb56d
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?
Each batch is compressed at most once (per-batch
OnceLock) and the same bytes are reused for the primary and every additional endpoint. The bytes sent don't change.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:
The flusher compressed the same batch again for every endpoint; with additional endpoints that multiplies CPU work, which matters on small Lambda functions.
Additional Notes
None.
Describe how to test/QA your changes
111 tests pass (new: primary and extras receive identical bytes equal to compressing once; each batch in a multi-batch flush is still compressed on its own).
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