Skip to content

Add Windows Named Pipes to Dogstatsd#59

Merged
Lewis-E merged 21 commits intomainfrom
lewis/SVLS-6029/dogstatsd-named-pipes
Feb 4, 2026
Merged

Add Windows Named Pipes to Dogstatsd#59
Lewis-E merged 21 commits intomainfrom
lewis/SVLS-6029/dogstatsd-named-pipes

Conversation

@Lewis-E
Copy link
Copy Markdown
Contributor

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

What does this PR do?

  • Adds a NamedPipe BufferReader option to let Dogstatsd use windows specific functionality
  • Adopts the multi-instance approach used by winio and the main agent: one server instance per client, spawned in separate tasks.
  • Uses DD_DOGSTATSD_WINDOWS_PIPE_NAME for config + DD_DOGSTATSD_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

  • New #[cfg(test)] in integration_tests.rs
  • Manual testing in Azure
Screenshot 2025-12-31 at 11 25 00 AM

Separate ticket to add this to self-monitoring when the multiple functions functionality is added: https://datadoghq.atlassian.net/browse/SVLS-8248

@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/dogstatsd-named-pipes branch 17 times, most recently from 6d4e402 to f97a7e0 Compare December 29, 2025 19:44
Comment thread crates/dogstatsd/src/dogstatsd.rs
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/dogstatsd-named-pipes branch 12 times, most recently from a2d4505 to 011b3e3 Compare December 31, 2025 15:19
@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/dogstatsd-named-pipes branch 4 times, most recently from a2d1b8f to 704609a Compare February 2, 2026 17:40
Comment thread crates/datadog-trace-agent/src/config.rs
Comment thread crates/datadog-trace-agent/src/trace_processor.rs Outdated
Comment thread crates/dogstatsd/src/dogstatsd.rs
Copy link
Copy Markdown
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.

Approved pending resolution of two comments:

  • statsd_windows_pipe_name in /info endpoint
  • clippy warning (&format!)

@Lewis-E Lewis-E force-pushed the lewis/SVLS-6029/dogstatsd-named-pipes branch from 0cb8f41 to 12ea043 Compare February 4, 2026 17:45
@Lewis-E Lewis-E merged commit b25913d into main Feb 4, 2026
26 checks passed
@Lewis-E Lewis-E deleted the lewis/SVLS-6029/dogstatsd-named-pipes branch February 4, 2026 17:52
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