Skip to content

[SVLS-8713] fix(logs): send additional endpoints the Datadog intake format when OPW is on - #1449

Draft
litianningdatadog wants to merge 1 commit into
tianning.li/logs-bc-0-contract-testsfrom
tianning.li/logs-bc-fix-1-opw-extras
Draft

litianningdatadog wants to merge 1 commit into
tianning.li/logs-bc-0-contract-testsfrom
tianning.li/logs-bc-fix-1-opw-extras

Conversation

@litianningdatadog

@litianningdatadog litianningdatadog commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Part of SVLS-8713: bottlecap is replacing its own logs aggregator and flusher with the shared datadog-logs-agent crate from serverless-components. Lambda users must not notice the swap, so the plan is: pin today's behavior with tests (this stack), fix two real bugs first so the swap stays a pure refactor (this stack), then swap the aggregator and the flusher (bc-1 and bc-2, which will be opened after the serverless-components PRs merge).

Bug: with Observability Pipelines Worker enabled, every additional logs endpoint was also treated as a worker. Those endpoints are Datadog intakes, so they got requests at the wrong path (no /api/v2/logs), without DD-PROTOCOL, and uncompressed.

Fix: only the primary endpoint follows the OPW setting. Additional endpoints always get /api/v2/logs, DD-PROTOCOL: agent-json, and compression per DD_LOGS_CONFIG_USE_COMPRESSION. Each batch is still compressed only once and shared by every endpoint that sends compressed data; raw batches are freed as soon as nothing needs them.

Fixed before the swap so the swap itself stays a pure refactor (the shared crate already behaves correctly here). User-facing: worth a release note.

Testing

757 tests pass. The contract test that pinned the old behavior now checks the fixed one; a new test covers OPW with compression off. clippy 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-agent options; merge first)

datadog-lambda-extension (bottlecap)

🤖 Generated with Claude Code

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

DataDog/datadog-lambda-extension | bottlecap (arm64, fips, alpine) — 🔄 Retry may pass, looks flaky

View more details · View in GitLab

ℹ️ Info

🔄 Datadog auto-retried 2 jobs - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 897463e | Docs | View more details | Give us feedback!

…PW is on

Why: with Observability Pipelines Worker enabled, the extension also treated
every additional logs endpoint as a worker. Those endpoints are Datadog
intakes, so they received requests at the wrong path (no /api/v2/logs),
without the DD-PROTOCOL header, and uncompressed.

What: only the primary endpoint follows the OPW setting now. Additional
endpoints always get /api/v2/logs, DD-PROTOCOL: agent-json, and compression
per DD_LOGS_CONFIG_USE_COMPRESSION. Each batch is still compressed only once
and shared by every endpoint that sends compressed data. The contract test
that pinned the old behavior now checks the fixed one, and a new test covers
the case with compression off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@litianningdatadog
litianningdatadog force-pushed the tianning.li/logs-bc-fix-1-opw-extras branch from 23e4789 to 897463e Compare October 21, 2026 19:53
@litianningdatadog
litianningdatadog force-pushed the tianning.li/logs-bc-0-contract-tests branch from 3aefa30 to 31214a0 Compare October 21, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant