Skip to content
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

[crashtracker] Enable collecting to a UNIX socket #420

Merged
merged 15 commits into from
Jun 5, 2024

Conversation

danielsn
Copy link
Contributor

@danielsn danielsn commented May 7, 2024

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@github-actions github-actions bot added the profiling Relates to the profiling* modules. label May 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 180 lines in your changes missing coverage. Please review.

Project coverage is 68.76%. Comparing base (b625629) to head (5f8ed46).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #420      +/-   ##
==========================================
- Coverage   69.05%   68.76%   -0.29%     
==========================================
  Files         195      195              
  Lines       25901    26009     +108     
==========================================
  Hits        17886    17886              
- Misses       8015     8123     +108     
Components Coverage Δ
crashtracker 17.64% <0.00%> (-1.71%) ⬇️
datadog-alloc 98.76% <ø> (ø)
data-pipeline 51.45% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 86.43% <ø> (ø)
ddcommon-ffi 74.15% <ø> (ø)
ddtelemetry 56.09% <ø> (ø)
ipc 81.69% <ø> (ø)
profiling 77.83% <0.00%> (-0.15%) ⬇️
profiling-ffi 59.61% <0.00%> (-0.39%) ⬇️
serverless 0.00% <ø> (ø)
sidecar 36.49% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 54.98% <ø> (ø)
trace-mini-agent 69.33% <ø> (ø)
trace-normalization 97.79% <ø> (ø)
trace-obfuscation 95.74% <ø> (ø)
trace-protobuf 33.33% <ø> (ø)
trace-utils 90.94% <ø> (ø)

Copy link
Contributor

@sanchda sanchda left a comment

Choose a reason for hiding this comment

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

Looks good. I don't really have any precise feedback. I don't know of any scenarios where these anonymous unix domain sockets might fail to be created on platforms that support them (resource exhaustion?), but I expect many other parts of most tracers will fail in that situation before this code does.

}

Ok(())
}

pub fn socket_is_writable(_socket_path: &str) -> bool {
// TODO, implement this
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the intent for this? One could inspect the type of the socket and prctrl or whatever some socket options, but in general in can be hard to infer that a socket is truly writable--right?

Just the same, maybe there's value in knowing for certain that a socket is not writable, and so this function would be valuable even in its current form. 8)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The use is to fail early with an error message when the socket is not writable, indeed :)

@danielsn danielsn marked this pull request as ready for review June 4, 2024 20:19
@danielsn danielsn requested review from a team as code owners June 4, 2024 20:19
@danielsn danielsn merged commit 180c54e into main Jun 5, 2024
27 checks passed
@danielsn danielsn deleted the dsn/crashtracker-unix-socket branch June 5, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
profiling Relates to the profiling* modules.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants