Skip to content

fix: update libdatadog references, set hostname to empty string for trace stats#71

Merged
duncanpharvey merged 5 commits intomainfrom
duncan-harvey/update-libdatadog-stats-hostname
Feb 10, 2026
Merged

fix: update libdatadog references, set hostname to empty string for trace stats#71
duncanpharvey merged 5 commits intomainfrom
duncan-harvey/update-libdatadog-stats-hostname

Conversation

@duncanpharvey
Copy link
Copy Markdown
Collaborator

@duncanpharvey duncanpharvey commented Feb 6, 2026

What does this PR do?

  • Update libdatadog references to latest commit
  • Refactor trace flusher to rely on SendData for retries

Motivation

When hostname is sent on trace metrics it results in ephemeral instances from Azure Functions populating as hosts in the Infrastructure List.

https://datadoghq.atlassian.net/browse/SVLS-8520

Additional Notes

error[E0599]: the method `clone` exists for struct `std::vec::Vec<libdd_trace_utils::send_data::SendData>`, but its trait bounds were not satisfied
   --> crates/datadog-trace-agent/src/trace_flusher.rs:105:35
    |
105 |         let traces_clone = traces.clone();
    |                                   ^^^^^
    |
   ::: /Users/duncan.harvey/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:434:1
    |
434 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
    | ------------------------------------------------------------------------------------------------ doesn't satisfy `_: Clone`
    |
   ::: /Users/duncan.harvey/.cargo/git/checkouts/libdatadog-fb268e227e330049/f97c41f/libdd-trace-utils/src/send_data/mod.rs:67:1
    |
 67 | pub struct SendData {
    | ------------------- doesn't satisfy `_: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `libdd_trace_utils::send_data::SendData: std::clone::Clone`
            which is required by `std::vec::Vec<libdd_trace_utils::send_data::SendData>: std::clone::Clone`

Describe how to test/QA your changes

  • Updated unit tests
  • Deployed to Azure Functions and verified (1) hostname is none on any trace metrics, (2) hosts from ephemeral instances for Azure Functions age out of the Infrastructure List, and (3) traces continue to be sent successfully to Datadog.

@duncanpharvey duncanpharvey changed the title fix: update libdatadog references to set empty string for trace stats fix: update libdatadog references, set hostname to empty string for trace stats Feb 6, 2026
@duncanpharvey duncanpharvey requested review from a team and kathiehuang and removed request for a team February 9, 2026 17:44
@duncanpharvey duncanpharvey marked this pull request as ready for review February 9, 2026 17:56
@duncanpharvey duncanpharvey requested review from a team as code owners February 9, 2026 17:56
}
};

// Retries are handled internally by SendData::send()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you realize retries are now handled internally by SendData?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was reviewing the PR in libdatadog with the breaking change and noticed the send_with_retry method. feat(sidecar)!: introduce TraceData to unify text and binary data

Digging further I found that this retry logic was added some time ago in May 2024! I added a link to this PR in the description for additional context. Add retry logic to trace_utils::SendData

@duncanpharvey duncanpharvey merged commit 2caf9a4 into main Feb 10, 2026
26 checks passed
@duncanpharvey duncanpharvey deleted the duncan-harvey/update-libdatadog-stats-hostname branch February 10, 2026 17:48
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.

4 participants