Repository navigation
Conversation
…level
A build of extension v99 for one support ticket. With DD_LOG_LEVEL=debug,
the extension also logs each TCP connect (hyper_util) and each HTTP/2
frame (h2) of its flushes to Datadog. These lines show where a stalled
flush stops: the TCP connect, the TLS handshake, or the reply.
The lines go to CloudWatch Logs only. The formatter starts them with
{"target":"<target>", and the Lambda logs processor does not send
extension records that start that way, because these libraries also log
the requests that send the extension's own logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 2 Pipeline jobs failed
ℹ️ Info🔄 Datadog auto-retried 2 jobs - 0 passed on retry Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 9ccd537 | Docs | View more details | Give us feedback! |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
This customer-specific diagnostic branch is explicitly marked “Do not merge” and requires human release approval.
0 open findings
What changed in this PR
Adds customer-specific diagnostics to extension v99 to help locate stalled flushes without introducing unrelated changes from main.
Changes:
- Enables TCP connection and HTTP/2 frame debug logs.
- Marks HTTP library logs and excludes them from Datadog forwarding, retaining CloudWatch visibility.
- Adds formatter and log-filtering tests.
| File | Description |
|---|---|
| bottlecap/src/logs/lambda/processor.rs | Drops HTTP library records and tests exclusion. |
| bottlecap/src/logger.rs | Marks HTTP library logs, includes event fields, and tests formatting. |
| bottlecap/src/bin/bottlecap/main.rs | Enables hyper_util and h2 diagnostics at debug/trace settings. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Do not merge. This branch is extension v99 plus one commit, for a custom layer for one support ticket. The reusable change for
mainis #1413 and #1429.Problem
A customer's invocations run until their 25 s timeout after the handler returns. In the extension's debug logs, the flush to Datadog ends at the line
Attempting request, and nothing follows until the timeout. The logs cannot show whether the TCP connect, the TLS handshake or the reply stalled.The customer runs extension v99. A custom build from
mainwould include 41 more commits, some of which change the flush path, such as the libdatadog crate that sends traces. So this build starts from v99, and its only change is the extra logs.This PR
When
DD_LOG_LEVELisdebug, the extension also logs at debug level for two HTTP libraries:hyper_util, the library that opens the TCP connections, logsconnecting to <ip>:<port>andconnected to <ip>:<port>.h2, the HTTP/2 library, logs each frame that the extension sends or receives, for examplesend frame=Headers { … }.The extension sends its own logs to Datadog, and these libraries also log the requests that send those logs. So their lines go to CloudWatch Logs only:
{"target":"<target>",and writes the event's other fields, such as the h2 frame, asname=value.The customer changes only the extension layer. The function already has
DD_LOG_LEVEL=debug.Testing
Automated tests
Steps
cargo test --locked --lib -- logger:: logs::cargo clippy --all-targets --lockedResult
81 tests pass, including the 3 new logger tests and the new processor test. Clippy passes.
End-to-end tests in Lambda
Steps
scripts/publish_bottlecap_sandbox.sh(x86_64, not FIPS, us-east-2).DD_LOG_LEVEL=debug, and no other new variable:Result
connected to 127.0.0.1:9443, then no other line for that connection until the 25 s timeoutconnecting to <ip>:443for 3 intake IPs, and noconnected tosend frame=Headers,send frame=Data,received frame=Headers,received frame=DataThe trace flush uses HTTP/1, so it shows only the
hyper_utilconnect lines.🤖 Generated with Claude Code