-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Windows Named Pipe #43
Conversation
9ea26f3
to
ba663aa
Compare
ab695b4
to
0a12c7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
} | ||
|
||
pub type ConnStreamError = Box<dyn std::error::Error + Send + Sync>; | ||
|
||
use hyper::{client::HttpConnector, service::Service}; | ||
impl ConnStream { | ||
pub async fn from_uds_uri(uri: hyper::Uri) -> Result<ConnStream, ConnStreamError> { | ||
pub async fn from_uds_uri(_uri: hyper::Uri) -> Result<ConnStream, ConnStreamError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you put _uri
here because of unused warnings when compiling on #[cfg(not(unix))
?
If yes, I'd rather put something like
#[cfg(not(unix))]
{
let _ = uri;
Err(super::errors::Error::UnixSocketUnsupported.into())
}
Because when I see underscored variables in function signatures, I assume the value will. be unused which is not always the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah exactly. Sorry for that, I'm a beginner in Rust.
Thanks, I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in c9ee643
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know nothing about Windows, but if it works for you, this looks fine to me!
We will put some tests in our hand with named pipe to ensure that it works accordingly (once released) |
What does this PR do?
This PR adds support for the Windows Named Pipe.
Motivation
The .NET tracer currently runs in environment (AAS) where traces are sent to the agent through windows named pipe. The customers that have their apps in that environment are waiting for the profiler to work there too.
Additional Notes
Not on top of my head
How to test the change?
DD_APM_WINDOWS_PIPE_NAME
to\\.\pipe\datadogpipe\mypipe
I check the profiler log and I saw the agent url is the named pipe:
[2022-08-23 22:01:41.691 | info | PId: 421300 | TId: 411900] Using agent endpoint windows:\\.\pipe\datadogpipe\mypipe
And saw in the dashboard my profiles: