Repository navigation
[SVLS-8713] test(logs-agent): pin current default behavior with characterization tests - #189
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
…tests Why: bottlecap is about to adopt this crate, and new opt-in options will be added for it. Other users of the crate (for example serverless-compat) must keep today's behavior exactly, so the current defaults need tests before anything changes. If a later change alters a default, one of these fails. What: tests only, no production code changes. They pin: - retry rules: 400, 401, 404 and 413 are dropped after one try; 408, 425, 429 and connection errors are tried three times and handed back; a resent request that fails again gets three more tries and is handed back again. - the default request: https://http-intake.logs.<site>/api/v2/logs with the API key, DD-PROTOCOL and Content-Type headers, a zstd body with Content-Encoding when compression is on (plain body when off), and the 5 second request timeout. - additional endpoints: called only after the primary request finishes, each receives exactly the same compressed bytes (compressed at the configured level), keeps its own API key, and is still sent when the primary fails, in which case only the primary request is handed back. - log volume: the number of warning lines for a request that keeps failing (server errors or dropped connections), a permanent error, a failing additional endpoint and each oversized entry, and that no error lines are written. - from_env() defaults with no environment variables set, turning compression off, and Observability Pipelines Worker mode only when enabled; and the 1 MiB entry limit (exactly 1 MiB kept, one byte more rejected). Adds tracing-subscriber as a test-only dependency to count log lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
litianningdatadog
force-pushed
the
tianning.li/logs-sc-0-characterization
branch
from
October 21, 2026 19:50
8bf6920 to
2c0a3f9
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?
Adds tests only (no production code) that pin what the crate does today with default settings:
from_env()default, and the 1 MiB entry limit (exactly 1 MiB kept, one byte more rejected)Adds
tracing-subscriberas a dev-dependency to count log lines.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 next PRs in this stack add options for bottlecap. These tests make sure none of them changes the defaults that other users rely on: if one does, a test fails.
Additional Notes
One commit (squashed from six per-area commits); the list above follows the same areas.
Describe how to test/QA your changes
cargo test -p datadog-logs-agent: 80 tests pass. clippy (-D warnings) and fmt clean.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