-
Notifications
You must be signed in to change notification settings - Fork 317
Fix the cws tracer on systems using musl libc (like alpine) #7066
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
Conversation
157c108 to
2798ebc
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.
Hey @spikat 👋
Only few minor comments
By the way, how CWS relates to IAST and WAF (if ever)? Because I have no proper label for it.
It stands for "Cloud Workload Security", right?
dd-java-agent/cws-tls/src/main/java/datadog/cws/tls/ErpcTls.java
Outdated
Show resolved
Hide resolved
bc29c68 to
eeeed83
Compare
Hi @PerfectSlayer. Exactly, CWS is "Cloud Workload Security", and is part of the CSM (Cloud Security Management). And AFAIK, for instance the only bridge we want to build is bringing APM traces (if available) to enrich CWS logs/signals And about the label choice, I'm not sure which one to put either :/ |
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.
LGTM!
You have formatting issue so you will need to run ./gradlew :dd-java-agent:cws-tls:spotlessApply.
You can install the hook that runs it automatically: https://github.com/DataDog/dd-trace-java/blob/master/BUILDING.md#clone-the-repository-and-setup-git
For the label, I will create the CWS one. We can edit it later if more features become available 😉
Thanks for your review! And sorry for the formating issue, it's fixed now. 😃 Thanks for the links 🙇
That's perfect! 👍 |
What Does This Do
This fixes the CWS on systems using musl, which doesn't expose the
gettid()syscall. We replace it instead by directly calling syscall with the related syscall ID.Motivation
Be able to retrieve trace spans on docker images build upon alpine.
Additional Notes
Only AMD64 and ARM64 archs are handled.
Jira ticket: [PROJ-IDENT]