Conversation
| @@ -20,7 +20,7 @@ use tracing::debug; | |||
| /// Type alias for the HTTP client used by trace and stats flushers. | |||
| /// | |||
| /// This is the client type expected by `libdd_trace_utils::SendData::send()`. | |||
| pub type HyperClient = | |||
There was a problem hiding this comment.
This isn't an upgrade is it? This is a change in libraries we are using?
There was a problem hiding this comment.
libdatadog switches away from having to having a dependency on hyper clients as its expecting to use reqwest instead, what we normally use everywhere else here, this just renames the previous client which was hyper tied to just be a "generic" type HttpClient because we are not concerned of what it is, and they're exporting it as an http helper library
555c7cb to
1affec4
Compare
There was a problem hiding this comment.
Pull request overview
This PR upgrades the libdatadog dependencies from revision 158b59471f1132e3cb36023fa3c46ccb2dd0eda1 to c8121f422d2c8d219f8d421ff3cdb1fcbe9e8b09 to incorporate vulnerability patches. The upgrade includes API changes in the libdatadog library that required corresponding updates throughout the codebase.
Changes:
- Updated six libdd-* package dependencies to a newer revision with security fixes
- Migrated from
hyper_migrationtohttp_commonAPI namespace in libdd_common - Renamed
hyper_clientmodule tohttp_clientandHyperClienttype toHttpClientfor better semantic clarity - Refactored trace sending logic to eliminate the
with_endpoint()method and instead construct separateSendDataobjects per endpoint - Added
use_system_resolver: falsefield to allEndpointstruct initializations - Refactored test helper functions in trace_aggregator.rs to reduce code duplication
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| bottlecap/Cargo.toml | Updated six libdd-* dependencies from revision 158b59471 to c8121f422 |
| bottlecap/Cargo.lock | Updated dependency lock file with new versions (libdd-common 1.0.0→1.1.0, libdd-tinybytes 1.0.0→1.1.0) and dependencies |
| bottlecap/src/traces/mod.rs | Renamed hyper_client module export to http_client |
| bottlecap/src/traces/http_client.rs | Renamed module from hyper_client, updated type aliases and imports from hyper_migration to http_common |
| bottlecap/src/traces/trace_processor.rs | Added use_system_resolver field, refactored payload cloning to avoid unnecessary clones and preserve payloads for stats |
| bottlecap/src/traces/trace_flusher.rs | Updated imports and types, removed with_endpoint API calls, refactored dual-shipping to create separate SendData per endpoint, added use_system_resolver field |
| bottlecap/src/traces/trace_aggregator.rs | Extracted test helper function to reduce duplication in test setup |
| bottlecap/src/traces/trace_agent.rs | Updated hyper_migration imports to http_common, added explicit type annotation for clarity |
| bottlecap/src/traces/stats_processor.rs | Updated hyper_migration imports to http_common, reordered imports |
| bottlecap/src/traces/stats_flusher.rs | Updated types and imports from hyper_client to http_client, added use_system_resolver field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[test] | ||
| fn test_get_batch() { | ||
| let mut aggregator = TraceAggregator::default(); | ||
| let tracer_header_tags = TracerHeaderTags { |
There was a problem hiding this comment.
Could you include more details in the PR description. Not clear why we are having to update test cases like this is we are just doing an upgrade to dependencies. Seems like there are other changes like this as well which I wouldn't expect if we are just upgrade dependencies.
There was a problem hiding this comment.
Seems like on this test update, it just simplified data creation for easier testing, seems like we were repeating the same code over and over – although some of these deps indeed changed as they're breaking so we might see some test updates just due to the nature of it (not this one tho)
Overview
longer Clone)
tags are preserved through the aggregation pipeline and used for additional endpoints
Changes
hyper_client.rs → http_client.rs
Trace flusher refactor
Preserve TracerHeaderTags for additional endpoints
Trace processor optimization
Tests