Skip to content

Add Windows Named Pipes to the Trace Agent#58

Merged
Lewis-E merged 13 commits intomainfrom
lewis/SVLS-6029/trace-agent-named-pipes
Jan 30, 2026
Merged

Add Windows Named Pipes to the Trace Agent#58
Lewis-E merged 13 commits intomainfrom
lewis/SVLS-6029/trace-agent-named-pipes

Conversation

@Lewis-E
Copy link
Contributor

@Lewis-E Lewis-E commented Dec 26, 2025

What does this PR do?

  • Adds a NamedPipe BufferReader option to let the datadog-trace-agent use windows specific functionality
  • Mimic existing TCP behavior for the named pipe, using the rust http server Hyper.
  • Uses DD_APM_WINDOWS_PIPE_NAME for config + DD_APM_RECEIVER_PORT is overridden to 0 when pipe name is set
  • The issue of multiple functions is NOT solved by this PR. We need to add a uniqueness factor to the envvar to handle multiple functions in the same plan, similar to the AAS extension GUID usage, but this needs to be handled 1) at the compat layer so it can be distributed to the rust mini-agent and the dogstatsd library from a single source of truth, and 2) we can't modify envvars in java, so we will also need to add another communication method to dogstatsd java envvar handling.

Motivation

  • When multiple functions run in Windows run on the same plan, only one can connect due to port conflicts for trace agent and dogstatsd agent. The Serverless Compatibility Layer should use named pipes in Windows for transport to prevent this issue.

Additional Notes

Describe how to test/QA your changes

  • Add integration test
  • Manual testing in Azure

@Lewis-E Lewis-E mentioned this pull request Dec 26, 2025
2 tasks
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch 4 times, most recently from dd1034e to 1d378cf Compare January 9, 2026 21:23
@Lewis-E Lewis-E marked this pull request as ready for review January 9, 2026 21:42
@Lewis-E Lewis-E requested a review from a team as a code owner January 9, 2026 21:42
@Lewis-E Lewis-E requested review from apiarian-datadog and removed request for a team January 9, 2026 21:42
@Lewis-E Lewis-E changed the title Draft: Add Windows Named Pipes to the Trace Agent Add Windows Named Pipes to the Trace Agent Jan 9, 2026
@duncanpharvey
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@jcstorms1 jcstorms1 left a comment

Choose a reason for hiding this comment

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

General logic looks good to me and similar to the windows extension. I'll defer more technical comments to others with more expertise.

Copy link
Collaborator

@duncanpharvey duncanpharvey left a comment

Choose a reason for hiding this comment

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

Following the addition of profiling support, do we need named pipes there as well? Maybe that's something we can handle in a separate PR.

#40

@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch from 48b71a1 to 8773d05 Compare January 27, 2026 17:55
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch from 8773d05 to a460f25 Compare January 27, 2026 17:57
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch 2 times, most recently from 3aacad0 to 27fdcc1 Compare January 27, 2026 19:35
@Lewis-E Lewis-E requested a review from a team as a code owner January 27, 2026 19:35
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch from 27fdcc1 to 1fc9d37 Compare January 27, 2026 19:35
Copy link
Collaborator

@duncanpharvey duncanpharvey left a comment

Choose a reason for hiding this comment

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

LGTM! Can you address the merge conflicts that fix the clippy warnings? Then this is good to merge!

@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/trace-agent-named-pipes branch from b332122 to 340b205 Compare January 30, 2026 22:05
@Lewis-E Lewis-E merged commit 501cfa0 into main Jan 30, 2026
26 checks passed
@Lewis-E Lewis-E deleted the lewis/SVLS-6029/trace-agent-named-pipes branch January 30, 2026 22:13
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.

3 participants