chore(deps): bump libdatadog to 48da0d8 for client-computed header fix#1244
chore(deps): bump libdatadog to 48da0d8 for client-computed header fix#1244lucaspimentel wants to merge 3 commits into
libdatadog to 48da0d8 for client-computed header fix#1244Conversation
Bump all libdd-* dependencies from db05e1f to 48da0d8 to pick up libdatadog PR #2071, which fixes how `From<&HeaderMap> for TracerHeaderTags` parses the `datadog-client-computed-stats` and `datadog-client-computed-top-level` headers so the behavior matches the Go trace-agent. Bottlecap consumes this path in traces/trace_agent.rs via `(&parts.headers).into()`. Adapt to breaking API changes between the two revisions: - libdd_capabilities `HttpClientTrait` was renamed to `HttpClientCapability`. - `SendData::send` now requires `C: HttpClientCapability + SleepCapability`, so implement `SleepCapability` for `HttpClient` (backed by tokio::time::sleep, mirroring libdatadog's NativeSleepCapability).
|
libdatadog to 48da0d8 for client-computed header fix
…the libdatadog bump Adds a #[cfg(test)] mod tests block at the (&headers).into() boundary that handle_traces uses, giving the db05e1f -> 48da0d8 bump its missing behavioral coverage for libdatadog#2071. Assertions are Go-agent-aligned (isHeaderTrue/ ParseBool): truthy values -> true, absent/empty -> false, falsey literals (false/0/f/F/FALSE/False) -> false, and client_computed_top_level no longer set by presence alone. These would fail on the pre-bump rev.
…datadog bump PR The Tier 0 tests assert libdatadog parsing behavior (not the _dd.compute_stats feature), and libdatadog#2071 changes that behavior via the db05e1f -> 48da0d8 bump in PR #1244. Move them there so the bump carries its own behavioral coverage and the assertions don't need to assert opposite things on two branches. Feature branch keeps Tiers 1-3; rebase onto #1244 after it merges.
…datadog bump PR The Tier 0 tests assert libdatadog parsing behavior (not the _dd.compute_stats feature), and libdatadog#2071 changes that behavior via the db05e1f -> 48da0d8 bump in PR #1244. Move them there so the bump carries its own behavioral coverage and the assertions don't need to assert opposite things on two branches. Feature branch keeps Tiers 1-3; rebase onto #1244 after it merges.
Describe the exact false-set the parser recognizes and note that non-ParseBool values like "yes" resolve to true, matching what the truthy-values test asserts. 🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
| } | ||
| } | ||
|
|
||
| impl SleepCapability for HttpClient { |
There was a problem hiding this comment.
Shouldn't this live then either in test or with the test feature so its not included in prod code?
There was a problem hiding this comment.
The libdatadog version bump made SendData::send require HttpClientCapability + SleepCapability, and bottlecap calls send, so the binary won't compile without it.
The // never invoked on bottlecap's code paths comment only applies to the new() constructor. It's trait-required factory we never call, same as new_client() on HttpClientCapability above. The sleep() method itself is used in production: libdatadog's sender calls it for retry/backoff between send attempts.
There was a problem hiding this comment.
mmm, and so we're getting that new capability which might not be something we want for lambda lifecycle no?
There was a problem hiding this comment.
According to 🤖
The retry/backoff isn't new with this bump. send_with_retry already existed at the previous revision and bottlecap already goes through it. Bottlecap configures its own strategy in trace_flusher.rs (trace_retry_strategy(): 3 retries, 0ms delay, constant backoff), so we're already opted in explicitly.
SleepCapability only changed how libdatadog reaches the sleep primitive: the request timeout went from tokio::time::timeout(...) to a select! race against capabilities.sleep(timeout), which is the same tokio::time::sleep underneath on our target. Same runtime behavior, no new waiting in the Lambda lifecycle.
Overview
Bump all
libdd-*dependencies fromdb05e1fto48da0d8to pick up libdatadog PR #2071, which fixes how thedatadog-client-computed-statsanddatadog-client-computed-top-levelheaders are parsed so the behavior matches the Go trace-agent.Bottlecap consumes this exact path in
bottlecap/src/traces/trace_agent.rsvia(&parts.headers).into(), so it directly benefits from the fix.Adapting to breaking API changes between the two revisions
HttpClientTraitwas renamed toHttpClientCapabilitySendData::sendnow requiresC: HttpClientCapability + SleepCapability, so implementedSleepCapabilityforHttpClientTesting
Added Tier 0 coverage in
trace_agent.rspinning the new header-parsing behavior at the(&headers).into()boundaryhandle_tracesuses:true,yes,t,1-> flag setfalse,0,f,F,FALSE,False-> flag clearclient_computed_top_levelno longer set by presence alone (pre-bump regression)These test would fail on the pre-bump rev (
db05e1f), so they lock in the fix.APMSVLS-487